MCPcopy Create free account
hub / github.com/MaterializeInc/demos / connect

Method connect

connection-examples/java/connection.java:17–31  ·  view source on GitHub ↗

Connect to Materialize @return a Connection object

()

Source from the content-addressed store, hash-verified

15 * @return a Connection object
16 */
17 public Connection connect() {
18 Properties props = new Properties();
19 props.setProperty("user", user);
20 props.setProperty("password", password);
21 props.setProperty("ssl","true");
22 Connection conn = null;
23 try {
24 conn = DriverManager.getConnection(url, props);
25 System.out.println("Connected to Materialize successfully!");
26 } catch (SQLException e) {
27 System.out.println(e.getMessage());
28 }
29
30 return conn;
31 }
32
33 public static void main(String[] args) {
34 App app = new App();

Callers 1

mainMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected