public final class MySQLDatabaseMetaData extends CommonDatabaseMetaData
CommonDatabaseMetaData.BuilderdataTypeClauseattributeNoNulls, 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 and Description |
|---|
MySQLDatabaseMetaData(CommonDatabaseMetaData.Builder builder) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
generatedKeyAlwaysReturned() |
ResultSet |
getBestRowIdentifier(String catalog,
String schema,
String table,
int scope,
boolean nullable) |
ResultSet |
getColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern)
Retrieves a description of table columns available in the specified catalog.
|
ResultSet |
getExportedKeys(String catalog,
String schema,
String table)
Retrieves a description of the foreign key columns that reference the given table's primary key columns (the
foreign keys exported by a table).
|
ResultSet |
getImportedKeys(String catalog,
String schema,
String table)
Retrieves a description of the primary key columns that are referenced by the given table's foreign key columns
(the primary keys imported by a table).
|
ResultSet |
getPrimaryKeys(String catalog,
String schema,
String table)
Retrieves a description of the given table's primary key columns.
|
ResultSet |
getPseudoColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern)
Retrieve a description of the psuedo or hidden columns in a table.
|
ResultSet |
getTables(String catalog,
String schemaPattern,
String tableNamePattern,
String[] types)
Retrieves a description of the tables available in the given catalog.
|
allProceduresAreCallable, allTablesAreSelectable, autoCommitFailureClosesAllResultSets, dataDefinitionCausesTransactionCommit, dataDefinitionIgnoredInTransactions, deletesAreDetected, doesMaxRowSizeIncludeBlobs, getAttributes, getCatalogs, getCatalogSeparator, getCatalogTerm, getClientInfoProperties, getColumnPrivileges, getConnection, getCrossReference, getDatabaseMajorVersion, getDatabaseMinorVersion, getDatabaseProductName, getDatabaseProductVersion, getDefaultTransactionIsolation, getDriverMajorVersion, getDriverMinorVersion, getDriverName, getDriverVersion, getExtraNameCharacters, getFunctionColumns, getFunctions, getIdentifierQuoteString, getIndexInfo, getJDBCMajorVersion, getJDBCMinorVersion, getMaxBinaryLiteralLength, getMaxCatalogNameLength, getMaxCharLiteralLength, getMaxColumnNameLength, getMaxColumnsInGroupBy, getMaxColumnsInIndex, getMaxColumnsInOrderBy, getMaxColumnsInSelect, getMaxColumnsInTable, getMaxConnections, getMaxCursorNameLength, getMaxIndexLength, getMaxProcedureNameLength, getMaxRowSize, getMaxSchemaNameLength, getMaxStatementLength, getMaxStatements, getMaxTableNameLength, getMaxTablesInSelect, getMaxUserNameLength, getNumericFunctions, getProcedureColumns, getProcedures, getProcedureTerm, getResultSetHoldability, getRowIdLifetime, getSchemaPattern, getSchemas, getSchemas, getSchemaTerm, getSearchStringEscape, getSQLKeywords, getSQLStateType, getStringFunctions, getSuperTables, getSuperTypes, getSystemFunctions, getTablePrivileges, getTableTypes, getTimeDateFunctions, getTypeInfo, getUDTs, getURL, getUserName, getVersionColumns, insertsAreDetected, isCatalogAtStart, isReadOnly, isWrapperFor, locatorsUpdateCopy, nullPlusNonNullIsNull, nullsAreSortedAtEnd, nullsAreSortedAtStart, nullsAreSortedHigh, nullsAreSortedLow, othersDeletesAreVisible, othersInsertsAreVisible, othersUpdatesAreVisible, ownDeletesAreVisible, ownInsertsAreVisible, ownUpdatesAreVisible, storesLowerCaseIdentifiers, storesLowerCaseQuotedIdentifiers, storesMixedCaseIdentifiers, storesMixedCaseQuotedIdentifiers, storesUpperCaseIdentifiers, storesUpperCaseQuotedIdentifiers, supportsAlterTableWithAddColumn, supportsAlterTableWithDropColumn, supportsANSI92EntryLevelSQL, supportsANSI92FullSQL, supportsANSI92IntermediateSQL, supportsBatchUpdates, supportsCatalogsInDataManipulation, supportsCatalogsInIndexDefinitions, supportsCatalogsInPrivilegeDefinitions, supportsCatalogsInProcedureCalls, supportsCatalogsInTableDefinitions, supportsColumnAliasing, supportsConvert, supportsConvert, supportsCoreSQLGrammar, supportsCorrelatedSubqueries, supportsDataDefinitionAndDataManipulationTransactions, supportsDataManipulationTransactionsOnly, supportsDifferentTableCorrelationNames, supportsExpressionsInOrderBy, supportsExtendedSQLGrammar, supportsFullOuterJoins, supportsGetGeneratedKeys, supportsGroupBy, supportsGroupByBeyondSelect, supportsGroupByUnrelated, supportsIntegrityEnhancementFacility, supportsLikeEscapeClause, supportsLimitedOuterJoins, supportsMinimumSQLGrammar, supportsMixedCaseIdentifiers, supportsMixedCaseQuotedIdentifiers, supportsMultipleOpenResults, supportsMultipleResultSets, supportsMultipleTransactions, supportsNamedParameters, supportsNonNullableColumns, supportsOpenCursorsAcrossCommit, supportsOpenCursorsAcrossRollback, supportsOpenStatementsAcrossCommit, supportsOpenStatementsAcrossRollback, supportsOrderByUnrelated, supportsOuterJoins, supportsPositionedDelete, supportsPositionedUpdate, supportsResultSetConcurrency, supportsResultSetHoldability, supportsResultSetType, supportsSavepoints, supportsSchemasInDataManipulation, supportsSchemasInIndexDefinitions, supportsSchemasInPrivilegeDefinitions, supportsSchemasInProcedureCalls, supportsSchemasInTableDefinitions, supportsSelectForUpdate, supportsStatementPooling, supportsStoredFunctionsUsingCallSyntax, supportsStoredProcedures, supportsSubqueriesInComparisons, supportsSubqueriesInExists, supportsSubqueriesInIns, supportsSubqueriesInQuantifieds, supportsTableCorrelationNames, supportsTransactionIsolationLevel, supportsTransactions, supportsUnion, supportsUnionAll, unwrap, updatesAreDetected, usesLocalFilePerTable, usesLocalFilesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetMaxLogicalLobSize, supportsRefCursorspublic MySQLDatabaseMetaData(CommonDatabaseMetaData.Builder builder)
public ResultSet getPrimaryKeys(String catalog, String schema, String table) throws SQLException
CommonDatabaseMetaDataEach primary key column description has the following columns:
null) null)
null) getPrimaryKeys in interface DatabaseMetaDatagetPrimaryKeys in class CommonDatabaseMetaDatacatalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those
without a catalog; null means that the catalog name should not be used to narrow the
searchschema - a schema name; must match the schema name as it is stored in the database; "" retrieves those
without a schema; null means that the schema name should not be used to narrow the
searchtable - a table name; must match the table name as it is stored in the databaseResultSet - each row is a primary key column descriptionSQLException - if a database access error occurspublic ResultSet getTables(String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException
CommonDatabaseMetaDataTABLE_TYPE,
TABLE_CAT, TABLE_SCHEM and TABLE_NAME.
Each table description has the following columns: null) null) null)
null) null) null) null) Note: Some databases may not return information for all tables.
getTables in interface DatabaseMetaDatagetTables in class CommonDatabaseMetaDatacatalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves
those without a catalog; null means that the catalog name should not be used
to narrow the searchschemaPattern - a schema name pattern; must match the schema name as it is stored in the database; ""
retrieves those without a schema; null means that the schema name should not
be used to narrow the searchtableNamePattern - a table name pattern; must match the table name as it is stored in the databasetypes - a list of table types, which must be from the list of table types returned from CommonDatabaseMetaData.getTableTypes(),to include; null returns all typesResultSet - each row is a table descriptionSQLException - if a database access error occursCommonDatabaseMetaData.getSearchStringEscape()public ResultSet getColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
CommonDatabaseMetaDataOnly column descriptions matching the catalog, schema, table and column name criteria are returned. They are
ordered by TABLE_CAT,TABLE_SCHEM, TABLE_NAME, and
ORDINAL_POSITION.
Each column description has the following columns:
null) null) NULL values NULL values null) null) null if DATA_TYPE isn't REF) null if the DATA_TYPE isn't
REF) null
if the DATA_TYPE isn't REF) null if DATA_TYPE isn't DISTINCT or user-generated REF)
The COLUMN_SIZE column the specified column size for the given column. For numeric data, this is the maximum precision. For character data, this is the length in characters. For datetime datatypes, this is the length in characters of the String representation (assuming the maximum allowed precision of the fractional seconds component). For binary data, this is the length in bytes. For the ROWID datatype, this is the length in bytes. Null is returned for data types where the column size is not applicable.
getColumns in interface DatabaseMetaDatagetColumns in class CommonDatabaseMetaDatacatalog - a catalog name; must match the catalog name as it is stored in the database; ""
retrieves those without a catalog; null means that the catalog name should
not be used to narrow the searchschemaPattern - a schema name pattern; must match the schema name as it is stored in the database; ""
retrieves those without a schema; null means that the schema name should
not be used to narrow the searchtableNamePattern - a table name pattern; must match the table name as it is stored in the databasecolumnNamePattern - a column name pattern; must match the column name as it is stored in the databaseResultSet - each row is a column descriptionSQLException - if a database access error occursCommonDatabaseMetaData.getSearchStringEscape()public ResultSet getExportedKeys(String catalog, String schema, String table) throws SQLException
CommonDatabaseMetaDataEach foreign key column description has the following columns:
null) null) null)
being exported (may be null) null) being exported (may be null) NULL if its primary key has been updated NULL if its primary key has been deleted null) null)
getExportedKeys in interface DatabaseMetaDatagetExportedKeys in class CommonDatabaseMetaDatacatalog - a catalog name; must match the catalog name as it is stored in this database; "" retrieves those
without a catalog; null means that the catalog name should not be used to narrow the
searchschema - a schema name; must match the schema name as it is stored in the database; "" retrieves those
without a schema; null means that the schema name should not be used to narrow the
searchtable - a table name; must match the table name as it is stored in this databaseResultSet object in which each row is a foreign key column descriptionSQLException - if a database access error occursCommonDatabaseMetaData.getImportedKeys(java.lang.String, java.lang.String, java.lang.String)public ResultSet getImportedKeys(String catalog, String schema, String table) throws SQLException
CommonDatabaseMetaDataEach primary key column description has the following columns:
null) null) null) null) NULL if its primary key has been updated null) null) getImportedKeys in interface DatabaseMetaDatagetImportedKeys in class CommonDatabaseMetaDatacatalog - a catalog name; must match the catalog name as it is stored in the database; "" retrieves those
without a catalog; null means that the catalog name should not be used to narrow the
searchschema - a schema name; must match the schema name as it is stored in the database; "" retrieves those
without a schema; null means that the schema name should not be used to narrow the
searchtable - a table name; must match the table name as it is stored in the databaseResultSet - each row is a primary key column descriptionSQLException - if a database access error occursCommonDatabaseMetaData.getExportedKeys(java.lang.String, java.lang.String, java.lang.String)public ResultSet getBestRowIdentifier(String catalog, String schema, String table, int scope, boolean nullable) throws SQLException
getBestRowIdentifier in interface DatabaseMetaDatagetBestRowIdentifier in class CommonDatabaseMetaDataSQLExceptionpublic ResultSet getPseudoColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
catalog - a catalog nameschemaPattern - a schema name patterntableNamePattern - a table name patterncolumnNamePattern - a column name patternSQLExceptionpublic boolean generatedKeyAlwaysReturned()
throws SQLException
SQLExceptionCopyright © 2016. All rights reserved.