/** * @see Handle#createScript(String) */ public Script createScript(final Handle handle) { return handle.createScript(queryName); }
String script = ".. your sql file contents here .."; try (Handle h = dbi.open()) { h.createScript(script).execute(); }
@Test public void testScriptStuff() throws Exception { Handle h = openHandle(); Script s = h.createScript("default-data"); s.execute(); assertEquals(2, h.select("select * from something").size()); }
@Test public void testScriptStuff() throws Exception { Handle h = openHandle(); Script s = h.createScript("default-data"); s.execute(); assertEquals(2, h.select("select * from something").size()); }