use of org.h2.Driver in project neo4j by neo4j.
the class ProcedureTest method calls_procedures_with_simple_input_type_returning_record_with_primitive_fields.
@Test
public void calls_procedures_with_simple_input_type_returning_record_with_primitive_fields() {
try (Driver driver = GraphDatabase.driver(graphDb.boltURI(), configuration());
Session session = driver.session()) {
assertThat(session.run("CALL " + procedureNamespace + ".simpleInput11('string')").single()).isNotNull();
assertThat(session.run("CALL " + procedureNamespace + ".simpleInput12(42)").single()).isNotNull();
assertThat(session.run("CALL " + procedureNamespace + ".simpleInput13(42)").single()).isNotNull();
assertThat(session.run("CALL " + procedureNamespace + ".simpleInput14(4.2)").single()).isNotNull();
assertThat(session.run("CALL " + procedureNamespace + ".simpleInput15(true)").single()).isNotNull();
assertThat(session.run("CALL " + procedureNamespace + ".simpleInput16(false)").single()).isNotNull();
assertThat(session.run("CALL " + procedureNamespace + ".simpleInput17({foo:'bar'})").single()).isNotNull();
assertThat(session.run("CALL " + procedureNamespace + ".simpleInput21()").single()).isNotNull();
}
}
use of org.h2.Driver in project symmetric-ds by JumpMind.
the class DbSqlCommand method executeWithOptions.
@Override
protected boolean executeWithOptions(CommandLine line) throws Exception {
BasicDataSource basicDataSource = getDatabasePlatform(false).getDataSource();
String url = basicDataSource.getUrl();
String user = basicDataSource.getUsername();
String password = basicDataSource.getPassword();
String driver = basicDataSource.getDriverClassName();
Shell shell = new Shell();
if (line.hasOption(OPTION_SQL)) {
String sql = line.getOptionValue(OPTION_SQL);
shell.runTool("-url", url, "-user", user, "-password", password, "-driver", driver, "-sql", sql);
} else {
shell.runTool("-url", url, "-user", user, "-password", password, "-driver", driver);
}
return true;
}
use of org.h2.Driver in project aries by apache.
the class AbstractTransactionTest method initTestTable.
protected void initTestTable(String jdbcUrl) throws SQLException {
Driver d = new Driver();
try (Connection c = d.connect(jdbcUrl, null)) {
Statement s = c.createStatement();
try {
s.execute("DROP TABLE TEST_TABLE");
} catch (SQLException sqle) {
}
s.execute("CREATE TABLE TEST_TABLE ( message varchar(255) )");
c.commit();
}
}
Aggregations