Search in sources :

Example 1 with LineGroupReader

use of org.hsqldb_voltpatches.lib.LineGroupReader in project voltdb by VoltDB.

the class LobManager method createSchema.

public void createSchema() {
    sysLobSession = database.sessionManager.getSysLobSession();
    Session session = sysLobSession;
    InputStream fis = getClass().getResourceAsStream(resourceFileName);
    InputStreamReader reader = null;
    try {
        reader = new InputStreamReader(fis, "ISO-8859-1");
    } catch (Exception e) {
    }
    LineNumberReader lineReader = new LineNumberReader(reader);
    LineGroupReader lg = new LineGroupReader(lineReader, starters);
    HashMappedList map = lg.getAsMap();
    lg.close();
    String sql = (String) map.get("/*lob_schema_definition*/");
    Statement statement = session.compileStatement(sql);
    Result result = statement.execute(session);
    Table table = database.schemaManager.getTable(session, "BLOCKS", "SYSTEM_LOBS");
    //            table.isTransactional = false;
    getLob = session.compileStatement(getLobSQL);
    getLobPart = session.compileStatement(getLobPartSQL);
    createLob = session.compileStatement(createLobSQL);
    createLobPart = session.compileStatement(createLobPartSQL);
    divideLobPart = session.compileStatement(divideLobPartSQL);
    deleteLob = session.compileStatement(deleteLobSQL);
    deleteLobPart = session.compileStatement(deleteLobPartSQL);
    setLobLength = session.compileStatement(updateLobLengthSQL);
    setLobUsage = session.compileStatement(updateLobUsageSQL);
    getNextLobId = session.compileStatement(getNextLobIdSQL);
}
Also used : HashMappedList(org.hsqldb_voltpatches.lib.HashMappedList) Table(org.hsqldb_voltpatches.Table) InputStreamReader(java.io.InputStreamReader) LineGroupReader(org.hsqldb_voltpatches.lib.LineGroupReader) HsqlByteArrayInputStream(org.hsqldb_voltpatches.lib.HsqlByteArrayInputStream) InputStream(java.io.InputStream) Statement(org.hsqldb_voltpatches.Statement) IOException(java.io.IOException) EOFException(java.io.EOFException) HsqlException(org.hsqldb_voltpatches.HsqlException) Session(org.hsqldb_voltpatches.Session) LineNumberReader(java.io.LineNumberReader) Result(org.hsqldb_voltpatches.result.Result)

Aggregations

EOFException (java.io.EOFException)1 IOException (java.io.IOException)1 InputStream (java.io.InputStream)1 InputStreamReader (java.io.InputStreamReader)1 LineNumberReader (java.io.LineNumberReader)1 HsqlException (org.hsqldb_voltpatches.HsqlException)1 Session (org.hsqldb_voltpatches.Session)1 Statement (org.hsqldb_voltpatches.Statement)1 Table (org.hsqldb_voltpatches.Table)1 HashMappedList (org.hsqldb_voltpatches.lib.HashMappedList)1 HsqlByteArrayInputStream (org.hsqldb_voltpatches.lib.HsqlByteArrayInputStream)1 LineGroupReader (org.hsqldb_voltpatches.lib.LineGroupReader)1 Result (org.hsqldb_voltpatches.result.Result)1