本文整理汇总了Java中org.hsqldb.HsqlNameManager类的典型用法代码示例。如果您正苦于以下问题:Java HsqlNameManager类的具体用法?Java HsqlNameManager怎么用?Java HsqlNameManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
HsqlNameManager类属于org.hsqldb包,在下文中一共展示了HsqlNameManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: Collation
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
private Collation(String name, String language, String country,
int strength, int decomposition, boolean ucc) {
locale = new Locale(language, country);
collator = Collator.getInstance(locale);
if (strength >= 0) {
collator.setStrength(strength);
}
if (decomposition >= 0) {
collator.setDecomposition(decomposition);
}
strength = collator.getStrength();
isUnicodeSimple = false;
this.name = HsqlNameManager.newInfoSchemaObjectName(name, true,
SchemaObject.COLLATION);
charset = Charset.SQL_TEXT;
isUpperCaseCompare = ucc;
isFinal = true;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:23,代码来源:Collation.java
示例2: UDT_PRIVILEGES
import org.hsqldb.HsqlNameManager; //导入依赖的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,项目名称:sstore-soft,代码行数:27,代码来源:DatabaseInformationFull.java
示例3: SYSTEM_VERSIONCOLUMNS
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* Retrieves a <code>Table</code> object describing the accessible
* columns that are automatically updated when any value in a row
* is updated. <p>
*
* Each row is a version column description with the following columns: <p>
*
* <OL>
* <LI><B>SCOPE</B> <code>SMALLINT</code> => is not used
* <LI><B>COLUMN_NAME</B> <code>VARCHAR</code> => column name
* <LI><B>DATA_TYPE</B> <code>SMALLINT</code> =>
* SQL data type from java.sql.Types
* <LI><B>TYPE_NAME</B> <code>SMALLINT</code> =>
* Data source dependent type name
* <LI><B>COLUMN_SIZE</B> <code>INTEGER</code> => precision
* <LI><B>BUFFER_LENGTH</B> <code>INTEGER</code> =>
* length of column value in bytes
* <LI><B>DECIMAL_DIGITS</B> <code>SMALLINT</code> => scale
* <LI><B>PSEUDO_COLUMN</B> <code>SMALLINT</code> =>
* is this a pseudo column like an Oracle <code>ROWID</code>:<BR>
* (as defined in <code>java.sql.DatabaseMetadata</code>)
* <UL>
* <LI><code>versionColumnUnknown</code> - may or may not be
* pseudo column
* <LI><code>versionColumnNotPseudo</code> - is NOT a pseudo column
* <LI><code>versionColumnPseudo</code> - is a pseudo column
* </UL>
* </OL> <p>
*
* <B>Note:</B> Currently, the HSQLDB engine does not support version
* columns, so an empty table is returned. <p>
*
* @return a <code>Table</code> object describing the columns
* that are automatically updated when any value
* in a row is updated
*/
Table SYSTEM_VERSIONCOLUMNS(Session session, PersistentStore store) {
Table t = sysTables[SYSTEM_VERSIONCOLUMNS];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SYSTEM_VERSIONCOLUMNS]);
// ----------------------------------------------------------------
// required by DatabaseMetaData.getVersionColumns result set
// ----------------------------------------------------------------
addColumn(t, "SCOPE", Type.SQL_INTEGER);
addColumn(t, "COLUMN_NAME", SQL_IDENTIFIER); // not null
addColumn(t, "DATA_TYPE", Type.SQL_SMALLINT); // not null
addColumn(t, "TYPE_NAME", SQL_IDENTIFIER); // not null
addColumn(t, "COLUMN_SIZE", Type.SQL_SMALLINT);
addColumn(t, "BUFFER_LENGTH", Type.SQL_INTEGER);
addColumn(t, "DECIMAL_DIGITS", Type.SQL_SMALLINT);
addColumn(t, "PSEUDO_COLUMN", Type.SQL_SMALLINT); // not null
// -----------------------------------------------------------------
// required by DatabaseMetaData.getVersionColumns filter parameters
// -----------------------------------------------------------------
addColumn(t, "TABLE_CAT", SQL_IDENTIFIER);
addColumn(t, "TABLE_SCHEM", SQL_IDENTIFIER);
addColumn(t, "TABLE_NAME", SQL_IDENTIFIER); // not null
// -----------------------------------------------------------------
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[SYSTEM_VERSIONCOLUMNS].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, null, false);
return t;
}
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:75,代码来源:DatabaseInformationMain.java
示例4: ADMINISTRABLE_ROLE_AUTHORIZATIONS
import org.hsqldb.HsqlNameManager; //导入依赖的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
示例5: APPLICABLE_ROLES
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* APPLICABLE_ROLES<p>
*
* Identifies the applicable roles for the current user.<p>
*
* <b>Definition</b><p>
*
* <pre class="SqlCodeExample">
* CREATE RECURSIVE VIEW APPLICABLE_ROLES ( GRANTEE, ROLE_NAME, IS_GRANTABLE ) AS
* ( ( SELECT GRANTEE, ROLE_NAME, IS_GRANTABLE
* FROM DEFINITION_SCHEMA.ROLE_AUTHORIZATION_DESCRIPTORS
* WHERE ( GRANTEE IN ( CURRENT_USER, 'PUBLIC' )
* OR GRANTEE IN ( SELECT ROLE_NAME
* FROM ENABLED_ROLES ) ) )
* UNION
* ( SELECT RAD.GRANTEE, RAD.ROLE_NAME, RAD.IS_GRANTABLE
* FROM DEFINITION_SCHEMA.ROLE_AUTHORIZATION_DESCRIPTORS RAD
* JOIN APPLICABLE_ROLES R
* ON RAD.GRANTEE = R.ROLE_NAME ) );
*
* GRANT SELECT ON TABLE APPLICABLE_ROLES
* TO PUBLIC WITH GRANT OPTION;
* </pre>
*/
Table APPLICABLE_ROLES(Session session, PersistentStore store) {
Table t = sysTables[APPLICABLE_ROLES];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[APPLICABLE_ROLES]);
addColumn(t, "GRANTEE", SQL_IDENTIFIER);
addColumn(t, "ROLE_NAME", SQL_IDENTIFIER);
addColumn(t, "IS_GRANTABLE", SQL_IDENTIFIER);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[APPLICABLE_ROLES].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[] {
0, 1, 2
}, false);
return t;
}
insertRoles(session, t, session.getGrantee(), session.isAdmin());
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:53,代码来源:DatabaseInformationFull.java
示例6: ASSERTIONS
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The ASSERTIONS view is empty.<p>
*
*/
Table ASSERTIONS(Session session, PersistentStore store) {
Table t = sysTables[ASSERTIONS];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[ASSERTIONS]);
addColumn(t, "CONSTRAINT_CATALOG", SQL_IDENTIFIER);
addColumn(t, "CONSTRAINT_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "CONSTRAINT_NAME", SQL_IDENTIFIER); // not null
addColumn(t, "IS_DEFERRABLE", YES_OR_NO);
addColumn(t, "INITIALLY_DEFERRED", YES_OR_NO);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[ASSERTIONS].name, false, SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[] {
0, 1, 2
}, false);
return t;
}
final int constraint_catalog = 0;
final int constraint_schema = 1;
final int constraint_name = 2;
final int is_deferrable = 3;
final int initially_deferred = 4;
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:38,代码来源:DatabaseInformationFull.java
示例7: DATA_TYPE_PRIVILEGES
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The DATA_TYPE_PRIVILEGES view has one row for each use of a data type.
* Currently this view does not report the DTD_IDENTIFIER column.
* <b>Definition:</b> <p>
*
* <pre class="SqlCodeExample">
* OBJECT_CATALOG VARCHAR
* OBJECT_SCHEMA VARCHAR
* OBJECT_NAME VARCHAR
* OBJECT_TYPE VARCHAR
* DTD_IDENTIFIER VARCHAR
* </pre>
*
* <b>Description:</b> <p>
*
* <ol>
* <li> The values of OBJECT_CATALOG, OBJECT_SCHEMA, and
* OBJECT_NAME are the catalog name, schema name,
* and identifier, respectively, of the object. <p>
*
* <li> The value of OBJECT_TYPE is the type of the object, for example
* 'TABLE'.
*
* <1i> Tables are reported only if the user or one of its roles is
* the authorization (owner) of the table.
* </ol>
*
* @return Table
*/
Table DATA_TYPE_PRIVILEGES(Session session, PersistentStore store) {
Table t = sysTables[DATA_TYPE_PRIVILEGES];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[DATA_TYPE_PRIVILEGES]);
addColumn(t, "OBJECT_CATALOG", SQL_IDENTIFIER);
addColumn(t, "OBJECT_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "OBJECT_NAME", SQL_IDENTIFIER); // not null
addColumn(t, "OBJECT_TYPE", SQL_IDENTIFIER);
addColumn(t, "DTD_IDENTIFIER", SQL_IDENTIFIER);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[DATA_TYPE_PRIVILEGES].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[] {
0, 1, 2, 3, 4
}, false);
return t;
}
//
Session sys = database.sessionManager.newSysSession(
SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
String sql = (String) statementMap.get("/*data_type_privileges*/");
Result rs = sys.executeDirectStatement(sql);
t.insertSys(session, store, rs);
sys.close();
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:67,代码来源:DatabaseInformationFull.java
示例8: JAR_JAR_USAGE
import org.hsqldb.HsqlNameManager; //导入依赖的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
示例9: JARS
import org.hsqldb.HsqlNameManager; //导入依赖的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
示例10: ROLE_UDT_GRANTS
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The ROLE_UDT_GRANT view has one row for each privilege granted to each
* user defined type. <p>
*
* <b>Definition:</b><p>
*
* <pre class="SqlCodeExample">
* GRANTOR VARCHAR ,
* GRANTEE VARCHAR ,
* UDT_CATALOG VARCHAR ,
* UDT_SCHEMA VARCHAR ,
* UDT_NAME VARCHAR ,
* PRIVILEGE_TYPE VARCHAR ,
* IS_GRANTABLE VARCHAR ,
* </pre>
*
* <b>Description:</b><p>
*
* <ol>
* <li> The values of GRANTOR is the grantor of the privilege. The value of
* GRANTEE is the name of the ROLE.
*
* <li> The values of UDT_CATALOG, UDT_SCHEMA and
* UDT_NAME are the catalog name, schema name and
* table name, respectively, of the table level grant being
* described. <p>
*
* <li> The value of PRIVILEGE_TYPE is the type of the privilege, including,
* 'USAGE'.
* The value IS_GRANTABLE is 'YES' if the privilege is grantable. <p>
* </ol>
*
* @return Table
*/
Table ROLE_UDT_GRANTS(Session session, PersistentStore store) {
Table t = sysTables[ROLE_UDT_GRANTS];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[ROLE_UDT_GRANTS]);
addColumn(t, "GRANTOR", SQL_IDENTIFIER); // not null
addColumn(t, "GRANTEE", SQL_IDENTIFIER); // not null
addColumn(t, "UDT_CATALOG", SQL_IDENTIFIER);
addColumn(t, "UDT_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "UDT_NAME", SQL_IDENTIFIER); // not null
addColumn(t, "PRIVILEGE_TYPE", CHARACTER_DATA);
addColumn(t, "IS_GRANTABLE", YES_OR_NO); // not null
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[ROLE_UDT_GRANTS].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, null, false);
return t;
}
Session sys = database.sessionManager.newSysSession(
SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
Result rs = sys.executeDirectStatement(
"SELECT U.GRANTOR, U.GRANTEE, U.UDT_CATALOG, U.UDT_SCHEMA, U.UDT_NAME, "
+ "U.PRIVILEGE_TYPE, U.IS_GRANTABLE "
+ "FROM INFORMATION_SCHEMA.UDT_PRIVILEGES U "
+ "JOIN INFORMATION_SCHEMA.APPLICABLE_ROLES ON U.GRANTEE = ROLE_NAME;");
t.insertSys(session, store, rs);
sys.close();
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:74,代码来源:DatabaseInformationFull.java
示例11: SQL_FEATURES
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The SQL_FEATURES view lists the individual features of the SQL Standard
* supported by HyperSQL.<p>
*
*/
Table SQL_FEATURES(Session session, PersistentStore store) {
Table t = sysTables[SQL_FEATURES];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SQL_FEATURES]);
addColumn(t, "FEATURE_ID", CHARACTER_DATA);
addColumn(t, "FEATURE_NAME", CHARACTER_DATA);
addColumn(t, "SUB_FEATURE_ID", CHARACTER_DATA);
addColumn(t, "SUB_FEATURE_NAME", CHARACTER_DATA);
addColumn(t, "IS_SUPPORTED", YES_OR_NO);
addColumn(t, "IS_VERIFIED_BY", CHARACTER_DATA);
addColumn(t, "COMMENTS", CHARACTER_DATA);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[SQL_FEATURES].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[] {
0, 2
}, false);
return 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(session, store, rs);
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:43,代码来源:DatabaseInformationFull.java
示例12: SQL_IMPLEMENTATION_INFO
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The SQL_IMPLEMENTATION_INFO shows some properties and capabilities
* of the database engine .<p>
*
*/
Table SQL_IMPLEMENTATION_INFO(Session session, PersistentStore store) {
Table t = sysTables[SQL_IMPLEMENTATION_INFO];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SQL_IMPLEMENTATION_INFO]);
addColumn(t, "IMPLEMENTATION_INFO_ID", CARDINAL_NUMBER);
addColumn(t, "IMPLEMENTATION_INFO_NAME", CHARACTER_DATA);
addColumn(t, "INTEGER_VALUE", CARDINAL_NUMBER);
addColumn(t, "CHARACTER_VALUE", CHARACTER_DATA);
addColumn(t, "COMMENTS", CHARACTER_DATA);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[SQL_IMPLEMENTATION_INFO].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[]{ 0 }, false);
return t;
}
Session sys = database.sessionManager.newSysSession(
SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
String sql = (String) statementMap.get("/*sql_implementation_info*/");
Result rs = sys.executeDirectStatement(sql);
t.insertSys(session, store, rs);
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:39,代码来源:DatabaseInformationFull.java
示例13: SQL_PACKAGES
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The SQL_PACHAGES view lists the packages of the SQL Standard supported by
* HyperSQL.<p>
*
*/
Table SQL_PACKAGES(Session session, PersistentStore store) {
Table t = sysTables[SQL_PACKAGES];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SQL_PACKAGES]);
addColumn(t, "ID", CHARACTER_DATA);
addColumn(t, "NAME", CHARACTER_DATA);
addColumn(t, "IS_SUPPORTED", YES_OR_NO);
addColumn(t, "IS_VERIFIED_BY", CHARACTER_DATA);
addColumn(t, "COMMENTS", CHARACTER_DATA);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[SQL_PACKAGES].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[]{ 0 }, false);
return 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(session, store, rs);
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:39,代码来源:DatabaseInformationFull.java
示例14: SQL_PARTS
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The SQL_PARTS view lists the parts of the SQL Standard supported by
* HyperSQL.<p>
*
*/
Table SQL_PARTS(Session session, PersistentStore store) {
Table t = sysTables[SQL_PARTS];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SQL_PARTS]);
addColumn(t, "PART", CHARACTER_DATA);
addColumn(t, "NAME", CHARACTER_DATA);
addColumn(t, "IS_SUPPORTED", YES_OR_NO);
addColumn(t, "IS_VERIFIED_BY", CHARACTER_DATA);
addColumn(t, "COMMENTS", CHARACTER_DATA);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[SQL_PARTS].name, false, SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[]{ 0 }, false);
return 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(session, store, rs);
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:38,代码来源:DatabaseInformationFull.java
示例15: SQL_SIZING
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The SQL_SIZING view has one row for the maximum size of each built in
* type supported by HyperSQL.<p>
*
*/
Table SQL_SIZING(Session session, PersistentStore store) {
Table t = sysTables[SQL_SIZING];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SQL_SIZING]);
addColumn(t, "SIZING_ID", CARDINAL_NUMBER);
addColumn(t, "SIZING_NAME", CHARACTER_DATA);
addColumn(t, "SUPPORTED_VALUE", CARDINAL_NUMBER);
addColumn(t, "COMMENTS", CHARACTER_DATA);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[SQL_SIZING].name, false, SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[]{ 0 }, false);
return 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(session, store, rs);
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:37,代码来源:DatabaseInformationFull.java
示例16: ROLE_UDT_GRANTS
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The ROLE_UDT_GRANT view has one row for each privilege granted to each
* user defined type. <p>
*
* <b>Definition:</b><p>
*
* <pre class="SqlCodeExample">
* GRANTOR VARCHAR ,
* GRANTEE VARCHAR ,
* UDT_CATALOG VARCHAR ,
* UDT_SCHEMA VARCHAR ,
* UDT_NAME VARCHAR ,
* PRIVILEGE_TYPE VARCHAR ,
* IS_GRANTABLE VARCHAR ,
* </pre>
*
* <b>Description:</b><p>
*
* <ol>
* <li> The values of GRANTOR is the grantor of the privilege. The value of
* GRANTEE is the name of the ROLE.
*
* <li> The values of UDT_CATALOG, UDT_SCHEMA and
* UDT_NAME are the catalog name, schema name and
* table name, respectively, of the table level grant being
* described. <p>
*
* <li> The value of PRIVILEGE_TYPE is the type of the privilege, including,
* 'USAGE'.
* The value IS_GRANTABLE is 'YES' if the privilege is grantable. <p>
* </ol>
*
* @return Table
*/
Table ROLE_UDT_GRANTS(Session session, PersistentStore store) {
Table t = sysTables[ROLE_UDT_GRANTS];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[ROLE_UDT_GRANTS]);
addColumn(t, "GRANTOR", SQL_IDENTIFIER); // not null
addColumn(t, "GRANTEE", SQL_IDENTIFIER); // not null
addColumn(t, "UDT_CATALOG", SQL_IDENTIFIER);
addColumn(t, "UDT_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "UDT_NAME", SQL_IDENTIFIER); // not null
addColumn(t, "PRIVILEGE_TYPE", CHARACTER_DATA);
addColumn(t, "IS_GRANTABLE", YES_OR_NO); // not null
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[ROLE_TABLE_GRANTS].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, null, false);
return t;
}
Session sys = database.sessionManager.newSysSession(
SqlInvariants.INFORMATION_SCHEMA_HSQLNAME, session.getUser());
Result rs = sys.executeDirectStatement(
"SELECT U.GRANTOR, U.GRANTEE, U.UDT_CATALOG, U.UDT_SCHEMA, U.UDT_NAME, "
+ "U.PRIVILEGE_TYPE, U.IS_GRANTABLE "
+ "FROM INFORMATION_SCHEMA.UDT_PRIVILEGES U "
+ "JOIN INFORMATION_SCHEMA.APPLICABLE_ROLES ON U.GRANTEE = ROLE_NAME;");
t.insertSys(session, store, rs);
sys.close();
return t;
}
开发者ID:Julien35,项目名称:dev-courses,代码行数:74,代码来源:DatabaseInformationFull.java
示例17: TRANSLATIONS
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* SQL:2008 VIEW<p>
*
* The TRANSLATIONS view has one row for each translation between two
* character sets.<p>
*
*/
Table TRANSLATIONS(Session session, PersistentStore store) {
Table t = sysTables[TRANSLATIONS];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[TRANSLATIONS]);
addColumn(t, "TRANSLATION_CATALOG", SQL_IDENTIFIER);
addColumn(t, "TRANSLATION_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "TRANSLATION_NAME", SQL_IDENTIFIER);
addColumn(t, "SOURCE_CHARACTER_SET_CATALOG", SQL_IDENTIFIER);
addColumn(t, "SOURCE_CHARACTER_SET_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "SOURCE_CHARACTER_SET_NAME", SQL_IDENTIFIER);
addColumn(t, "TARGET_CHARACTER_SET_CATALOG", SQL_IDENTIFIER);
addColumn(t, "TARGET_CHARACTER_SET_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "TARGET_CHARACTER_SET_NAME", SQL_IDENTIFIER);
addColumn(t, "TRANSLATION_SOURCE_CATALOG", SQL_IDENTIFIER);
addColumn(t, "TRANSLATION_SOURCE_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "TRANSLATION_SOURCE_NAME", SQL_IDENTIFIER);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[TRANSLATIONS].name, false,
SchemaObject.INDEX);
t.createPrimaryKeyConstraint(name, new int[] {
0, 1, 2
}, false);
return t;
}
return t;
}
开发者ID:tiweGH,项目名称:OpenDiabetes,代码行数:41,代码来源:DatabaseInformationFull.java
示例18: SYSTEM_VERSIONCOLUMNS
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* Retrieves a <code>Table</code> object describing the accessible
* columns that are automatically updated when any value in a row
* is updated. <p>
*
* Each row is a version column description with the following columns: <p>
*
* <OL>
* <LI><B>SCOPE</B> <code>SMALLINT</code> => is not used
* <LI><B>COLUMN_NAME</B> <code>VARCHAR</code> => column name
* <LI><B>DATA_TYPE</B> <code>SMALLINT</code> =>
* SQL data type from java.sql.Types
* <LI><B>TYPE_NAME</B> <code>SMALLINT</code> =>
* Data source dependent type name
* <LI><B>COLUMN_SIZE</B> <code>INTEGER</code> => precision
* <LI><B>BUFFER_LENGTH</B> <code>INTEGER</code> =>
* length of column value in bytes
* <LI><B>DECIMAL_DIGITS</B> <code>SMALLINT</code> => scale
* <LI><B>PSEUDO_COLUMN</B> <code>SMALLINT</code> =>
* is this a pseudo column like an Oracle <code>ROWID</code>:<BR>
* (as defined in <code>java.sql.DatabaseMetadata</code>)
* <UL>
* <LI><code>versionColumnUnknown</code> - may or may not be
* pseudo column
* <LI><code>versionColumnNotPseudo</code> - is NOT a pseudo column
* <LI><code>versionColumnPseudo</code> - is a pseudo column
* </UL>
* </OL> <p>
*
* <B>Note:</B> Currently, the HSQLDB engine does not support version
* columns, so an empty table is returned. <p>
*
* @return a <code>Table</code> object describing the columns
* that are automatically updated when any value
* in a row is updated
*/
Table SYSTEM_VERSIONCOLUMNS() {
Table t = sysTables[SYSTEM_VERSIONCOLUMNS];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[SYSTEM_VERSIONCOLUMNS]);
// ----------------------------------------------------------------
// required by DatabaseMetaData.getVersionColumns result set
// ----------------------------------------------------------------
addColumn(t, "SCOPE", Type.SQL_INTEGER);
addColumn(t, "COLUMN_NAME", SQL_IDENTIFIER); // not null
addColumn(t, "DATA_TYPE", Type.SQL_SMALLINT); // not null
addColumn(t, "TYPE_NAME", SQL_IDENTIFIER); // not null
addColumn(t, "COLUMN_SIZE", Type.SQL_SMALLINT);
addColumn(t, "BUFFER_LENGTH", Type.SQL_INTEGER);
addColumn(t, "DECIMAL_DIGITS", Type.SQL_SMALLINT);
addColumn(t, "PSEUDO_COLUMN", Type.SQL_SMALLINT); // not null
// -----------------------------------------------------------------
// required by DatabaseMetaData.getVersionColumns filter parameters
// -----------------------------------------------------------------
addColumn(t, "TABLE_CAT", SQL_IDENTIFIER);
addColumn(t, "TABLE_SCHEM", SQL_IDENTIFIER);
addColumn(t, "TABLE_NAME", SQL_IDENTIFIER); // not null
// -----------------------------------------------------------------
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[SYSTEM_VERSIONCOLUMNS].name, false,
SchemaObject.INDEX);
t.createPrimaryKey(name, null, false);
return t;
}
return t;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:75,代码来源:DatabaseInformationFull.java
示例19: ADMINISTRABLE_ROLE_AUTHORIZATIONS
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* Returns roles that are grantable by an admin user, which means all the
* roles
*
* @return Table
*/
Table ADMINISTRABLE_ROLE_AUTHORIZATIONS() {
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.createPrimaryKey(name, new int[] {
0, 1, 2
}, false);
return t;
}
if (session.isAdmin()) {
insertRoles(t, session.getGrantee(), true);
}
return t;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:36,代码来源:DatabaseInformationFull.java
示例20: COLUMN_COLUMN_USAGE
import org.hsqldb.HsqlNameManager; //导入依赖的package包/类
/**
* For generated columns
* <p>
*
* @return Table
*/
Table COLUMN_COLUMN_USAGE() {
Table t = sysTables[COLUMN_COLUMN_USAGE];
if (t == null) {
t = createBlankTable(sysTableHsqlNames[COLUMN_COLUMN_USAGE]);
addColumn(t, "TABLE_CATALOG", SQL_IDENTIFIER);
addColumn(t, "TABLE_SCHEMA", SQL_IDENTIFIER);
addColumn(t, "TABLE_NAME", SQL_IDENTIFIER);
addColumn(t, "COLUMN_NAME", SQL_IDENTIFIER);
addColumn(t, "DEPENDENT_COLUMN", SQL_IDENTIFIER);
HsqlName name = HsqlNameManager.newInfoSchemaObjectName(
sysTableHsqlNames[COLUMN_COLUMN_USAGE].name, false,
SchemaObject.INDEX);
t.createPrimaryKey(name, new int[] {
0, 1, 2, 3, 4
}, false);
return t;
}
final int table_catalog = 0;
final int table_schema = 1;
final int table_name = 2;
final int column_name = 3;
final int dependent_column = 4;
return t;
}
开发者ID:s-store,项目名称:sstore-soft,代码行数:39,代码来源:DatabaseInformationFull.java
注:本文中的org.hsqldb.HsqlNameManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论