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

Method view

connection-examples/java/view.java:30–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28 }
29
30 public void view() {
31 String SQL = "CREATE VIEW market_orders_2 AS "
32 + "SELECT "
33 + " val->>'symbol' AS symbol, "
34 + " (val->'bid_price')::float AS bid_price "
35 + "FROM (SELECT text::jsonb AS val FROM market_orders_raw_2)";
36
37 try (Connection conn = connect()) {
38 Statement st = conn.createStatement();
39 st.execute(SQL);
40 System.out.println("View created.");
41 st.close();
42 } catch (SQLException ex) {
43 System.out.println(ex.getMessage());
44 }
45 }
46
47 public static void main(String[] args) {
48 App app = new App();

Callers 1

mainMethod · 0.95

Calls 1

connectMethod · 0.95

Tested by

no test coverage detected