- All Superinterfaces:
- Scope
DatabaseMetaData or for other sources of
 database meta information (e.g. InformationSchema)
 
 This object can be obtained through DSLContext.meta() in order to
 provide convenient access to your database meta data. This abstraction has
 two purposes:
 
- To increase API convenience, as no checked SQLExceptionis thrown, only the uncheckedDataAccessException
- To increase API convenience, as the returned objects are always jOOQ
 objects, not JDBC ResultSetobjects with hard-to-remember API constraints
 This type is a Scope with independent lifecycle and its own
 Scope.data() map.
- Author:
- Lukas Eder
- 
Method SummaryModifier and TypeMethodDescription@NotNull MetaApply a migration to this meta to produce a newMeta.@NotNull Metaapply(Collection<? extends Query> migration) Apply a migration to this meta to produce a newMeta.@NotNull MetaApply a migration to this meta to produce a newMeta.@NotNull MetaApply a migration to this meta to produce a newMeta.@NotNull Queriesddl()Generate a creation script for the entire meta data.@NotNull Queriesddl(DDLExportConfiguration configuration) Generate a creation script for the entire meta data.@NotNull MetafilterCatalogs(Predicate<? super Catalog> filter) Create a wrapperMetainstance filtering out some catalogs.@NotNull MetafilterDomains(Predicate<? super Domain<?>> filter) Create a wrapperMetainstance filtering out some domains.@NotNull MetafilterForeignKeys(Predicate<? super ForeignKey<?, ?>> filter) Create a wrapperMetainstance filtering out some foreign keys.@NotNull MetafilterIndexes(Predicate<? super Index> filter) Create a wrapperMetainstance filtering out some indexes.@NotNull MetafilterPrimaryKeys(Predicate<? super UniqueKey<?>> filter) Create a wrapperMetainstance filtering out some primary keys.@NotNull MetafilterSchemas(Predicate<? super Schema> filter) Create a wrapperMetainstance filtering out some schemas.@NotNull MetafilterSequences(Predicate<? super Sequence<?>> filter) Create a wrapperMetainstance filtering out some sequences.@NotNull MetafilterTables(Predicate<? super Table<?>> filter) Create a wrapperMetainstance filtering out some tables.@NotNull MetafilterTriggers(Predicate<? super Trigger> filter) Create a wrapperMetainstance filtering out some triggers.@NotNull MetafilterUniqueKeys(Predicate<? super UniqueKey<?>> filter) Create a wrapperMetainstance filtering out some unique keys.@NotNull CataloggetCatalog(String name) Get a catalog object by name from the underlying meta data source, ornullif no such object exists.@NotNull CataloggetCatalog(Name name) Get a catalog object by name from the underlying meta data source, ornullif no such object exists.Get all catalog objects from the underlying meta data source.Get all domain objects from the underlying meta data source.getDomains(String name) Get all domain objects by name from the underlying meta data source.getDomains(Name name) Get all domain objects by name from the underlying meta data source.@NotNull List<ForeignKey<?,?>> Get all foreign keys from the underlying meta data source.@NotNull List<ForeignKey<?,?>> getForeignKeys(String name) Get all foreign keys from the underlying meta data source.@NotNull List<ForeignKey<?,?>> getForeignKeys(Name name) Get all foreign keys from the underlying meta data source.Get all indexes from the underlying meta data sources.getIndexes(String name) Get all indexes from the underlying meta data sources.getIndexes(Name name) Get all indexes from the underlying meta data sources.Get all primary keys from the underlying meta data source.getPrimaryKeys(String name) Get all primary keys from the underlying meta data source.getPrimaryKeys(Name name) Get all primary keys from the underlying meta data source.Get all schema objects from the underlying meta data source.getSchemas(String name) Get all schema objects by name from the underlying meta data source.getSchemas(Name name) Get all schema objects by name from the underlying meta data source.Get all sequence objects from the underlying meta data source.getSequences(String name) Get all sequence objects by name from the underlying meta data source.getSequences(Name name) Get all sequence objects by name from the underlying meta data source.Get all table objects from the underlying meta data source.Get all table objects by name from the underlying meta data source.Get all table objects by name from the underlying meta data source.Get all trigger objects from the underlying meta data source.getTriggers(String name) Get all trigger objects by name from the underlying meta data source.getTriggers(Name name) Get all trigger objects by name from the underlying meta data source.Get all unique keys from the underlying meta data source.getUniqueKeys(String name) Get all unique keys from the underlying meta data source.getUniqueKeys(Name name) Get all unique keys from the underlying meta data source.@NotNull InformationSchemaExport to theInformationSchemaformat.@NotNull QueriesGenerate a migration script to get from this meta data to another one.@NotNull QueriesmigrateTo(Meta other, MigrationConfiguration configuration) Generate a migration script to get from this meta data to another one.@NotNull Metasnapshot()Eager-create an in-memory copy of thisMetainstance without any connection to the original data source.Methods inherited from interface org.jooq.Scopeconfiguration, creationTime, data, data, data, dialect, dsl, family, settings
- 
Method Details- 
getCatalogsGet all catalog objects from the underlying meta data source.For those databases that don't really support JDBC meta data catalogs, a single empty catalog (named "") will be returned. In other words, there is always at least one catalog in a database.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getCatalogGet a catalog object by name from the underlying meta data source, ornullif no such object exists.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getCatalogGet a catalog object by name from the underlying meta data source, ornullif no such object exists.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getSchemasGet all schema objects from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getSchemasGet all schema objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getSchemasGet all schema objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getTablesGet all table objects from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getTablesGet all table objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getTablesGet all table objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getDomains@NotNull @Support({AURORA_POSTGRES,H2,POSTGRES,SQLSERVER}) @NotNull List<Domain<?>> getDomains() throws DataAccessExceptionGet all domain objects from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getDomains@NotNull @Support({AURORA_POSTGRES,H2,POSTGRES,SQLSERVER}) @NotNull List<Domain<?>> getDomains(String name) throws DataAccessException Get all domain objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getDomains@NotNull @Support({AURORA_POSTGRES,H2,POSTGRES,SQLSERVER}) @NotNull List<Domain<?>> getDomains(Name name) throws DataAccessException Get all domain objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getTriggers@NotNull @Support({AURORA_POSTGRES,DB2,DERBY,FIREBIRD_3_0,HSQLDB,INFORMIX,MARIADB,MYSQL,ORACLE,POSTGRES,SQLITE,SQLSERVER,YUGABYTEDB}) @Pro @NotNull List<Trigger> getTriggers() throws DataAccessExceptionGet all trigger objects from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getTriggers@NotNull @Support({AURORA_POSTGRES,DB2,DERBY,FIREBIRD_3_0,HSQLDB,INFORMIX,MARIADB,MYSQL,ORACLE,POSTGRES,SQLITE,SQLSERVER,YUGABYTEDB}) @Pro @NotNull List<Trigger> getTriggers(String name) throws DataAccessException Get all trigger objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getTriggers@NotNull @Support({AURORA_POSTGRES,DB2,DERBY,FIREBIRD_3_0,HSQLDB,INFORMIX,MARIADB,MYSQL,ORACLE,POSTGRES,SQLITE,SQLSERVER,YUGABYTEDB}) @Pro @NotNull List<Trigger> getTriggers(Name name) throws DataAccessException Get all trigger objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getSequences@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SNOWFLAKE,SQLSERVER2012,SYBASE}) @NotNull List<Sequence<?>> getSequences() throws DataAccessExceptionGet all sequence objects from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getSequences@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SNOWFLAKE,SQLSERVER2012,SYBASE}) @NotNull List<Sequence<?>> getSequences(String name) throws DataAccessException Get all sequence objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getSequences@NotNull @Support({AURORA_POSTGRES,COCKROACHDB,CUBRID,DB2,DERBY,FIREBIRD,H2,HANA,HSQLDB,INFORMIX,INGRES,ORACLE,POSTGRES,SNOWFLAKE,SQLSERVER2012,SYBASE}) @NotNull List<Sequence<?>> getSequences(Name name) throws DataAccessException Get all sequence objects by name from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getPrimaryKeysGet all primary keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getPrimaryKeys@NotNull @Support @NotNull List<UniqueKey<?>> getPrimaryKeys(String name) throws DataAccessException Get all primary keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getPrimaryKeysGet all primary keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getUniqueKeysGet all unique keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getUniqueKeysGet all unique keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getUniqueKeysGet all unique keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getForeignKeysGet all foreign keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getForeignKeys@NotNull @Support @NotNull List<ForeignKey<?,?>> getForeignKeys(String name) throws DataAccessException Get all foreign keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getForeignKeys@NotNull @Support @NotNull List<ForeignKey<?,?>> getForeignKeys(Name name) throws DataAccessException Get all foreign keys from the underlying meta data source.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getIndexesGet all indexes from the underlying meta data sources.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getIndexesGet all indexes from the underlying meta data sources.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
getIndexesGet all indexes from the underlying meta data sources.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
filterCatalogsCreate a wrapperMetainstance filtering out some catalogs.
- 
filterSchemasCreate a wrapperMetainstance filtering out some schemas.
- 
filterTablesCreate a wrapperMetainstance filtering out some tables.
- 
filterDomainsCreate a wrapperMetainstance filtering out some domains.
- 
filterTriggersCreate a wrapperMetainstance filtering out some triggers.
- 
filterSequencesCreate a wrapperMetainstance filtering out some sequences.
- 
filterPrimaryKeysCreate a wrapperMetainstance filtering out some primary keys.
- 
filterUniqueKeysCreate a wrapperMetainstance filtering out some unique keys.
- 
filterForeignKeysCreate a wrapperMetainstance filtering out some foreign keys.
- 
filterIndexesCreate a wrapperMetainstance filtering out some indexes.
- 
snapshotEager-create an in-memory copy of thisMetainstance without any connection to the original data source.- Throws:
- DataAccessException
 
