Class PgDatabaseMetaData
- All Implemented Interfaces:
DatabaseMetaData,Wrapper
-
Field Summary
FieldsFields inherited from interface java.sql.DatabaseMetaData
attributeNoNulls, attributeNullable, attributeNullableUnknown, bestRowNotPseudo, bestRowPseudo, bestRowSession, bestRowTemporary, bestRowTransaction, bestRowUnknown, columnNoNulls, columnNullable, columnNullableUnknown, functionColumnIn, functionColumnInOut, functionColumnOut, functionColumnResult, functionColumnUnknown, functionNoNulls, functionNoTable, functionNullable, functionNullableUnknown, functionResultUnknown, functionReturn, functionReturnsTable, importedKeyCascade, importedKeyInitiallyDeferred, importedKeyInitiallyImmediate, importedKeyNoAction, importedKeyNotDeferrable, importedKeyRestrict, importedKeySetDefault, importedKeySetNull, procedureColumnIn, procedureColumnInOut, procedureColumnOut, procedureColumnResult, procedureColumnReturn, procedureColumnUnknown, procedureNoNulls, procedureNoResult, procedureNullable, procedureNullableUnknown, procedureResultUnknown, procedureReturnsResult, sqlStateSQL, sqlStateSQL99, sqlStateXOpen, tableIndexClustered, tableIndexHashed, tableIndexOther, tableIndexStatistic, typeNoNulls, typeNullable, typeNullableUnknown, typePredBasic, typePredChar, typePredNone, typeSearchable, versionColumnNotPseudo, versionColumnPseudo, versionColumnUnknown -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanprotected StatementbooleanDoes a data definition statement within a transaction force the transaction to commit? It seems to mean something like:booleanbooleandeletesAreDetected(int i) booleanprotected StringTurn the provided value into a valid string literal for direct inclusion into a query.booleangetAttributes(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern, @Nullable String attributeNamePattern) getBestRowIdentifier(@Nullable String catalog, @Nullable String schema, String table, int scope, boolean nullable) getColumnPrivileges(@Nullable String catalog, @Nullable String schema, String table, @Nullable String columnNamePattern) getColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, @Nullable String columnNamePattern) getCrossReference(@Nullable String primaryCatalog, @Nullable String primarySchema, String primaryTable, @Nullable String foreignCatalog, @Nullable String foreignSchema, String foreignTable) intintRetrieves the name of this database product.intintintgetExportedKeys(@Nullable String catalog, @Nullable String schema, String table) getFunctionColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String functionNamePattern, @Nullable String columnNamePattern) getFunctions(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String functionNamePattern) What is the string used to quote SQL identifiers? This returns a space if identifier quoting isn't supported.protected ResultSetgetImportedExportedKeys(@Nullable String primaryCatalog, @Nullable String primarySchema, @Nullable String primaryTable, @Nullable String foreignCatalog, @Nullable String foreignSchema, @Nullable String foreignTable) getImportedKeys(@Nullable String catalog, @Nullable String schema, String table) getIndexInfo(@Nullable String catalog, @Nullable String schema, String tableName, boolean unique, boolean approximate) intintintintintintintintintintintWhat is the maximum number of columns in a table? From the CREATE TABLE reference page...intHow many active connection can we have at a time to this database? Well, since it depends on postmaster, which just does a listen() followed by an accept() and fork(), its basically very high.intprotected intintlongprotected intintintintintintintintintgetPrimaryKeys(@Nullable String catalog, @Nullable String schema, String table) protected ResultSetgetPrimaryUniqueKeys(@Nullable String catalog, @Nullable String schema, String table) getProcedureColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String procedureNamePattern, @Nullable String columnNamePattern) getProcedures(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String procedureNamePattern) getPseudoColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, @Nullable String columnNamePattern) intgetSchemas(@Nullable String catalog, @Nullable String schemaPattern) intgetSuperTables(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern) getSuperTypes(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern) getTablePrivileges(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern) getTables(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, String @Nullable [] types) getUDTs(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern, int @Nullable [] types) getURL()getVersionColumns(@Nullable String catalog, @Nullable String schema, String table) booleaninsertsAreDetected(int type) booleanbooleanbooleanisWrapperFor(Class<?> iface) booleanbooleanbooleanbooleanbooleanbooleanbooleanothersDeletesAreVisible(int i) booleanothersInsertsAreVisible(int type) booleanothersUpdatesAreVisible(int type) booleanownDeletesAreVisible(int type) booleanownInsertsAreVisible(int type) booleanownUpdatesAreVisible(int type) Take the a String representing an array of ACLs and return a Map mapping the SQL permission name to a List of usernames who have that permission.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanDoes this driver support the ANSI-92 entry level SQL grammar? All JDBC Compliant drivers must return true.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleansupportsConvert(int fromType, int toType) booleanDoes this driver support the Core ODBC SQL grammar.booleanbooleanbooleanbooleanbooleanbooleanDoes this driver support the Extended (Level 2) ODBC SQL grammar.booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanDoes the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-Compliant driver will always return false.booleanDoes the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC compliant driver will always return true.booleanbooleanbooleanbooleanbooleanbooleanIn PostgreSQL, Cursors are only open within transactions.booleanbooleanbooleanbooleanbooleanbooleanWe support cursors for gets only it seems.booleanbooleanbooleansupportsResultSetConcurrency(int type, int concurrency) booleansupportsResultSetHoldability(int holdability) booleansupportsResultSetType(int type) booleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleansupportsTransactionIsolationLevel(int level) booleanbooleanboolean<T> TbooleanupdatesAreDetected(int type) booleanDoes the database use a file for each table? Well, not really, since it doesn't use local files.booleanDoes the database store tables in a local file? No - it stores them in a file on the server.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.sql.DatabaseMetaData
supportsSharding
-
Field Details
-
connection
-
-
Constructor Details
-
PgDatabaseMetaData
-
-
Method Details
-
getMaxIndexKeys
- Throws:
SQLException
-
getMaxNameLength
- Throws:
SQLException
-
allProceduresAreCallable
- Specified by:
allProceduresAreCallablein interfaceDatabaseMetaData- Throws:
SQLException
-
allTablesAreSelectable
- Specified by:
allTablesAreSelectablein interfaceDatabaseMetaData- Throws:
SQLException
-
getURL
- Specified by:
getURLin interfaceDatabaseMetaData- Throws:
SQLException
-
getUserName
- Specified by:
getUserNamein interfaceDatabaseMetaData- Throws:
SQLException
-
isReadOnly
- Specified by:
isReadOnlyin interfaceDatabaseMetaData- Throws:
SQLException
-
nullsAreSortedHigh
- Specified by:
nullsAreSortedHighin interfaceDatabaseMetaData- Throws:
SQLException
-
nullsAreSortedLow
- Specified by:
nullsAreSortedLowin interfaceDatabaseMetaData- Throws:
SQLException
-
nullsAreSortedAtStart
- Specified by:
nullsAreSortedAtStartin interfaceDatabaseMetaData- Throws:
SQLException
-
nullsAreSortedAtEnd
- Specified by:
nullsAreSortedAtEndin interfaceDatabaseMetaData- Throws:
SQLException
-
getDatabaseProductName
Retrieves the name of this database product. We hope that it is PostgreSQL, so we return that explicitly.- Specified by:
getDatabaseProductNamein interfaceDatabaseMetaData- Returns:
- "PostgreSQL"
- Throws:
SQLException
-
getDatabaseProductVersion
- Specified by:
getDatabaseProductVersionin interfaceDatabaseMetaData- Throws:
SQLException
-
getDriverName
- Specified by:
getDriverNamein interfaceDatabaseMetaData
-
getDriverVersion
- Specified by:
getDriverVersionin interfaceDatabaseMetaData
-
getDriverMajorVersion
public int getDriverMajorVersion()- Specified by:
getDriverMajorVersionin interfaceDatabaseMetaData
-
getDriverMinorVersion
public int getDriverMinorVersion()- Specified by:
getDriverMinorVersionin interfaceDatabaseMetaData
-
usesLocalFiles
Does the database store tables in a local file? No - it stores them in a file on the server.- Specified by:
usesLocalFilesin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if a database access error occurs
-
usesLocalFilePerTable
Does the database use a file for each table? Well, not really, since it doesn't use local files.- Specified by:
usesLocalFilePerTablein interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if a database access error occurs
-
supportsMixedCaseIdentifiers
Does the database treat mixed case unquoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC-Compliant driver will always return false.- Specified by:
supportsMixedCaseIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if a database access error occurs
-
storesUpperCaseIdentifiers
- Specified by:
storesUpperCaseIdentifiersin interfaceDatabaseMetaData- Throws:
SQLException
-
storesLowerCaseIdentifiers
- Specified by:
storesLowerCaseIdentifiersin interfaceDatabaseMetaData- Throws:
SQLException
-
storesMixedCaseIdentifiers
- Specified by:
storesMixedCaseIdentifiersin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsMixedCaseQuotedIdentifiers
Does the database treat mixed case quoted SQL identifiers as case sensitive and as a result store them in mixed case? A JDBC compliant driver will always return true.- Specified by:
supportsMixedCaseQuotedIdentifiersin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if a database access error occurs
-
storesUpperCaseQuotedIdentifiers
- Specified by:
storesUpperCaseQuotedIdentifiersin interfaceDatabaseMetaData- Throws:
SQLException
-
storesLowerCaseQuotedIdentifiers
- Specified by:
storesLowerCaseQuotedIdentifiersin interfaceDatabaseMetaData- Throws:
SQLException
-
storesMixedCaseQuotedIdentifiers
- Specified by:
storesMixedCaseQuotedIdentifiersin interfaceDatabaseMetaData- Throws:
SQLException
-
getIdentifierQuoteString
What is the string used to quote SQL identifiers? This returns a space if identifier quoting isn't supported. A JDBC Compliant driver will always use a double quote character.- Specified by:
getIdentifierQuoteStringin interfaceDatabaseMetaData- Returns:
- the quoting string
- Throws:
SQLException- if a database access error occurs
-
getSQLKeywords
From PostgreSQL 9.0+ return the keywords from pg_catalog.pg_get_keywords()
- Specified by:
getSQLKeywordsin interfaceDatabaseMetaData- Returns:
- a comma separated list of keywords we use
- Throws:
SQLException- if a database access error occurs
-
getNumericFunctions
- Specified by:
getNumericFunctionsin interfaceDatabaseMetaData- Throws:
SQLException
-
getStringFunctions
- Specified by:
getStringFunctionsin interfaceDatabaseMetaData- Throws:
SQLException
-
getSystemFunctions
- Specified by:
getSystemFunctionsin interfaceDatabaseMetaData- Throws:
SQLException
-
getTimeDateFunctions
- Specified by:
getTimeDateFunctionsin interfaceDatabaseMetaData- Throws:
SQLException
-
getSearchStringEscape
- Specified by:
getSearchStringEscapein interfaceDatabaseMetaData- Throws:
SQLException
-
getExtraNameCharacters
Postgresql allows any high-bit character to be used in an unquoted identifier, so we can't possibly list them all.
From the file src/backend/parser/scan.l, an identifier is ident_start [A-Za-z\200-\377_] ident_cont [A-Za-z\200-\377_0-9\$] identifier {ident_start}{ident_cont}*
- Specified by:
getExtraNameCharactersin interfaceDatabaseMetaData- Returns:
- a string containing the extra characters
- Throws:
SQLException- if a database access error occurs
-
supportsAlterTableWithAddColumn
- Specified by:
supportsAlterTableWithAddColumnin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 6.1+
- Throws:
SQLException
-
supportsAlterTableWithDropColumn
- Specified by:
supportsAlterTableWithDropColumnin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsColumnAliasing
- Specified by:
supportsColumnAliasingin interfaceDatabaseMetaData- Throws:
SQLException
-
nullPlusNonNullIsNull
- Specified by:
nullPlusNonNullIsNullin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsConvert
- Specified by:
supportsConvertin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsConvert
- Specified by:
supportsConvertin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsTableCorrelationNames
- Specified by:
supportsTableCorrelationNamesin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsDifferentTableCorrelationNames
- Specified by:
supportsDifferentTableCorrelationNamesin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsExpressionsInOrderBy
- Specified by:
supportsExpressionsInOrderByin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsGroupBy
- Specified by:
supportsGroupByin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsGroupByBeyondSelect
- Specified by:
supportsGroupByBeyondSelectin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsLikeEscapeClause
- Specified by:
supportsLikeEscapeClausein interfaceDatabaseMetaData- Throws:
SQLException
-
supportsMultipleResultSets
- Specified by:
supportsMultipleResultSetsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsMultipleTransactions
- Specified by:
supportsMultipleTransactionsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsNonNullableColumns
- Specified by:
supportsNonNullableColumnsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsMinimumSQLGrammar
This grammar is defined at: http://www.microsoft.com/msdn/sdk/platforms/doc/odbc/src/intropr.htm
In Appendix C. From this description, we seem to support the ODBC minimal (Level 0) grammar.
- Specified by:
supportsMinimumSQLGrammarin interfaceDatabaseMetaData- Returns:
- true
- Throws:
SQLException
-
supportsCoreSQLGrammar
Does this driver support the Core ODBC SQL grammar. We need SQL-92 conformance for this.- Specified by:
supportsCoreSQLGrammarin interfaceDatabaseMetaData- Returns:
- false
- Throws:
SQLException- if a database access error occurs
-
supportsExtendedSQLGrammar
Does this driver support the Extended (Level 2) ODBC SQL grammar. We don't conform to the Core (Level 1), so we can't conform to the Extended SQL Grammar.- Specified by:
supportsExtendedSQLGrammarin interfaceDatabaseMetaData- Returns:
- false
- Throws:
SQLException- if a database access error occurs
-
supportsANSI92EntryLevelSQL
Does this driver support the ANSI-92 entry level SQL grammar? All JDBC Compliant drivers must return true. We currently report false until 'schema' support is added. Then this should be changed to return true, since we will be mostly compliant (probably more compliant than many other databases) And since this is a requirement for all JDBC drivers we need to get to the point where we can return true.- Specified by:
supportsANSI92EntryLevelSQLin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException- if a database access error occurs
-
supportsANSI92IntermediateSQL
- Specified by:
supportsANSI92IntermediateSQLin interfaceDatabaseMetaData- Returns:
- false
- Throws:
SQLException
-
supportsANSI92FullSQL
- Specified by:
supportsANSI92FullSQLin interfaceDatabaseMetaData- Returns:
- false
- Throws:
SQLException
-
supportsIntegrityEnhancementFacility
- Specified by:
supportsIntegrityEnhancementFacilityin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsOuterJoins
- Specified by:
supportsOuterJoinsin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
SQLException
-
supportsFullOuterJoins
- Specified by:
supportsFullOuterJoinsin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
SQLException
-
supportsLimitedOuterJoins
- Specified by:
supportsLimitedOuterJoinsin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
SQLException
-
getSchemaTerm
PostgreSQL doesn't have schemas, but when it does, we'll use the term "schema".
- Specified by:
getSchemaTermin interfaceDatabaseMetaData- Returns:
"schema"- Throws:
SQLException
-
getProcedureTerm
- Specified by:
getProcedureTermin interfaceDatabaseMetaData- Returns:
"function"- Throws:
SQLException
-
getCatalogTerm
- Specified by:
getCatalogTermin interfaceDatabaseMetaData- Returns:
"database"- Throws:
SQLException
-
isCatalogAtStart
- Specified by:
isCatalogAtStartin interfaceDatabaseMetaData- Throws:
SQLException
-
getCatalogSeparator
- Specified by:
getCatalogSeparatorin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsSchemasInDataManipulation
- Specified by:
supportsSchemasInDataManipulationin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsSchemasInProcedureCalls
- Specified by:
supportsSchemasInProcedureCallsin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsSchemasInTableDefinitions
- Specified by:
supportsSchemasInTableDefinitionsin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsSchemasInIndexDefinitions
- Specified by:
supportsSchemasInIndexDefinitionsin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsSchemasInPrivilegeDefinitions
- Specified by:
supportsSchemasInPrivilegeDefinitionsin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsCatalogsInDataManipulation
- Specified by:
supportsCatalogsInDataManipulationin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsCatalogsInProcedureCalls
- Specified by:
supportsCatalogsInProcedureCallsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsCatalogsInTableDefinitions
- Specified by:
supportsCatalogsInTableDefinitionsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsCatalogsInIndexDefinitions
- Specified by:
supportsCatalogsInIndexDefinitionsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsCatalogsInPrivilegeDefinitions
- Specified by:
supportsCatalogsInPrivilegeDefinitionsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsPositionedDelete
We support cursors for gets only it seems. I dont see a method to get a positioned delete.- Specified by:
supportsPositionedDeletein interfaceDatabaseMetaData- Returns:
- false
- Throws:
SQLException- if a database access error occurs
-
supportsPositionedUpdate
- Specified by:
supportsPositionedUpdatein interfaceDatabaseMetaData- Throws:
SQLException
-
supportsSelectForUpdate
- Specified by:
supportsSelectForUpdatein interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 6.5+
- Throws:
SQLException
-
supportsStoredProcedures
- Specified by:
supportsStoredProceduresin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsSubqueriesInComparisons
- Specified by:
supportsSubqueriesInComparisonsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsSubqueriesInExists
- Specified by:
supportsSubqueriesInExistsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsSubqueriesInIns
- Specified by:
supportsSubqueriesInInsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsSubqueriesInQuantifieds
- Specified by:
supportsSubqueriesInQuantifiedsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsUnion
- Specified by:
supportsUnionin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 6.3+
- Throws:
SQLException
-
supportsUnionAll
- Specified by:
supportsUnionAllin interfaceDatabaseMetaData- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
SQLException
-
supportsOpenCursorsAcrossCommit
In PostgreSQL, Cursors are only open within transactions.- Specified by:
supportsOpenCursorsAcrossCommitin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsOpenCursorsAcrossRollback
- Specified by:
supportsOpenCursorsAcrossRollbackin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsOpenStatementsAcrossCommit
Can statements remain open across commits? They may, but this driver cannot guarantee that. In further reflection. we are talking a Statement object here, so the answer is yes, since the Statement is only a vehicle to ExecSQL()
- Specified by:
supportsOpenStatementsAcrossCommitin interfaceDatabaseMetaData- Returns:
- true
- Throws:
SQLException
-
supportsOpenStatementsAcrossRollback
Can statements remain open across rollbacks? They may, but this driver cannot guarantee that. In further contemplation, we are talking a Statement object here, so the answer is yes, since the Statement is only a vehicle to ExecSQL() in Connection
- Specified by:
supportsOpenStatementsAcrossRollbackin interfaceDatabaseMetaData- Returns:
- true
- Throws:
SQLException
-
getMaxCharLiteralLength
- Specified by:
getMaxCharLiteralLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxBinaryLiteralLength
- Specified by:
getMaxBinaryLiteralLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxColumnNameLength
- Specified by:
getMaxColumnNameLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxColumnsInGroupBy
- Specified by:
getMaxColumnsInGroupByin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxColumnsInIndex
- Specified by:
getMaxColumnsInIndexin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxColumnsInOrderBy
- Specified by:
getMaxColumnsInOrderByin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxColumnsInSelect
- Specified by:
getMaxColumnsInSelectin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxColumnsInTable
What is the maximum number of columns in a table? From the CREATE TABLE reference page..."The new class is created as a heap with no initial data. A class can have no more than 1600 attributes (realistically, this is limited by the fact that tuple sizes must be less than 8192 bytes)..."
- Specified by:
getMaxColumnsInTablein interfaceDatabaseMetaData- Returns:
- the max columns
- Throws:
SQLException- if a database access error occurs
-
getMaxConnections
How many active connection can we have at a time to this database? Well, since it depends on postmaster, which just does a listen() followed by an accept() and fork(), its basically very high. Unless the system runs out of processes, it can be 65535 (the number of aux. ports on a TCP/IP system). I will return 8192 since that is what even the largest system can realistically handle,- Specified by:
getMaxConnectionsin interfaceDatabaseMetaData- Returns:
- the maximum number of connections
- Throws:
SQLException- if a database access error occurs
-
getMaxCursorNameLength
- Specified by:
getMaxCursorNameLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxIndexLength
- Specified by:
getMaxIndexLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxSchemaNameLength
- Specified by:
getMaxSchemaNameLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxProcedureNameLength
- Specified by:
getMaxProcedureNameLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxCatalogNameLength
- Specified by:
getMaxCatalogNameLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxRowSize
- Specified by:
getMaxRowSizein interfaceDatabaseMetaData- Throws:
SQLException
-
doesMaxRowSizeIncludeBlobs
- Specified by:
doesMaxRowSizeIncludeBlobsin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxStatementLength
- Specified by:
getMaxStatementLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxStatements
- Specified by:
getMaxStatementsin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxTableNameLength
- Specified by:
getMaxTableNameLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxTablesInSelect
- Specified by:
getMaxTablesInSelectin interfaceDatabaseMetaData- Throws:
SQLException
-
getMaxUserNameLength
- Specified by:
getMaxUserNameLengthin interfaceDatabaseMetaData- Throws:
SQLException
-
getDefaultTransactionIsolation
- Specified by:
getDefaultTransactionIsolationin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsTransactions
- Specified by:
supportsTransactionsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsTransactionIsolationLevel
We only support TRANSACTION_SERIALIZABLE and TRANSACTION_READ_COMMITTED before 8.0; from 8.0 READ_UNCOMMITTED and REPEATABLE_READ are accepted aliases for READ_COMMITTED.
- Specified by:
supportsTransactionIsolationLevelin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsDataDefinitionAndDataManipulationTransactions
- Specified by:
supportsDataDefinitionAndDataManipulationTransactionsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsDataManipulationTransactionsOnly
- Specified by:
supportsDataManipulationTransactionsOnlyin interfaceDatabaseMetaData- Throws:
SQLException
-
dataDefinitionCausesTransactionCommit
Does a data definition statement within a transaction force the transaction to commit? It seems to mean something like:
CREATE TABLE T (A INT); INSERT INTO T (A) VALUES (2); BEGIN; UPDATE T SET A = A + 1; CREATE TABLE X (A INT); SELECT A FROM T INTO X; COMMIT;
Does the CREATE TABLE call cause a commit? The answer is no.
- Specified by:
dataDefinitionCausesTransactionCommitin interfaceDatabaseMetaData- Returns:
- true if so
- Throws:
SQLException- if a database access error occurs
-
dataDefinitionIgnoredInTransactions
- Specified by:
dataDefinitionIgnoredInTransactionsin interfaceDatabaseMetaData- Throws:
SQLException
-
escapeQuotes
Turn the provided value into a valid string literal for direct inclusion into a query. This includes the single quotes needed around it.- Parameters:
s- input value- Returns:
- string literal for direct inclusion into a query
- Throws:
SQLException- if something wrong happens
-
getProcedures
public ResultSet getProcedures(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String procedureNamePattern) throws SQLException - Specified by:
getProceduresin interfaceDatabaseMetaData- Throws:
SQLException
-
getProcedureColumns
public ResultSet getProcedureColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String procedureNamePattern, @Nullable String columnNamePattern) throws SQLException - Specified by:
getProcedureColumnsin interfaceDatabaseMetaData- Throws:
SQLException
-
getTables
public ResultSet getTables(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, String @Nullable [] types) throws SQLException - Specified by:
getTablesin interfaceDatabaseMetaData- Throws:
SQLException
-
getSchemas
- Specified by:
getSchemasin interfaceDatabaseMetaData- Throws:
SQLException
-
getSchemas
public ResultSet getSchemas(@Nullable String catalog, @Nullable String schemaPattern) throws SQLException - Specified by:
getSchemasin interfaceDatabaseMetaData- Throws:
SQLException
-
getCatalogs
- Specified by:
getCatalogsin interfaceDatabaseMetaData- Throws:
SQLException
-
getTableTypes
- Specified by:
getTableTypesin interfaceDatabaseMetaData- Throws:
SQLException
-
getColumns
public ResultSet getColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, @Nullable String columnNamePattern) throws SQLException - Specified by:
getColumnsin interfaceDatabaseMetaData- Throws:
SQLException
-
getColumnPrivileges
public ResultSet getColumnPrivileges(@Nullable String catalog, @Nullable String schema, String table, @Nullable String columnNamePattern) throws SQLException - Specified by:
getColumnPrivilegesin interfaceDatabaseMetaData- Throws:
SQLException
-
getTablePrivileges
public ResultSet getTablePrivileges(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern) throws SQLException - Specified by:
getTablePrivilegesin interfaceDatabaseMetaData- Throws:
SQLException
-
parseACL
public Map<String,Map<String, parseACLList<@Nullable String[]>>> (@Nullable String aclArray, String owner) Take the a String representing an array of ACLs and return a Map mapping the SQL permission name to a List of usernames who have that permission. For instance:SELECT -> user1 -> list of [grantor, grantable]- Parameters:
aclArray- ACL arrayowner- owner- Returns:
- a Map mapping the SQL permission name
-
getBestRowIdentifier
public ResultSet getBestRowIdentifier(@Nullable String catalog, @Nullable String schema, String table, int scope, boolean nullable) throws SQLException - Specified by:
getBestRowIdentifierin interfaceDatabaseMetaData- Throws:
SQLException
-
getVersionColumns
public ResultSet getVersionColumns(@Nullable String catalog, @Nullable String schema, String table) throws SQLException - Specified by:
getVersionColumnsin interfaceDatabaseMetaData- Throws:
SQLException
-
getPrimaryKeys
public ResultSet getPrimaryKeys(@Nullable String catalog, @Nullable String schema, String table) throws SQLException - Specified by:
getPrimaryKeysin interfaceDatabaseMetaData- Throws:
SQLException
-
getPrimaryUniqueKeys
protected ResultSet getPrimaryUniqueKeys(@Nullable String catalog, @Nullable String schema, String table) throws SQLException - Throws:
SQLException
-
getImportedExportedKeys
protected ResultSet getImportedExportedKeys(@Nullable String primaryCatalog, @Nullable String primarySchema, @Nullable String primaryTable, @Nullable String foreignCatalog, @Nullable String foreignSchema, @Nullable String foreignTable) throws SQLException - Parameters:
primaryCatalog- primary catalogprimarySchema- primary schemaprimaryTable- if provided will get the keys exported by this tableforeignCatalog- foreign catalogforeignSchema- foreign schemaforeignTable- if provided will get the keys imported by this table- Returns:
- ResultSet
- Throws:
SQLException- if something wrong happens
-
getImportedKeys
public ResultSet getImportedKeys(@Nullable String catalog, @Nullable String schema, String table) throws SQLException - Specified by:
getImportedKeysin interfaceDatabaseMetaData- Throws:
SQLException
-
getExportedKeys
public ResultSet getExportedKeys(@Nullable String catalog, @Nullable String schema, String table) throws SQLException - Specified by:
getExportedKeysin interfaceDatabaseMetaData- Throws:
SQLException
-
getCrossReference
public ResultSet getCrossReference(@Nullable String primaryCatalog, @Nullable String primarySchema, String primaryTable, @Nullable String foreignCatalog, @Nullable String foreignSchema, String foreignTable) throws SQLException - Specified by:
getCrossReferencein interfaceDatabaseMetaData- Throws:
SQLException
-
getTypeInfo
- Specified by:
getTypeInfoin interfaceDatabaseMetaData- Throws:
SQLException
-
getIndexInfo
public ResultSet getIndexInfo(@Nullable String catalog, @Nullable String schema, String tableName, boolean unique, boolean approximate) throws SQLException - Specified by:
getIndexInfoin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsResultSetType
- Specified by:
supportsResultSetTypein interfaceDatabaseMetaData- Throws:
SQLException
-
supportsResultSetConcurrency
- Specified by:
supportsResultSetConcurrencyin interfaceDatabaseMetaData- Throws:
SQLException
-
ownUpdatesAreVisible
- Specified by:
ownUpdatesAreVisiblein interfaceDatabaseMetaData- Throws:
SQLException
-
ownDeletesAreVisible
- Specified by:
ownDeletesAreVisiblein interfaceDatabaseMetaData- Throws:
SQLException
-
ownInsertsAreVisible
- Specified by:
ownInsertsAreVisiblein interfaceDatabaseMetaData- Throws:
SQLException
-
othersUpdatesAreVisible
- Specified by:
othersUpdatesAreVisiblein interfaceDatabaseMetaData- Throws:
SQLException
-
othersDeletesAreVisible
- Specified by:
othersDeletesAreVisiblein interfaceDatabaseMetaData- Throws:
SQLException
-
othersInsertsAreVisible
- Specified by:
othersInsertsAreVisiblein interfaceDatabaseMetaData- Throws:
SQLException
-
updatesAreDetected
- Specified by:
updatesAreDetectedin interfaceDatabaseMetaData- Throws:
SQLException
-
deletesAreDetected
- Specified by:
deletesAreDetectedin interfaceDatabaseMetaData- Throws:
SQLException
-
insertsAreDetected
- Specified by:
insertsAreDetectedin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsBatchUpdates
- Specified by:
supportsBatchUpdatesin interfaceDatabaseMetaData- Throws:
SQLException
-
getUDTs
public ResultSet getUDTs(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern, int @Nullable [] types) throws SQLException - Specified by:
getUDTsin interfaceDatabaseMetaData- Throws:
SQLException
-
getConnection
- Specified by:
getConnectionin interfaceDatabaseMetaData- Throws:
SQLException
-
createMetaDataStatement
- Throws:
SQLException
-
getMaxLogicalLobSize
- Specified by:
getMaxLogicalLobSizein interfaceDatabaseMetaData- Throws:
SQLException
-
supportsRefCursors
- Specified by:
supportsRefCursorsin interfaceDatabaseMetaData- Throws:
SQLException
-
getRowIdLifetime
- Specified by:
getRowIdLifetimein interfaceDatabaseMetaData- Throws:
SQLException
-
supportsStoredFunctionsUsingCallSyntax
- Specified by:
supportsStoredFunctionsUsingCallSyntaxin interfaceDatabaseMetaData- Throws:
SQLException
-
autoCommitFailureClosesAllResultSets
- Specified by:
autoCommitFailureClosesAllResultSetsin interfaceDatabaseMetaData- Throws:
SQLException
-
getClientInfoProperties
- Specified by:
getClientInfoPropertiesin interfaceDatabaseMetaData- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperForin interfaceWrapper- Throws:
SQLException
-
unwrap
- Specified by:
unwrapin interfaceWrapper- Throws:
SQLException
-
getFunctions
public ResultSet getFunctions(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String functionNamePattern) throws SQLException - Specified by:
getFunctionsin interfaceDatabaseMetaData- Throws:
SQLException
-
getFunctionColumns
public ResultSet getFunctionColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String functionNamePattern, @Nullable String columnNamePattern) throws SQLException - Specified by:
getFunctionColumnsin interfaceDatabaseMetaData- Throws:
SQLException
-
getPseudoColumns
public ResultSet getPseudoColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, @Nullable String columnNamePattern) throws SQLException - Specified by:
getPseudoColumnsin interfaceDatabaseMetaData- Throws:
SQLException
-
generatedKeyAlwaysReturned
- Specified by:
generatedKeyAlwaysReturnedin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsSavepoints
- Specified by:
supportsSavepointsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsNamedParameters
- Specified by:
supportsNamedParametersin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsMultipleOpenResults
- Specified by:
supportsMultipleOpenResultsin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsGetGeneratedKeys
- Specified by:
supportsGetGeneratedKeysin interfaceDatabaseMetaData- Throws:
SQLException
-
getSuperTypes
public ResultSet getSuperTypes(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern) throws SQLException - Specified by:
getSuperTypesin interfaceDatabaseMetaData- Throws:
SQLException
-
getSuperTables
public ResultSet getSuperTables(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern) throws SQLException - Specified by:
getSuperTablesin interfaceDatabaseMetaData- Throws:
SQLException
-
getAttributes
public ResultSet getAttributes(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern, @Nullable String attributeNamePattern) throws SQLException - Specified by:
getAttributesin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsResultSetHoldability
- Specified by:
supportsResultSetHoldabilityin interfaceDatabaseMetaData- Throws:
SQLException
-
getResultSetHoldability
- Specified by:
getResultSetHoldabilityin interfaceDatabaseMetaData- Throws:
SQLException
-
getDatabaseMajorVersion
- Specified by:
getDatabaseMajorVersionin interfaceDatabaseMetaData- Throws:
SQLException
-
getDatabaseMinorVersion
- Specified by:
getDatabaseMinorVersionin interfaceDatabaseMetaData- Throws:
SQLException
-
getJDBCMajorVersion
public int getJDBCMajorVersion()- Specified by:
getJDBCMajorVersionin interfaceDatabaseMetaData
-
getJDBCMinorVersion
public int getJDBCMinorVersion()- Specified by:
getJDBCMinorVersionin interfaceDatabaseMetaData
-
getSQLStateType
- Specified by:
getSQLStateTypein interfaceDatabaseMetaData- Throws:
SQLException
-
locatorsUpdateCopy
- Specified by:
locatorsUpdateCopyin interfaceDatabaseMetaData- Throws:
SQLException
-
supportsStatementPooling
- Specified by:
supportsStatementPoolingin interfaceDatabaseMetaData- Throws:
SQLException
-