Class PgDatabaseMetaData
- All Implemented Interfaces:
DatabaseMetaData
,Wrapper
-
Field Summary
Fields 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
-
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
boolean
protected Statement
boolean
Does a data definition statement within a transaction force the transaction to commit? It seems to mean something like:boolean
boolean
deletesAreDetected
(int i) boolean
protected String
Turn the provided value into a valid string literal for direct inclusion into a query.boolean
getAttributes
(@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) int
int
Retrieves the name of this database product.int
int
int
getExportedKeys
(@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 ResultSet
getImportedExportedKeys
(@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) int
int
int
int
int
int
int
int
int
int
int
What is the maximum number of columns in a table? From the CREATE TABLE reference page...int
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.int
protected int
int
long
protected int
int
int
int
int
int
int
int
int
getPrimaryKeys
(@Nullable String catalog, @Nullable String schema, String table) protected ResultSet
getPrimaryUniqueKeys
(@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) int
getSchemas
(@Nullable String catalog, @Nullable String schemaPattern) int
getSuperTables
(@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) boolean
insertsAreDetected
(int type) boolean
boolean
boolean
isWrapperFor
(Class<?> iface) boolean
boolean
boolean
boolean
boolean
boolean
boolean
othersDeletesAreVisible
(int i) boolean
othersInsertsAreVisible
(int type) boolean
othersUpdatesAreVisible
(int type) boolean
ownDeletesAreVisible
(int type) boolean
ownInsertsAreVisible
(int type) boolean
ownUpdatesAreVisible
(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.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
Does this driver support the ANSI-92 entry level SQL grammar? All JDBC Compliant drivers must return true.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
supportsConvert
(int fromType, int toType) boolean
Does this driver support the Core ODBC SQL grammar.boolean
boolean
boolean
boolean
boolean
boolean
Does this driver support the Extended (Level 2) ODBC SQL grammar.boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
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.boolean
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.boolean
boolean
boolean
boolean
boolean
boolean
In PostgreSQL, Cursors are only open within transactions.boolean
boolean
boolean
boolean
boolean
boolean
We support cursors for gets only it seems.boolean
boolean
boolean
supportsResultSetConcurrency
(int type, int concurrency) boolean
supportsResultSetHoldability
(int holdability) boolean
supportsResultSetType
(int type) boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
boolean
supportsTransactionIsolationLevel
(int level) boolean
boolean
boolean
<T> T
boolean
updatesAreDetected
(int type) boolean
Does the database use a file for each table? Well, not really, since it doesn't use local files.boolean
Does 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, wait
Methods inherited from interface java.sql.DatabaseMetaData
supportsSharding
-
Field Details
-
connection
-
-
Constructor Details
-
PgDatabaseMetaData
-
-
Method Details
-
getMaxIndexKeys
- Throws:
SQLException
-
getMaxNameLength
- Throws:
SQLException
-
allProceduresAreCallable
- Specified by:
allProceduresAreCallable
in interfaceDatabaseMetaData
- Throws:
SQLException
-
allTablesAreSelectable
- Specified by:
allTablesAreSelectable
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getURL
- Specified by:
getURL
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getUserName
- Specified by:
getUserName
in interfaceDatabaseMetaData
- Throws:
SQLException
-
isReadOnly
- Specified by:
isReadOnly
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullsAreSortedHigh
- Specified by:
nullsAreSortedHigh
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullsAreSortedLow
- Specified by:
nullsAreSortedLow
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullsAreSortedAtStart
- Specified by:
nullsAreSortedAtStart
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullsAreSortedAtEnd
- Specified by:
nullsAreSortedAtEnd
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDatabaseProductName
Retrieves the name of this database product. We hope that it is PostgreSQL, so we return that explicitly.- Specified by:
getDatabaseProductName
in interfaceDatabaseMetaData
- Returns:
- "PostgreSQL"
- Throws:
SQLException
-
getDatabaseProductVersion
- Specified by:
getDatabaseProductVersion
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDriverName
- Specified by:
getDriverName
in interfaceDatabaseMetaData
-
getDriverVersion
- Specified by:
getDriverVersion
in interfaceDatabaseMetaData
-
getDriverMajorVersion
public int getDriverMajorVersion()- Specified by:
getDriverMajorVersion
in interfaceDatabaseMetaData
-
getDriverMinorVersion
public int getDriverMinorVersion()- Specified by:
getDriverMinorVersion
in interfaceDatabaseMetaData
-
usesLocalFiles
Does the database store tables in a local file? No - it stores them in a file on the server.- Specified by:
usesLocalFiles
in 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:
usesLocalFilePerTable
in 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:
supportsMixedCaseIdentifiers
in interfaceDatabaseMetaData
- Returns:
- true if so
- Throws:
SQLException
- if a database access error occurs
-
storesUpperCaseIdentifiers
- Specified by:
storesUpperCaseIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesLowerCaseIdentifiers
- Specified by:
storesLowerCaseIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesMixedCaseIdentifiers
- Specified by:
storesMixedCaseIdentifiers
in 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:
supportsMixedCaseQuotedIdentifiers
in interfaceDatabaseMetaData
- Returns:
- true if so
- Throws:
SQLException
- if a database access error occurs
-
storesUpperCaseQuotedIdentifiers
- Specified by:
storesUpperCaseQuotedIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesLowerCaseQuotedIdentifiers
- Specified by:
storesLowerCaseQuotedIdentifiers
in interfaceDatabaseMetaData
- Throws:
SQLException
-
storesMixedCaseQuotedIdentifiers
- Specified by:
storesMixedCaseQuotedIdentifiers
in 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:
getIdentifierQuoteString
in 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:
getSQLKeywords
in interfaceDatabaseMetaData
- Returns:
- a comma separated list of keywords we use
- Throws:
SQLException
- if a database access error occurs
-
getNumericFunctions
- Specified by:
getNumericFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getStringFunctions
- Specified by:
getStringFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSystemFunctions
- Specified by:
getSystemFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTimeDateFunctions
- Specified by:
getTimeDateFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSearchStringEscape
- Specified by:
getSearchStringEscape
in 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:
getExtraNameCharacters
in interfaceDatabaseMetaData
- Returns:
- a string containing the extra characters
- Throws:
SQLException
- if a database access error occurs
-
supportsAlterTableWithAddColumn
- Specified by:
supportsAlterTableWithAddColumn
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 6.1+
- Throws:
SQLException
-
supportsAlterTableWithDropColumn
- Specified by:
supportsAlterTableWithDropColumn
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsColumnAliasing
- Specified by:
supportsColumnAliasing
in interfaceDatabaseMetaData
- Throws:
SQLException
-
nullPlusNonNullIsNull
- Specified by:
nullPlusNonNullIsNull
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsConvert
- Specified by:
supportsConvert
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsConvert
- Specified by:
supportsConvert
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsTableCorrelationNames
- Specified by:
supportsTableCorrelationNames
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsDifferentTableCorrelationNames
- Specified by:
supportsDifferentTableCorrelationNames
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsExpressionsInOrderBy
- Specified by:
supportsExpressionsInOrderBy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsGroupBy
- Specified by:
supportsGroupBy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsGroupByBeyondSelect
- Specified by:
supportsGroupByBeyondSelect
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsLikeEscapeClause
- Specified by:
supportsLikeEscapeClause
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMultipleResultSets
- Specified by:
supportsMultipleResultSets
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMultipleTransactions
- Specified by:
supportsMultipleTransactions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsNonNullableColumns
- Specified by:
supportsNonNullableColumns
in 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:
supportsMinimumSQLGrammar
in interfaceDatabaseMetaData
- Returns:
- true
- Throws:
SQLException
-
supportsCoreSQLGrammar
Does this driver support the Core ODBC SQL grammar. We need SQL-92 conformance for this.- Specified by:
supportsCoreSQLGrammar
in 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:
supportsExtendedSQLGrammar
in 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:
supportsANSI92EntryLevelSQL
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
- if a database access error occurs
-
supportsANSI92IntermediateSQL
- Specified by:
supportsANSI92IntermediateSQL
in interfaceDatabaseMetaData
- Returns:
- false
- Throws:
SQLException
-
supportsANSI92FullSQL
- Specified by:
supportsANSI92FullSQL
in interfaceDatabaseMetaData
- Returns:
- false
- Throws:
SQLException
-
supportsIntegrityEnhancementFacility
- Specified by:
supportsIntegrityEnhancementFacility
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsOuterJoins
- Specified by:
supportsOuterJoins
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
SQLException
-
supportsFullOuterJoins
- Specified by:
supportsFullOuterJoins
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
SQLException
-
supportsLimitedOuterJoins
- Specified by:
supportsLimitedOuterJoins
in 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:
getSchemaTerm
in interfaceDatabaseMetaData
- Returns:
"schema"
- Throws:
SQLException
-
getProcedureTerm
- Specified by:
getProcedureTerm
in interfaceDatabaseMetaData
- Returns:
"function"
- Throws:
SQLException
-
getCatalogTerm
- Specified by:
getCatalogTerm
in interfaceDatabaseMetaData
- Returns:
"database"
- Throws:
SQLException
-
isCatalogAtStart
- Specified by:
isCatalogAtStart
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getCatalogSeparator
- Specified by:
getCatalogSeparator
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSchemasInDataManipulation
- Specified by:
supportsSchemasInDataManipulation
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsSchemasInProcedureCalls
- Specified by:
supportsSchemasInProcedureCalls
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsSchemasInTableDefinitions
- Specified by:
supportsSchemasInTableDefinitions
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsSchemasInIndexDefinitions
- Specified by:
supportsSchemasInIndexDefinitions
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsSchemasInPrivilegeDefinitions
- Specified by:
supportsSchemasInPrivilegeDefinitions
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.3+
- Throws:
SQLException
-
supportsCatalogsInDataManipulation
- Specified by:
supportsCatalogsInDataManipulation
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInProcedureCalls
- Specified by:
supportsCatalogsInProcedureCalls
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInTableDefinitions
- Specified by:
supportsCatalogsInTableDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInIndexDefinitions
- Specified by:
supportsCatalogsInIndexDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsCatalogsInPrivilegeDefinitions
- Specified by:
supportsCatalogsInPrivilegeDefinitions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsPositionedDelete
We support cursors for gets only it seems. I dont see a method to get a positioned delete.- Specified by:
supportsPositionedDelete
in interfaceDatabaseMetaData
- Returns:
- false
- Throws:
SQLException
- if a database access error occurs
-
supportsPositionedUpdate
- Specified by:
supportsPositionedUpdate
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSelectForUpdate
- Specified by:
supportsSelectForUpdate
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 6.5+
- Throws:
SQLException
-
supportsStoredProcedures
- Specified by:
supportsStoredProcedures
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSubqueriesInComparisons
- Specified by:
supportsSubqueriesInComparisons
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSubqueriesInExists
- Specified by:
supportsSubqueriesInExists
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSubqueriesInIns
- Specified by:
supportsSubqueriesInIns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSubqueriesInQuantifieds
- Specified by:
supportsSubqueriesInQuantifieds
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsUnion
- Specified by:
supportsUnion
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 6.3+
- Throws:
SQLException
-
supportsUnionAll
- Specified by:
supportsUnionAll
in interfaceDatabaseMetaData
- Returns:
- true if connected to PostgreSQL 7.1+
- Throws:
SQLException
-
supportsOpenCursorsAcrossCommit
In PostgreSQL, Cursors are only open within transactions.- Specified by:
supportsOpenCursorsAcrossCommit
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsOpenCursorsAcrossRollback
- Specified by:
supportsOpenCursorsAcrossRollback
in 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:
supportsOpenStatementsAcrossCommit
in 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:
supportsOpenStatementsAcrossRollback
in interfaceDatabaseMetaData
- Returns:
- true
- Throws:
SQLException
-
getMaxCharLiteralLength
- Specified by:
getMaxCharLiteralLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxBinaryLiteralLength
- Specified by:
getMaxBinaryLiteralLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnNameLength
- Specified by:
getMaxColumnNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnsInGroupBy
- Specified by:
getMaxColumnsInGroupBy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnsInIndex
- Specified by:
getMaxColumnsInIndex
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnsInOrderBy
- Specified by:
getMaxColumnsInOrderBy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxColumnsInSelect
- Specified by:
getMaxColumnsInSelect
in 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:
getMaxColumnsInTable
in 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:
getMaxConnections
in interfaceDatabaseMetaData
- Returns:
- the maximum number of connections
- Throws:
SQLException
- if a database access error occurs
-
getMaxCursorNameLength
- Specified by:
getMaxCursorNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxIndexLength
- Specified by:
getMaxIndexLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxSchemaNameLength
- Specified by:
getMaxSchemaNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxProcedureNameLength
- Specified by:
getMaxProcedureNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxCatalogNameLength
- Specified by:
getMaxCatalogNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxRowSize
- Specified by:
getMaxRowSize
in interfaceDatabaseMetaData
- Throws:
SQLException
-
doesMaxRowSizeIncludeBlobs
- Specified by:
doesMaxRowSizeIncludeBlobs
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxStatementLength
- Specified by:
getMaxStatementLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxStatements
- Specified by:
getMaxStatements
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxTableNameLength
- Specified by:
getMaxTableNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxTablesInSelect
- Specified by:
getMaxTablesInSelect
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getMaxUserNameLength
- Specified by:
getMaxUserNameLength
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDefaultTransactionIsolation
- Specified by:
getDefaultTransactionIsolation
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsTransactions
- Specified by:
supportsTransactions
in 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:
supportsTransactionIsolationLevel
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsDataDefinitionAndDataManipulationTransactions
- Specified by:
supportsDataDefinitionAndDataManipulationTransactions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsDataManipulationTransactionsOnly
- Specified by:
supportsDataManipulationTransactionsOnly
in 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:
dataDefinitionCausesTransactionCommit
in interfaceDatabaseMetaData
- Returns:
- true if so
- Throws:
SQLException
- if a database access error occurs
-
dataDefinitionIgnoredInTransactions
- Specified by:
dataDefinitionIgnoredInTransactions
in 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:
getProcedures
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getProcedureColumns
public ResultSet getProcedureColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String procedureNamePattern, @Nullable String columnNamePattern) throws SQLException - Specified by:
getProcedureColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTables
public ResultSet getTables(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, String @Nullable [] types) throws SQLException - Specified by:
getTables
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSchemas
- Specified by:
getSchemas
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSchemas
public ResultSet getSchemas(@Nullable String catalog, @Nullable String schemaPattern) throws SQLException - Specified by:
getSchemas
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getCatalogs
- Specified by:
getCatalogs
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTableTypes
- Specified by:
getTableTypes
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getColumns
public ResultSet getColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, @Nullable String columnNamePattern) throws SQLException - Specified by:
getColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getColumnPrivileges
public ResultSet getColumnPrivileges(@Nullable String catalog, @Nullable String schema, String table, @Nullable String columnNamePattern) throws SQLException - Specified by:
getColumnPrivileges
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTablePrivileges
public ResultSet getTablePrivileges(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern) throws SQLException - Specified by:
getTablePrivileges
in 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:
getBestRowIdentifier
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getVersionColumns
public ResultSet getVersionColumns(@Nullable String catalog, @Nullable String schema, String table) throws SQLException - Specified by:
getVersionColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getPrimaryKeys
public ResultSet getPrimaryKeys(@Nullable String catalog, @Nullable String schema, String table) throws SQLException - Specified by:
getPrimaryKeys
in 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:
getImportedKeys
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getExportedKeys
public ResultSet getExportedKeys(@Nullable String catalog, @Nullable String schema, String table) throws SQLException - Specified by:
getExportedKeys
in 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:
getCrossReference
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getTypeInfo
- Specified by:
getTypeInfo
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getIndexInfo
public ResultSet getIndexInfo(@Nullable String catalog, @Nullable String schema, String tableName, boolean unique, boolean approximate) throws SQLException - Specified by:
getIndexInfo
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsResultSetType
- Specified by:
supportsResultSetType
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsResultSetConcurrency
- Specified by:
supportsResultSetConcurrency
in interfaceDatabaseMetaData
- Throws:
SQLException
-
ownUpdatesAreVisible
- Specified by:
ownUpdatesAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
ownDeletesAreVisible
- Specified by:
ownDeletesAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
ownInsertsAreVisible
- Specified by:
ownInsertsAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
othersUpdatesAreVisible
- Specified by:
othersUpdatesAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
othersDeletesAreVisible
- Specified by:
othersDeletesAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
othersInsertsAreVisible
- Specified by:
othersInsertsAreVisible
in interfaceDatabaseMetaData
- Throws:
SQLException
-
updatesAreDetected
- Specified by:
updatesAreDetected
in interfaceDatabaseMetaData
- Throws:
SQLException
-
deletesAreDetected
- Specified by:
deletesAreDetected
in interfaceDatabaseMetaData
- Throws:
SQLException
-
insertsAreDetected
- Specified by:
insertsAreDetected
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsBatchUpdates
- Specified by:
supportsBatchUpdates
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getUDTs
public ResultSet getUDTs(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern, int @Nullable [] types) throws SQLException - Specified by:
getUDTs
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getConnection
- Specified by:
getConnection
in interfaceDatabaseMetaData
- Throws:
SQLException
-
createMetaDataStatement
- Throws:
SQLException
-
getMaxLogicalLobSize
- Specified by:
getMaxLogicalLobSize
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsRefCursors
- Specified by:
supportsRefCursors
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getRowIdLifetime
- Specified by:
getRowIdLifetime
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsStoredFunctionsUsingCallSyntax
- Specified by:
supportsStoredFunctionsUsingCallSyntax
in interfaceDatabaseMetaData
- Throws:
SQLException
-
autoCommitFailureClosesAllResultSets
- Specified by:
autoCommitFailureClosesAllResultSets
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getClientInfoProperties
- Specified by:
getClientInfoProperties
in interfaceDatabaseMetaData
- Throws:
SQLException
-
isWrapperFor
- Specified by:
isWrapperFor
in interfaceWrapper
- Throws:
SQLException
-
unwrap
- Specified by:
unwrap
in interfaceWrapper
- Throws:
SQLException
-
getFunctions
public ResultSet getFunctions(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String functionNamePattern) throws SQLException - Specified by:
getFunctions
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getFunctionColumns
public ResultSet getFunctionColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String functionNamePattern, @Nullable String columnNamePattern) throws SQLException - Specified by:
getFunctionColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getPseudoColumns
public ResultSet getPseudoColumns(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern, @Nullable String columnNamePattern) throws SQLException - Specified by:
getPseudoColumns
in interfaceDatabaseMetaData
- Throws:
SQLException
-
generatedKeyAlwaysReturned
- Specified by:
generatedKeyAlwaysReturned
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsSavepoints
- Specified by:
supportsSavepoints
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsNamedParameters
- Specified by:
supportsNamedParameters
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsMultipleOpenResults
- Specified by:
supportsMultipleOpenResults
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsGetGeneratedKeys
- Specified by:
supportsGetGeneratedKeys
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSuperTypes
public ResultSet getSuperTypes(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern) throws SQLException - Specified by:
getSuperTypes
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getSuperTables
public ResultSet getSuperTables(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String tableNamePattern) throws SQLException - Specified by:
getSuperTables
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getAttributes
public ResultSet getAttributes(@Nullable String catalog, @Nullable String schemaPattern, @Nullable String typeNamePattern, @Nullable String attributeNamePattern) throws SQLException - Specified by:
getAttributes
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsResultSetHoldability
- Specified by:
supportsResultSetHoldability
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getResultSetHoldability
- Specified by:
getResultSetHoldability
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDatabaseMajorVersion
- Specified by:
getDatabaseMajorVersion
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getDatabaseMinorVersion
- Specified by:
getDatabaseMinorVersion
in interfaceDatabaseMetaData
- Throws:
SQLException
-
getJDBCMajorVersion
public int getJDBCMajorVersion()- Specified by:
getJDBCMajorVersion
in interfaceDatabaseMetaData
-
getJDBCMinorVersion
public int getJDBCMinorVersion()- Specified by:
getJDBCMinorVersion
in interfaceDatabaseMetaData
-
getSQLStateType
- Specified by:
getSQLStateType
in interfaceDatabaseMetaData
- Throws:
SQLException
-
locatorsUpdateCopy
- Specified by:
locatorsUpdateCopy
in interfaceDatabaseMetaData
- Throws:
SQLException
-
supportsStatementPooling
- Specified by:
supportsStatementPooling
in interfaceDatabaseMetaData
- Throws:
SQLException
-