- 
ddlGenerate a creation script for the entire meta data.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
ddlGenerate a creation script for the entire meta data.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
applyApply a migration to this meta to produce a newMeta.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
- See Also:
 
- 
applyApply a migration to this meta to produce a newMeta.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
applyApply a migration to this meta to produce a newMeta.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
applyApply a migration to this meta to produce a newMeta.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
migrateToGenerate a migration script to get from this meta data to another one.See migrateTo(Meta, MigrationConfiguration)for more details.- Throws:
- DataAccessException- If something went wrong fetching the meta objects
- See Also:
 
- 
migrateTo@NotNull @NotNull Queries migrateTo(Meta other, MigrationConfiguration configuration) throws DataAccessException Generate a migration script to get from this meta data to another one.To some extent, some database migrations can be generated automatically by comparing two versions of a schema. This is what migrateTo()does. It supports:- Schema additions / removals
- Table additions / removals
- Column additions / removals
- Column data type changes
- Constraint additions / removals
- Index additions / removals
- Sequence additions / removals
- Comment additions / removals
 More complex, structural changes, such as moving some columns from one table to another, or turning a to-one relationship into a to-many relationship, as well as data migrations, can currently not be detected automatically. - Throws:
- DataAccessException- If something went wrong fetching the meta objects
 
- 
informationSchemaExport to theInformationSchemaformat.This allows for serialising schema meta information as XML using JAXB. See also Constants.XSD_METAfor details.- Throws:
- DataAccessException
 
 
-