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:
SQLException is
thrown, only the unchecked DataAccessExceptionResultSet objects with hard-to-remember API
constraints
This type is a Scope with independent lifecycle and its own
data() map.
| Modifier and Type | Method and Description |
|---|---|
| public @NotNull Meta | |
| public @NotNull Meta | |
| public @NotNull Meta | |
| public @NotNull Meta | |
| public @NotNull Queries | |
| public @NotNull Queries | |
| public @NotNull Meta | filterCatalogs(Predicate<? super Catalog> filter)
Create a wrapper |
| public @NotNull Meta | filterDomains(Predicate<? super Domain<?>> filter)
Create a wrapper |
| public @NotNull Meta | filterForeignKeys(Predicate<? super ForeignKey<?, ?>> filter)
Create a wrapper |
| public @NotNull Meta | filterIndexes(Predicate<? super Index> filter)
Create a wrapper |
| public @NotNull Meta | filterPrimaryKeys(Predicate<? super UniqueKey<?>> filter)
Create a wrapper |
| public @NotNull Meta | filterSchemas(Predicate<? super Schema> filter)
Create a wrapper |
| public @NotNull Meta | filterSequences(Predicate<? super Sequence<?>> filter)
Create a wrapper |
| public @NotNull Meta | filterTables(Predicate<? super Table<?>> filter)
Create a wrapper |
| public @NotNull Meta | filterUniqueKeys(Predicate<? super UniqueKey<?>> filter)
Create a wrapper |
| public @NotNull Catalog | getCatalog(String name)
Get a catalog object by name from the underlying meta data source, or
|
| public @NotNull Catalog | getCatalog(Name name)
Get a catalog object by name from the underlying meta data source, or
|
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull List | |
| public @NotNull InformationSchema | |
| public @NotNull Queries | |
| public @NotNull Queries | migrateTo(Meta other, MigrationConfiguration configuration)
Generate a migration script to get from this meta data to another one. |
| public @NotNull Meta |
| apply | back to summary |
|---|---|
| public @NotNull Meta apply(String migration) throws DataAccessException Apply a migration to this meta to produce a new
| |
| apply | back to summary |
|---|---|
| public @NotNull Meta apply(Query... migration) throws DataAccessException Apply a migration to this meta to produce a new
| |
| apply | back to summary |
|---|---|
| public @NotNull Meta apply(Collection<? extends Query> migration) throws DataAccessException Apply a migration to this meta to produce a new
| |
| apply | back to summary |
|---|---|
| public @NotNull Meta apply(Queries migration) throws DataAccessException Apply a migration to this meta to produce a new
| |
| ddl | back to summary |
|---|---|
| public @NotNull Queries ddl() throws DataAccessException Generate a creation script for the entire meta data.
| |
| ddl | back to summary |
|---|---|
| public @NotNull Queries ddl(DDLExportConfiguration configuration) throws DataAccessException Generate a creation script for the entire meta data.
| |
| filterCatalogs | back to summary |
|---|---|
| public @NotNull Meta filterCatalogs(Predicate<? super Catalog> filter) Create a wrapper
| |
| filterDomains | back to summary |
|---|---|
| public @NotNull Meta filterDomains(Predicate<? super Domain<?>> filter) Create a wrapper
| |
| filterForeignKeys | back to summary |
|---|---|
| public @NotNull Meta filterForeignKeys(Predicate<? super ForeignKey<?, ?>> filter) Create a wrapper
| |
| filterIndexes | back to summary |
|---|---|
| public @NotNull Meta filterIndexes(Predicate<? super Index> filter) Create a wrapper
| |
| filterPrimaryKeys | back to summary |
|---|---|
| public @NotNull Meta filterPrimaryKeys(Predicate<? super UniqueKey<?>> filter) Create a wrapper
| |
| filterSchemas | back to summary |
|---|---|
| public @NotNull Meta filterSchemas(Predicate<? super Schema> filter) Create a wrapper
| |
| filterSequences | back to summary |
|---|---|
| public @NotNull Meta filterSequences(Predicate<? super Sequence<?>> filter) Create a wrapper
| |
| filterTables | back to summary |
|---|---|
| public @NotNull Meta filterTables(Predicate<? super Table<?>> filter) Create a wrapper
| |
| filterUniqueKeys | back to summary |
|---|---|
| public @NotNull Meta filterUniqueKeys(Predicate<? super UniqueKey<?>> filter) Create a wrapper
| |
| getCatalog | back to summary |
|---|---|
| public @NotNull Catalog getCatalog(String name) throws DataAccessException Get a catalog object by name from the underlying meta data source, or
| |
| getCatalog | back to summary |
|---|---|
| public @NotNull Catalog getCatalog(Name name) throws DataAccessException Get a catalog object by name from the underlying meta data source, or
| |
| getCatalogs | back to summary |
|---|---|
| public @NotNull List Get 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
| |
| getDomains | back to summary |
|---|---|
| public @NotNull List Get all domain objects from the underlying meta data source.
| |
| getDomains | back to summary |
|---|---|
| public @NotNull List Get all domain objects by name from the underlying meta data source.
| |
| getDomains | back to summary |
|---|---|
| public @NotNull List Get all domain objects by name from the underlying meta data source.
| |
| getForeignKeys | back to summary |
|---|---|
| public @NotNull List Get all foreign keys from the underlying meta data source.
| |
| getForeignKeys | back to summary |
|---|---|
| public @NotNull List Get all foreign keys from the underlying meta data source.
| |
| getForeignKeys | back to summary |
|---|---|
| public @NotNull List Get all foreign keys from the underlying meta data source.
| |
| getIndexes | back to summary |
|---|---|
| public @NotNull List Get all indexes from the underlying meta data sources.
| |
| getIndexes | back to summary |
|---|---|
| public @NotNull List Get all indexes from the underlying meta data sources.
| |
| getIndexes | back to summary |
|---|---|
| public @NotNull List Get all indexes from the underlying meta data sources.
| |
| getPrimaryKeys | back to summary |
|---|---|
| public @NotNull List Get all primary keys from the underlying meta data source.
| |
| getPrimaryKeys | back to summary |
|---|---|
| public @NotNull List Get all primary keys from the underlying meta data source.
| |
| getPrimaryKeys | back to summary |
|---|---|
| public @NotNull List Get all primary keys from the underlying meta data source.
| |
| getSchemas | back to summary |
|---|---|
| public @NotNull List Get all schema objects from the underlying meta data source.
| |
| getSchemas | back to summary |
|---|---|
| public @NotNull List Get all schema objects by name from the underlying meta data source.
| |
| getSchemas | back to summary |
|---|---|
| public @NotNull List Get all schema objects by name from the underlying meta data source.
| |
| getSequences | back to summary |
|---|---|
| public @NotNull List Get all sequence objects from the underlying meta data source. | |
| getSequences | back to summary |
|---|---|
| public @NotNull List Get all sequence objects by name from the underlying meta data source. | |
| getSequences | back to summary |
|---|---|
| public @NotNull List Get all sequence objects by name from the underlying meta data source. | |
| getTables | back to summary |
|---|---|
| public @NotNull List Get all table objects from the underlying meta data source.
| |
| getTables | back to summary |
|---|---|
| public @NotNull List Get all table objects by name from the underlying meta data source.
| |
| getTables | back to summary |
|---|---|
| public @NotNull List Get all table objects by name from the underlying meta data source.
| |
| getUniqueKeys | back to summary |
|---|---|
| public @NotNull List Get all unique keys from the underlying meta data source.
| |
| getUniqueKeys | back to summary |
|---|---|
| public @NotNull List Get all unique keys from the underlying meta data source.
| |
| getUniqueKeys | back to summary |
|---|---|
| public @NotNull List Get all unique keys from the underlying meta data source.
| |
| informationSchema | back to summary |
|---|---|
| public @NotNull InformationSchema informationSchema() throws DataAccessException Export to the
This allows for serialising schema meta information as XML using JAXB.
See also
| |
| migrateTo | back to summary |
|---|---|
| public @NotNull Queries migrateTo(Meta other) throws DataAccessException Generate a migration script to get from this meta data to another one.
See
| |
| migrateTo | back to summary |
|---|---|
| public @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
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.
| |
| snapshot | back to summary |
|---|---|
| public @NotNull Meta snapshot() throws DataAccessException Eager-create an in-memory copy of this
| |