@Override protected void createIndexes() throws SQLException { try { ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); StringBuilder script = new StringBuilder(); for(String line : IOUtils.readLines(KiWiPostgresHandler.class.getResourceAsStream("create_indexes.sql"))) { if(!line.startsWith("--")) { script.append(line); script.append(" "); } } log.debug("PostgreSQL: running SQL script '{}'", script.toString()); runner.runScript(new StringReader(script.toString())); } catch (IOException ex) { throw new SQLException("error while creating indexes",ex); } }
@Override protected void dropIndexes() throws SQLException { try { ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); StringBuilder script = new StringBuilder(); for(String line : IOUtils.readLines(KiWiPostgresHandler.class.getResourceAsStream("drop_indexes.sql"))) { if(!line.startsWith("--")) { script.append(line); script.append(" "); } } log.debug("PostgreSQL: running SQL script '{}'", script.toString()); runner.runScript(new StringReader(script.toString())); } catch (IOException ex) { throw new SQLException("error while dropping indexes",ex); } }
@Override protected void dropIndexes() throws SQLException { try { ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); StringBuilder script = new StringBuilder(); for(String line : IOUtils.readLines(KiWiPostgresHandler.class.getResourceAsStream("drop_indexes.sql"))) { if(!line.startsWith("--")) { script.append(line); script.append(" "); } } log.debug("PostgreSQL: running SQL script '{}'", script.toString()); runner.runScript(new StringReader(script.toString())); } catch (IOException ex) { throw new SQLException("error while dropping indexes",ex); } }
@Override protected void createIndexes() throws SQLException { try { ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); StringBuilder script = new StringBuilder(); for(String line : IOUtils.readLines(KiWiPostgresHandler.class.getResourceAsStream("create_indexes.sql"))) { if(!line.startsWith("--")) { script.append(line); script.append(" "); } } log.debug("PostgreSQL: running SQL script '{}'", script.toString()); runner.runScript(new StringReader(script.toString())); } catch (IOException ex) { throw new SQLException("error while creating indexes",ex); } }
ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); if (connection.getMetadata("ft.lookup") == null) { log.info("PostgreSQL: creating language configuration lookup function");
log.info("creating new KiWi database ..."); ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); runner.runScript(new StringReader(configuration.getDialect().getCreateScript(scriptName))); log.info("upgrading existing KiWi database from version {} to version {}", version, configuration.getDialect().getVersion()); ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); runner.runScript(new StringReader(updateScript));
log.info("creating new KiWi database ..."); ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); runner.runScript(new StringReader(configuration.getDialect().getCreateScript(scriptName))); log.info("upgrading existing KiWi database from version {} to version {}", version, configuration.getDialect().getVersion()); ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); runner.runScript(new StringReader(updateScript));
ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); runner.runScript(new StringReader(configuration.getDialect().getDropScript(scriptName)));
ScriptRunner runner = new ScriptRunner(connection.getJDBCConnection(), false, false); runner.runScript(new StringReader(configuration.getDialect().getDropScript(scriptName)));