Package org.hsqldb_voltpatches

Examples of org.hsqldb_voltpatches.Session


            return t;
        }

        PersistentStore store = database.persistentStoreCollection.getStore(t);
        Session sys = database.sessionManager.newSysSession(
            SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
        Result rs = sys.executeDirectStatement(
            "SELECT GRANTOR, GRANTEE, OBJECT_CATALOG, OBJECT_SCHEMA, OBJECT_NAME, "
            + "OBJECT_TYPE, PRIVILEGE_TYPE, IS_GRANTABLE "
            + "FROM INFORMATION_SCHEMA.USAGE_PRIVILEGES "
            + "JOIN INFORMATION_SCHEMA.APPLICABLE_ROLES ON GRANTEE = ROLE_NAME;");

        t.insertSys(store, rs);
        sys.close();

        return t;
    }
View Full Code Here


            return t;
        }

        PersistentStore store = database.persistentStoreCollection.getStore(t);
        Session sys = database.sessionManager.newSysSession(
            SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
        String sql = (String) statementMap.get("/*sql_features*/");
        Result rs = sys.executeDirectStatement(sql);

        t.insertSys(store, rs);

        return t;
    }
View Full Code Here

            return t;
        }

        PersistentStore store = database.persistentStoreCollection.getStore(t);
        Session sys = database.sessionManager.newSysSession(
            SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());

/*
        Result rs = sys.executeDirectStatement(
            "VALUES "
View Full Code Here

            return t;
        }

        PersistentStore store = database.persistentStoreCollection.getStore(t);
        Session sys = database.sessionManager.newSysSession(
            SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
        String sql = (String) statementMap.get("/*sql_packages*/");
        Result rs = sys.executeDirectStatement(sql);

        t.insertSys(store, rs);

        return t;
    }
View Full Code Here

            return t;
        }

        PersistentStore store = database.persistentStoreCollection.getStore(t);
        Session sys = database.sessionManager.newSysSession(
            SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
        String sql = (String) statementMap.get("/*sql_parts*/");
        Result rs = sys.executeDirectStatement(sql);


        t.insertSys(store, rs);

        return t;
View Full Code Here

            return t;
        }

        PersistentStore store = database.persistentStoreCollection.getStore(t);
        Session sys = database.sessionManager.newSysSession(
            SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());

        String sql = (String) statementMap.get("/*sql_sizing*/");
        Result rs = sys.executeDirectStatement(sql);

        t.insertSys(store, rs);

        return t;
    }
View Full Code Here

            return t;
        }

        PersistentStore store = database.persistentStoreCollection.getStore(t);
        Session sys = database.sessionManager.newSysSession(
            SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());

        /*
                Result rs = sys.executeDirectStatement(
                    "VALUES "
View Full Code Here

    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);
    }
View Full Code Here

        return lobID;
    }

    public Result deleteLob(long lobID) {

        Session        session  = this.sysLobSession;
        ResultMetaData meta     = deleteLob.getParametersMetaData();
        Object         params[] = new Object[meta.getColumnCount()];

        params[0] = Long.valueOf(lobID);
        params[1] = Long.valueOf(0);

        Result result = session.executeCompiledStatement(deleteLob, params);

        return result;
    }
View Full Code Here

    }

    public Result setBytesForNewBlob(long lobID, InputStream inputStream,
                                     long length) {

        Session session = sysLobSession;

        if (length == 0) {
            return ResultLob.newLobSetResponse(lobID, 0);
        }
View Full Code Here

TOP

Related Classes of org.hsqldb_voltpatches.Session

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.