• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java Table类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.hsqldb.Table的典型用法代码示例。如果您正苦于以下问题:Java Table类的具体用法?Java Table怎么用?Java Table使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Table类属于org.hsqldb包,在下文中一共展示了Table类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: writeRow

import org.hsqldb.Table; //导入依赖的package包/类
protected void writeRow(Session session, Table table,
                        Object[] data) throws IOException {

    schemaToLog = table.getName().schema;
    busyWriting = true;

    rowOut.reset();
    ((RowOutputTextLog) rowOut).setMode(RowOutputTextLog.MODE_INSERT);
    addSessionId(session);
    rowOut.write(BYTES_INSERT_INTO);
    rowOut.writeString(table.getName().statementName);
    rowOut.write(BYTES_VALUES);
    rowOut.writeData(data, table.getColumnTypes());
    rowOut.write(BYTES_TERM);
    rowOut.write(BYTES_LINE_SEP);
    writeRowOutToFile();

    byteCount   += rowOut.size();
    busyWriting = false;

    if (forceSync) {
        sync();
    }
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:25,代码来源:ScriptWriterText.java


示例2: UDT_PRIVILEGES

import org.hsqldb.Table; //导入依赖的package包/类
Table UDT_PRIVILEGES() {

        Table t = sysTables[UDT_PRIVILEGES];

        if (t == null) {
            t = createBlankTable(sysTableHsqlNames[UDT_PRIVILEGES]);

            addColumn(t, "UDT_CATALOG", SQL_IDENTIFIER);
            addColumn(t, "UDT_SCHEMA", SQL_IDENTIFIER);
            addColumn(t, "UDT_NAME", SQL_IDENTIFIER);
            addColumn(t, "PRIVILEGE_TYPE", CHARACTER_DATA);
            addColumn(t, "IS_GRANTABLE", YES_OR_NO);

            HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
                sysTableHsqlNames[UDT_PRIVILEGES].name, false,
                SchemaObject.INDEX);

            t.createPrimaryKey(name, new int[] {
                0, 1, 2, 3, 4
            }, false);

            return t;
        }

        return t;
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:27,代码来源:DatabaseInformationFull.java


示例3: writeDeleteStatement

import org.hsqldb.Table; //导入依赖的package包/类
public void writeDeleteStatement(Session session, Table table,
                                 Object[] data) throws IOException {

    schemaToLog = table.getName().schema;
    busyWriting = true;

    rowOut.reset();
    ((RowOutputTextLog) rowOut).setMode(RowOutputTextLog.MODE_DELETE);
    addSessionId(session);
    rowOut.write(BYTES_DELETE_FROM);
    rowOut.writeString(table.getName().statementName);
    rowOut.write(BYTES_WHERE);
    rowOut.writeData(table.getColumnCount(), table.getColumnTypes(), data,
                     table.columnList, table.getPrimaryKey());
    rowOut.write(BYTES_LINE_SEP);
    writeRowOutToFile();

    byteCount   += rowOut.size();
    busyWriting = false;

    if (forceSync) {
        sync();
    }
}
 
开发者ID:s-store,项目名称:sstore-soft,代码行数:25,代码来源:ScriptWriterText.java


示例4: writeTableInit

import org.hsqldb.Table; //导入依赖的package包/类
protected void writeTableInit(Table t) throws IOException {

        if (t.isEmpty(currentSession)) {
            return;
        }

        if (schemaToLog == currentSession.loggedSchema) {
            return;
        }

        rowOut.reset();
        writeSchemaStatement(t.getName().schema);
        writeRowOutToFile();

        currentSession.loggedSchema = schemaToLog;
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:17,代码来源:ScriptWriterText.java


示例5: delete

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * Row might have changed from memory to disk or indexes added
 */
public void delete(Session session, Row row) {

    NodeAVL node  = ((RowAVL) row).getNode(0);
    int     count = 0;

    while (node != null) {
        count++;

        node = node.nNext;
    }

    if ((isCached ^ !row.isMemory()) || count != indexList.length) {
        row = ((Table) table).getDeleteRowFromLog(session, row.getData());
    }

    if (row != null) {
        super.delete(session, row);
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:23,代码来源:RowStoreAVLHybridExtended.java


示例6: containsAllColumns

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * Supports column level checks
 */
static boolean containsAllColumns(OrderedHashSet columnSet, Table table,
                                  boolean[] columnCheckList) {

    for (int i = 0; i < columnCheckList.length; i++) {
        if (columnCheckList[i]) {
            if (columnSet == null) {
                return false;
            }

            if (columnSet.contains(table.getColumn(i).getName())) {
                continue;
            }

            return false;
        }
    }

    return true;
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:23,代码来源:Right.java


示例7: hasTableRight

import org.hsqldb.Table; //导入依赖的package包/类
public boolean hasTableRight(Table table) {

        if (isFullyAccessibleByRole(table)) {
            return true;
        }

        Right right = (Right) fullRightsMap.get(table.getName());

        if (right == null) {
            return false;
        }

        return right.isFull || right.isFullDelete || right.isFullInsert
               || right.isFullUpdate || right.isFullReferences
               || right.isFullTrigger || right.isFullSelect;
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:17,代码来源:Grantee.java


示例8: writeRow

import org.hsqldb.Table; //导入依赖的package包/类
public void writeRow(Session session, Row row,
                     Table table) throws IOException {

    schemaToLog = table.getName().schema;

    writeSessionIdAndSchema(session);
    rowOut.reset();
    rowOut.setMode(RowOutputTextLog.MODE_INSERT);
    rowOut.write(BYTES_INSERT_INTO);
    rowOut.writeString(table.getName().statementName);
    rowOut.write(BYTES_VALUES);
    rowOut.writeData(row, table.getColumnTypes());
    rowOut.write(BYTES_TERM);
    rowOut.write(BYTES_LINE_SEP);
    writeRowOutToFile();
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:17,代码来源:ScriptWriterText.java


示例9: cacheClear

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * Clears the contents of cached system tables and resets user slots
 * to null. <p>
 *
 */
protected final void cacheClear(Session session) {

    int i = sysTables.length;

    while (i-- > 0) {
        Table t = sysTables[i];

        if (t != null) {
            t.clearAllData(session);
        }
    }
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:18,代码来源:DatabaseInformationMain.java


示例10: canSelect

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * Supports column level rights
 */
boolean canSelect(Table table, boolean[] columnCheckList) {

    if (isFull || isFullSelect) {
        return true;
    }

    return containsAllColumns(selectColumnSet, table, columnCheckList);
}
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:12,代码来源:Right.java


示例11: newIndex

import org.hsqldb.Table; //导入依赖的package包/类
public Index newIndex(Table table, Index index, int[] columns) {

        boolean[] modeFlags = new boolean[columns.length];
        Type[]    colTypes  = new Type[columns.length];

        ArrayUtil.projectRow(table.getColumnTypes(), columns, colTypes);

        return newIndex(index.getName(), index.getPersistenceId(), table,
                        columns, modeFlags, modeFlags, colTypes, false, false,
                        false, false);
    }
 
开发者ID:Julien35,项目名称:dev-courses,代码行数:12,代码来源:Logger.java


示例12: openTextCache

import org.hsqldb.Table; //导入依赖的package包/类
DataFileCache openTextCache(Table table, String source,
                            boolean readOnlyData,
                            boolean reversed) throws HsqlException {

    closeTextCache(table);

    if (database.getType() != DatabaseURL.S_RES
            && !properties.isPropertyTrue(
                HsqlDatabaseProperties.textdb_allow_full_path)) {
        if (source.indexOf("..") != -1) {
            throw (Trace.error(Trace.ACCESS_IS_DENIED, source));
        }

        String path = new File(
            new File(
                database.getPath()
                + ".properties").getAbsolutePath()).getParent();

        if (path != null) {
            source = path + File.separator + source;
        }
    }

    TextCache c;
    int       type;

    if (reversed) {
        c = new TextCache(table, source);
    } else {
        c = new TextCache(table, source);
    }

    c.open(readOnlyData || filesReadOnly);
    textCacheList.put(table.getName(), c);

    return c;
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:38,代码来源:Log.java


示例13: canReference

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * Supports column level rights
 */
boolean canReference(Table table, boolean[] columnCheckList) {

    if (isFull || isFullReferences) {
        return true;
    }

    return containsAllColumns(referencesColumnSet, table, columnCheckList);
}
 
开发者ID:s-store,项目名称:s-store,代码行数:12,代码来源:Right.java


示例14: COLUMN_UDT_USAGE

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * UDT's are shown if the authorization is the user or a role given to the
 * user.
 *
 * <p>
 *
 * @return Table
 */
Table COLUMN_UDT_USAGE() {

    Table t = sysTables[COLUMN_UDT_USAGE];

    if (t == null) {
        t = createBlankTable(sysTableHsqlNames[COLUMN_UDT_USAGE]);

        addColumn(t, "UDT_CATALOG", SQL_IDENTIFIER);
        addColumn(t, "UDT_SCHEMA", SQL_IDENTIFIER);
        addColumn(t, "UDT_NAME", SQL_IDENTIFIER);
        addColumn(t, "TABLE_CATALOG", SQL_IDENTIFIER);
        addColumn(t, "TABLE_SCHEMA", SQL_IDENTIFIER);
        addColumn(t, "TABLE_NAME", SQL_IDENTIFIER);     // not null
        addColumn(t, "COLUMN_NAME", SQL_IDENTIFIER);    // not null

        HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
            sysTableHsqlNames[COLUMN_UDT_USAGE].name, false,
            SchemaObject.INDEX);

        t.createPrimaryKey(name, new int[] {
            0, 1, 2, 3, 4, 5, 6
        }, false);

        return t;
    }

    PersistentStore store = database.persistentStoreCollection.getStore(t);
    Session sys = database.sessionManager.newSysSession(
        SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
    Result rs = sys.executeDirectStatement(
        "SELECT UDT_CATALOG, UDT_SCHEMA, UDT_NAME, TABLE_CATALOG, "
        + "TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS "
        + "WHERE UDT_NAME IS NOT NULL;");

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

    return t;
}
 
开发者ID:s-store,项目名称:s-store,代码行数:48,代码来源:DatabaseInformationFull.java


示例15: ADMINISTRABLE_ROLE_AUTHORIZATIONS

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * SQL:2008 VIEW<p>
 *
 * ADMINISTRABLE_ROLE_AUTHORIZATIONS<p>
 *
 * Returns roles that are grantable by an admin user, which means all the
 * roles.
 *
 * @return Table
 */
Table ADMINISTRABLE_ROLE_AUTHORIZATIONS(Session session,
        PersistentStore store) {

    Table t = sysTables[ADMINISTRABLE_ROLE_AUTHORIZATIONS];

    if (t == null) {
        t = createBlankTable(
            sysTableHsqlNames[ADMINISTRABLE_ROLE_AUTHORIZATIONS]);

        addColumn(t, "GRANTEE", SQL_IDENTIFIER);
        addColumn(t, "ROLE_NAME", SQL_IDENTIFIER);
        addColumn(t, "IS_GRANTABLE", SQL_IDENTIFIER);

        HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
            sysTableHsqlNames[ADMINISTRABLE_ROLE_AUTHORIZATIONS].name,
            false, SchemaObject.INDEX);

        t.createPrimaryKeyConstraint(name, new int[] {
            0, 1, 2
        }, false);

        return t;
    }

    if (session.isAdmin()) {
        insertRoles(session, t, session.getGrantee(), true);
    }

    return t;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:41,代码来源:DatabaseInformationFull.java


示例16: writeDeleteStatement

import org.hsqldb.Table; //导入依赖的package包/类
public synchronized void writeDeleteStatement(Session session, Table t,
        Object[] row) throws HsqlException {

    if (logStatements) {
        log.writeDeleteStatement(session, t, row);
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:8,代码来源:Logger.java


示例17: JAR_JAR_USAGE

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * SQL:2008 VIEW<p>
 *
 * The JAR_JAR_USAGE view is empty.<p>
 *
 */
Table JAR_JAR_USAGE(Session session, PersistentStore store) {

    Table t = sysTables[JAR_JAR_USAGE];

    if (t == null) {
        t = createBlankTable(sysTableHsqlNames[JAR_JAR_USAGE]);

        addColumn(t, "PATH_JAR_CATALOG", SQL_IDENTIFIER);
        addColumn(t, "PATH_JAR_SCHAMA", SQL_IDENTIFIER);
        addColumn(t, "PATH_JAR_NAME", SQL_IDENTIFIER);
        addColumn(t, "JAR_CATALOG", SQL_IDENTIFIER);
        addColumn(t, "JAR_SCHEMA", SQL_IDENTIFIER);
        addColumn(t, "JAR_NAME", SQL_IDENTIFIER);

        HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
            sysTableHsqlNames[JAR_JAR_USAGE].name, false,
            SchemaObject.INDEX);

        t.createPrimaryKeyConstraint(name, new int[] {
            0, 1, 2, 3, 4, 5
        }, false);

        return t;
    }

    // column number mappings
    final int path_jar_catalog = 0;
    final int path_jar_schema  = 1;
    final int path_jar_name    = 2;
    final int jar_catalog      = 3;
    final int jar_schema       = 4;
    final int jar_name         = 5;

    //
    Iterator it;
    Object[] row;

    return t;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:46,代码来源:DatabaseInformationFull.java


示例18: JARS

import org.hsqldb.Table; //导入依赖的package包/类
/**
 * SQL:2008 VIEW<p>
 *
 * The JARS view is empty.<p>
 *
 */
Table JARS(Session session, PersistentStore store) {

    Table t = sysTables[JARS];

    if (t == null) {
        t = createBlankTable(sysTableHsqlNames[JARS]);

        addColumn(t, "JAR_CATALOG", SQL_IDENTIFIER);
        addColumn(t, "JAR_SCHEMA", SQL_IDENTIFIER);
        addColumn(t, "JAR_NAME", SQL_IDENTIFIER);
        addColumn(t, "JAR_PATH", CHARACTER_DATA);

        HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
            sysTableHsqlNames[JARS].name, false, SchemaObject.INDEX);

        t.createPrimaryKeyConstraint(name, new int[] {
            0, 1, 2, 3
        }, false);

        return t;
    }

    // column number mappings
    final int jar_catalog = 0;
    final int jar_schema  = 1;
    final int jar_name    = 2;
    final int jar_path    = 3;

    //
    Iterator it;
    Object[] row;

    return t;
}
 
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:41,代码来源:DatabaseInformationFull.java


示例19: checkReferences

import org.hsqldb.Table; //导入依赖的package包/类
public void checkReferences(Table table, boolean[] checkList) {

        if (isFullyAccessibleByRole(table)) {
            return;
        }

        Right right = (Right) fullRightsMap.get(table.getName());

        if (right != null && right.canReference(table, checkList)) {
            return;
        }

        throw Error.error(ErrorCode.X_42501, table.getName().name);
    }
 
开发者ID:s-store,项目名称:s-store,代码行数:15,代码来源:Grantee.java


示例20: writeDeleteStatement

import org.hsqldb.Table; //导入依赖的package包/类
void writeDeleteStatement(Session session, Table t,
                          Object[] row) throws HsqlException {

    try {
        dbLogWriter.writeDeleteStatement(session, t, row);
    } catch (IOException e) {
        throw Trace.error(Trace.FILE_IO_ERROR, logFileName);
    }

    if (maxLogSize > 0 && dbLogWriter.size() > maxLogSize) {
        database.logger.needsCheckpoint = true;
    }
}
 
开发者ID:parabuild-ci,项目名称:parabuild-ci,代码行数:14,代码来源:Log.java



注:本文中的org.hsqldb.Table类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java SubstanceSkin类代码示例发布时间:2022-05-23
下一篇:
Java Util类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap