Package org.jooq.meta

Interface Database

All Superinterfaces:
AutoCloseable
All Known Subinterfaces:
ResultQueryDatabase
All Known Implementing Classes:
AbstractDatabase, AbstractMetaDatabase, CUBRIDDatabase, DerbyDatabase, FirebirdDatabase, H2Database, HSQLDBDatabase, IgniteDatabase, JDBCDatabase, MariaDBDatabase, MySQLDatabase, PostgresDatabase, SQLiteDatabase, XMLDatabase, YugabyteDBDatabase

public interface Database extends AutoCloseable
A general database model.
Author:
Lukas Eder
  • Method Details

    • getSources

      Map<Definition,String> getSources()
      Get the sources for all objects that offer sources.
    • getComments

      Map<Definition,String> getComments()
      Get the comments for all objects that offer comments.
    • getCatalogs

      List<CatalogDefinition> getCatalogs()
      The catalogs generated from this database.
    • getCatalog

      CatalogDefinition getCatalog(String name)
      Get a catalog defined in this database by name.
    • getSchemata

      List<SchemaDefinition> getSchemata()
      The schemata generated from this database.
    • getSchemata

      List<SchemaDefinition> getSchemata(CatalogDefinition catalog)
      The schemata generated from this database and a given catalog.
    • getSchema

      SchemaDefinition getSchema(String name)
      Get a schema defined in this database by name.
    • getXMLSchemaCollections

      List<XMLSchemaCollectionDefinition> getXMLSchemaCollections()
      The XML schema collections generated from this database.
    • getXMLSchemaCollections

      List<XMLSchemaCollectionDefinition> getXMLSchemaCollections(SchemaDefinition schema)
      The XML schema collections generated from this database.
    • getXMLSchemaCollection

      XMLSchemaCollectionDefinition getXMLSchemaCollection(SchemaDefinition schema, String name)
      The XML schema collection generated from this database by name
    • getRelations

      Relations getRelations()
      Retrieve the schema's primary key / foreign key relations.
    • getSequences

      List<SequenceDefinition> getSequences()
      The sequences contained in this database.
    • getSequences

      List<SequenceDefinition> getSequences(SchemaDefinition schema)
      The sequences contained in this database.
    • getSequence

      SequenceDefinition getSequence(SchemaDefinition schema, String name)
      Get a sequence in this database by name.
    • getSequence

      SequenceDefinition getSequence(SchemaDefinition schema, String name, boolean ignoreCase)
      Get a sequence in this database by name.
    • getSequence

      SequenceDefinition getSequence(SchemaDefinition schema, Name name)
      Get a sequence in this database by name.
    • getSequence

      SequenceDefinition getSequence(SchemaDefinition schema, Name name, boolean ignoreCase)
      Get a sequence in this database by name.
    • getIdentities

      List<IdentityDefinition> getIdentities(SchemaDefinition schema)
      The identities contained in this database.
    • getIndexes

      List<IndexDefinition> getIndexes(SchemaDefinition schema)
      The indexes contained in this database.
    • getIndexes

      List<IndexDefinition> getIndexes(TableDefinition schema)
      The indexes contained in this database.
    • getUniqueKeys

      List<UniqueKeyDefinition> getUniqueKeys()
      The unique keys contained in this database.
    • getUniqueKeys

      List<UniqueKeyDefinition> getUniqueKeys(SchemaDefinition schema)
      The unique keys contained in this database.
    • getPrimaryKeys

      List<UniqueKeyDefinition> getPrimaryKeys()
      The primary keys contained in this database.
    • getPrimaryKeys

      List<UniqueKeyDefinition> getPrimaryKeys(SchemaDefinition schema)
      The primary keys contained in this database.
    • getKeys

      The unique and primary keys contained in this database.
    • getKeys

      The unique and primary keys contained in this database.
    • getForeignKeys

      List<ForeignKeyDefinition> getForeignKeys()
      The foreign keys contained in this database.
    • getForeignKeys

      List<ForeignKeyDefinition> getForeignKeys(SchemaDefinition schema)
      The foreign keys contained in this database.
    • getCheckConstraints

      List<CheckConstraintDefinition> getCheckConstraints(SchemaDefinition schema)
      The check constraints contained in this database.
    • getTables

      List<TableDefinition> getTables()
      The tables contained in this database.
    • getTables

      The tables contained in this database.
    • getTable

      TableDefinition getTable(SchemaDefinition schema, String name)
      Get a table in this database by name.
    • getTable

      TableDefinition getTable(SchemaDefinition schema, String name, boolean ignoreCase)
      Get a table in this database by name.
    • getTable

      TableDefinition getTable(SchemaDefinition schema, Name name)
      Get a table in this database by name.
    • getTable

      TableDefinition getTable(SchemaDefinition schema, Name name, boolean ignoreCase)
      Get a table in this database by name.
    • getEmbeddables

      List<EmbeddableDefinition> getEmbeddables()
      Get all embeddables.
    • getEmbeddables

      List<EmbeddableDefinition> getEmbeddables(SchemaDefinition schema)
      Get all embeddables for a given defining schema.
    • getEmbeddables

      List<EmbeddableDefinition> getEmbeddables(TableDefinition table)
      Get all embeddables for a given defining table.
    • getEmbeddablesByReferencingTable

      List<EmbeddableDefinition> getEmbeddablesByReferencingTable(TableDefinition table)
      Get all embeddables for a given referencing table.
    • getEnums

      The enum UDTs defined in this database.
    • getEnum

      EnumDefinition getEnum(SchemaDefinition schema, String name)
      Get an enum UDT defined in this database by name.
    • getEnum

      EnumDefinition getEnum(SchemaDefinition schema, String name, boolean ignoreCase)
      Get an enum UDT defined in this database by name.
    • getEnum

      EnumDefinition getEnum(SchemaDefinition schema, Name name)
      Get an enum UDT defined in this database by name.
    • getEnum

      EnumDefinition getEnum(SchemaDefinition schema, Name name, boolean ignoreCase)
      Get an enum UDT defined in this database by name.
    • getDomains

      List<DomainDefinition> getDomains()
      The domain UDTs defined in this database.
    • getDomains

      List<DomainDefinition> getDomains(SchemaDefinition schema)
      The domain UDTs defined in this database.
    • getDomain

      DomainDefinition getDomain(SchemaDefinition schema, String name)
      Get a domain UDT defined in this database by name.
    • getDomain

      DomainDefinition getDomain(SchemaDefinition schema, String name, boolean ignoreCase)
      Get a domain UDT defined in this database by name.
    • getDomain

      DomainDefinition getDomain(SchemaDefinition schema, Name name)
      Get a domain UDT defined in this database by name.
    • getDomain

      DomainDefinition getDomain(SchemaDefinition schema, Name name, boolean ignoreCase)
      Get a domain UDT defined in this database by name.
    • getUDTs

      List<UDTDefinition> getUDTs()
      The UDTs defined in this database.
    • getUDTs

      The UDTs defined in this database.
    • getUDT

      UDTDefinition getUDT(SchemaDefinition schema, String name)
      Get a UDT defined in this database by name.
    • getUDT

      UDTDefinition getUDT(SchemaDefinition schema, String name, boolean ignoreCase)
      Get a UDT defined in this database by name.
    • getUDT

      UDTDefinition getUDT(SchemaDefinition schema, Name name)
      Get a UDT defined in this database by name.
    • getUDT

      UDTDefinition getUDT(SchemaDefinition schema, Name name, boolean ignoreCase)
      Get a UDT defined in this database by name.
    • getUDTs

      The UDTs defined in this database.
    • getSubtypes

      List<UDTDefinition> getSubtypes(UDTDefinition udt)
      Get the subtypes of a UDT, if any.
    • getArrays

      The Arrays defined in this database.
    • getArray

      ArrayDefinition getArray(SchemaDefinition schema, String name)
      Get a ARRAY defined in this database by name.
    • getArray

      ArrayDefinition getArray(SchemaDefinition schema, String name, boolean ignoreCase)
      Get a ARRAY defined in this database by name.
    • getArray

      ArrayDefinition getArray(SchemaDefinition schema, Name name)
      Get a ARRAY defined in this database by name.
    • getArray

      ArrayDefinition getArray(SchemaDefinition schema, Name name, boolean ignoreCase)
      Get a ARRAY defined in this database by name.
    • getRoutines

      List<RoutineDefinition> getRoutines(SchemaDefinition schema)
      The stored routines (procedures and functions) contained in this database.
    • getRoutine

      RoutineDefinition getRoutine(SchemaDefinition schema, String name)
      Get a routine in this database by name.
    • getRoutine

      RoutineDefinition getRoutine(SchemaDefinition schema, String name, boolean ignoreCase)
      Get a routine in this database by name.
    • getRoutine

      RoutineDefinition getRoutine(SchemaDefinition schema, Name name)
      Get a routine in this database by name.
    • getRoutine

      RoutineDefinition getRoutine(SchemaDefinition schema, Name name, boolean ignoreCase)
      Get a routine in this database by name.
    • getPackages

      List<PackageDefinition> getPackages(SchemaDefinition schema)
      The packages contained in this database.
    • getPackage

      PackageDefinition getPackage(SchemaDefinition schema, String inputName)
      Get a package defined in this database by name.
    • setConnection

      void setConnection(Connection connection)
      Initialise a connection to this database.
    • getConnection

      Connection getConnection()
      The database connection.
    • getInputCatalogs

      List<String> getInputCatalogs()
      The input catalogs are the catalogs that jooq-meta is reading data from.
    • getInputSchemata

      List<String> getInputSchemata()
      The input schemata are the schemata from all catalogs that jooq-meta is reading data from.

      This will combine the schemata from all catalogs in a single list. If you're working with a multi-catalog environment, you may want to call getInputSchemata(String) instead to disambiguate schema names (e.g. in SQL Server, there are multiple "dbo" schemas).

    • getInputSchemata

      List<String> getInputSchemata(CatalogDefinition catalog)
      The input schemata are the schemata from a given catalog that jooq-meta is reading data from.
    • getInputSchemata

      List<String> getInputSchemata(String catalog)
      The input schemata are the schemata from a given catalog that jooq-meta is reading data from.
    • getOutputCatalog

      @Deprecated String getOutputCatalog(String inputCatalog)
      Deprecated.
      - 2.0.5 - This will be implemented in each Definition.getOutputName()
      The output catalog is the catalog used by jooq-codegen in class names.
    • getOutputSchema

      @Deprecated String getOutputSchema(String inputSchema)
      Deprecated.
      - 2.0.5 - This will be implemented in each Definition.getOutputName()
      The output schema is the schema used by jooq-codegen in class names.
    • getOutputSchema

      @Deprecated String getOutputSchema(String inputCatalog, String inputSchema)
      Deprecated.
      - 2.0.5 - This will be implemented in each Definition.getOutputName()
      The output schema is the schema used by jooq-codegen in class names.
    • setConfiguredCatalogs

      void setConfiguredCatalogs(List<CatalogMappingType> catalogs)
      The input and output catalogs.
    • setConfiguredSchemata

      void setConfiguredSchemata(List<SchemaMappingType> schemata)
      The input and output schemata.
    • setExcludes

      void setExcludes(String[] excludes)
      Database objects matching any of these regular expressions will not be generated.
    • setExcludeSql

      void setExcludeSql(String sql)
      Database objects matching any of the regular expressions produced by this SQL query will not be generated, in addition to the ones specified by getExcludes().
    • getExcludes

      String[] getExcludes()
      Database objects matching any of these regular expressions will not be generated.
    • getExcludeSql

      String getExcludeSql()
      Database objects matching any of the regular expressions produced by this SQL query will not be generated, in addition to the ones specified by getExcludes().
    • setIncludes

      void setIncludes(String[] includes)
      Only database objects matching any of these regular expressions will be generated.
    • setIncludeSql

      void setIncludeSql(String sql)
      Only database objects matching any of the regular expressions produced by this SQL query will be generated, in addition to the ones specified by getIncludes().
    • getIncludes

      String[] getIncludes()
      Only database objects matching any of these regular expressions will be generated.
    • getIncludeSql

      String getIncludeSql()
      Only database objects matching any of the regular expressions produced by this SQL query will be generated, in addition to the ones specified by getIncludes().
    • setIncludeExcludeColumns

      void setIncludeExcludeColumns(boolean includeExcludeColumns)
      Indicate whether include / exclude regular expression shall also match database columns.
    • getIncludeExcludeColumns

      boolean getIncludeExcludeColumns()
      Indicate whether include / exclude regular expression shall also match database columns.
    • setIncludeExcludePackageRoutines

      void setIncludeExcludePackageRoutines(boolean includeExcludePackageRoutines)
      Indicate whether include / exclude regular expression shall also match package routines.
    • getIncludeExcludePackageRoutines

      boolean getIncludeExcludePackageRoutines()
      Indicate whether include / exclude regular expression shall also match package routines.
    • setIncludeForeignKeys

      void setIncludeForeignKeys(boolean includeForeignKeys)
      whether foreign key relationships should be included.
    • getIncludeForeignKeys

      boolean getIncludeForeignKeys()
      whether foreign key relationships should be included.
    • setIncludeUniqueKeys

      void setIncludeUniqueKeys(boolean includeUniqueKeys)
      whether unique keys should be included.
    • getIncludeUniqueKeys

      boolean getIncludeUniqueKeys()
      whether unique keys should be included.
    • setIncludePrimaryKeys

      void setIncludePrimaryKeys(boolean includePrimaryKeys)
      whether primary keys should be included.
    • getIncludePrimaryKeys

      boolean getIncludePrimaryKeys()
      whether primary keys should be included.
    • setIncludeCheckConstraints

      void setIncludeCheckConstraints(boolean checkConstraints)
      whether check constraints should be included.
    • getIncludeCheckConstraints

      boolean getIncludeCheckConstraints()
      whether check constraints should be included.
    • setIncludeSystemTables

      void setIncludeSystemTables(boolean systemTables)
      whether system generated tables should be included.
    • getIncludeSystemTables

      boolean getIncludeSystemTables()
      whether system generated tables should be included.
    • setIncludeSystemIndexes

      void setIncludeSystemIndexes(boolean systemIndexes)
      whether system generated indexes should be included.
    • getIncludeSystemIndexes

      boolean getIncludeSystemIndexes()
      whether system generated indexes should be included.
    • setIncludeSystemCheckConstraints

      void setIncludeSystemCheckConstraints(boolean systemCheckConstraints)
      whether system generated check constraints should be included.
    • getIncludeSystemCheckConstraints

      boolean getIncludeSystemCheckConstraints()
      whether system generated check constraints should be included.
    • setIncludeSystemSequences

      void setIncludeSystemSequences(boolean systemSequences)
      whether system generated sequences should be included.
    • getIncludeSystemSequences

      boolean getIncludeSystemSequences()
      whether system generated sequences should be included.
    • setIncludeSystemUDTs

      void setIncludeSystemUDTs(boolean systemUDTs)
      whether system generated UDTs should be included.
    • getIncludeSystemUDTs

      boolean getIncludeSystemUDTs()
      whether system generated UDTs should be included.
    • setIncludeIndexes

      void setIncludeIndexes(boolean includeIndexes)
      whether indexes should be included.
    • getIncludeIndexes

      boolean getIncludeIndexes()
      whether indexes should be included.
    • setIncludeDomains

      void setIncludeDomains(boolean includeDomains)
      whether domains should be included.
    • getIncludeDomains

      boolean getIncludeDomains()
      whether domains should be included.
    • setIncludeSequences

      void setIncludeSequences(boolean includeSequences)
      whether sequences should be included.
    • getIncludeSequences

      boolean getIncludeSequences()
      whether sequences should be included.
    • getIncludeXMLSchemaCollections

      boolean getIncludeXMLSchemaCollections()
      whether XML schema collections should be included.
    • setIncludeXMLSchemaCollections

      void setIncludeXMLSchemaCollections(boolean includeXMLSchemaCollections)
      whether XML schema collections should be included.
    • setIncludeUDTs

      void setIncludeUDTs(boolean includeUDTs)
      whether user defined types should be included.
    • getIncludeUDTs

      boolean getIncludeUDTs()
      whether user defined types should be included.
    • setIncludePackages

      void setIncludePackages(boolean includePackages)
      whether packages should be included.
    • getIncludePackages

      boolean getIncludePackages()
      whether packages should be included.
    • setIncludePackageRoutines

      void setIncludePackageRoutines(boolean includePackageRoutines)
      whether package routines should be included.
    • getIncludePackageRoutines

      boolean getIncludePackageRoutines()
      whether package routines should be included.
    • setIncludePackageUDTs

      void setIncludePackageUDTs(boolean includePackageUDTs)
      whether package UDTs should be included.
    • getIncludePackageUDTs

      boolean getIncludePackageUDTs()
      whether package UDTs should be included.
    • setIncludePackageConstants

      void setIncludePackageConstants(boolean includePackageConstants)
      whether package constants should be included.
    • getIncludePackageConstants

      boolean getIncludePackageConstants()
      whether package constants should be included.
    • setIncludeRoutines

      void setIncludeRoutines(boolean includeRoutines)
      whether routines should be included.
    • getIncludeRoutines

      boolean getIncludeRoutines()
      whether routines should be included.
    • setIncludeTriggerRoutines

      void setIncludeTriggerRoutines(boolean includeTriggerRoutines)
      whether trigger routines should be included.
    • getIncludeTriggerRoutines

      boolean getIncludeTriggerRoutines()
      whether trigger routines should be included.
    • setIncludeTables

      void setIncludeTables(boolean includeTables)
      Whether tables (and views) should be included.
    • getIncludeTables

      boolean getIncludeTables()
      Whether tables (and views) should be included.
    • setIncludeEmbeddables

      void setIncludeEmbeddables(boolean includeEmbeddables)
      Whether embeddable types should be included.
    • getIncludeEmbeddables

      boolean getIncludeEmbeddables()
      Whether embeddable types should be included.
    • setIncludeInvisibleColumns

      void setIncludeInvisibleColumns(boolean includeInvisibleColumns)
      Whether invisible columns should be included.
    • getIncludeInvisibleColumns

      boolean getIncludeInvisibleColumns()
      Whether invisible columns should be included.
    • setInvisibleColumnsAsHidden

      void setInvisibleColumnsAsHidden(boolean invisibleColumnsAsHidden)
      Whether invisible columns should be marked as DataType.hidden().

      This feature is available in the commercial distribution only.

    • getInvisibleColumnsAsHidden

      boolean getInvisibleColumnsAsHidden()
      Whether invisible columns should be marked as DataType.hidden().

      This feature is available in the commercial distribution only.

    • setForceIntegerTypesOnZeroScaleDecimals

      void setForceIntegerTypesOnZeroScaleDecimals(boolean forceIntegerTypesOnZeroScaleDecimals)
      Whether zero-scale decimal types should be treated as their most appropriate, corresponding integer type.
    • getForceIntegerTypesOnZeroScaleDecimals

      boolean getForceIntegerTypesOnZeroScaleDecimals()
      Whether zero-scale decimal types should be treated as their most appropriate, corresponding integer type.
    • setOnError

      void setOnError(OnError onError)
      The behaviour when errors are encountered.
    • onError

      OnError onError()
      The behaviour when errors are encountered.
    • addFilter

      void addFilter(Database.Filter filter)
      [#3488] Add an additional filter to the database that is applied in addition to include / exclude.
    • getFilters

      List<Database.Filter> getFilters()
      [#3488] The filters that are applied in addition to include / exclude.
    • filterExcludeInclude

      <D extends Definition> List<D> filterExcludeInclude(List<D> definitions)
      Filter a list of definitions according to the exclude / include / and filter settings of this database.
    • filterExcludeInclude

      <D extends Definition> List<D> filterExcludeInclude(List<D> definitions, String exclude, String include)
      Filter a list of definitions according to the exclude / include expressions passed as arguments.
    • sort

      <D extends Definition> List<D> sort(List<D> definitions)
      Sort a list of definitions according to the getOrderProvider() defined in this database.
    • getIncluded

      List<Definition> getIncluded()
      Retrieve all included objects.
    • getExcluded

      List<Definition> getExcluded()
      Retrieve all excluded objects.
    • getAll

      List<Definition> getAll()
      Retrieve all objects.
    • setRegexFlags

      void setRegexFlags(List<RegexFlag> regexFlags)
      The regular expression flags that should be applied when using regular expressions.
    • getRegexFlags

      List<RegexFlag> getRegexFlags()
      The regular expression flags that should be applied when using regular expressions.
    • setRegexMatchesPartialQualification

      void setRegexMatchesPartialQualification(boolean regexMatchesPartialQualification)
      Whether the regular expressions matching database objects should match partially qualified names as well as fully qualified and unqualified names.
    • getRegexMatchesPartialQualification

      boolean getRegexMatchesPartialQualification()
      Whether the regular expressions matching database objects should match partially qualified names as well as fully qualified and unqualified names.
    • setSqlMatchesPartialQualification

      void setSqlMatchesPartialQualification(boolean sqlMatchesPartialQualification)
      Whether the SQL statements matching database objects should match partially qualified names as well as fully qualified and unqualified names.
    • getSqlMatchesPartialQualification

      boolean getSqlMatchesPartialQualification()
      Whether the SQL statements matching database objects should match partially qualified names as well as fully qualified and unqualified names.
    • setRecordVersionFields

      void setRecordVersionFields(String[] recordVersionFields)
      Table columns matching these regular expressions will be considered as record version fields in generated code.
    • getRecordVersionFields

      String[] getRecordVersionFields()
      Table columns matching these regular expressions will be considered as record version fields in generated code.
    • setRecordTimestampFields

      void setRecordTimestampFields(String[] recordTimestampFields)
      Table columns matching these regular expressions will be considered as record timestamp fields in generated code.
    • getRecordTimestampFields

      String[] getRecordTimestampFields()
      Table columns matching these regular expressions will be considered as record timestamp fields in generated code.
    • setSyntheticPrimaryKeys

      @Deprecated void setSyntheticPrimaryKeys(String[] primaryKeys)
      Deprecated.
      - 3.14.0 - [#10588] - Use setConfiguredSyntheticObjects(SyntheticObjectsType) instead.
      Columns matching these regular expressions will be considered as members of synthetic primary keys in generated code.
    • getSyntheticPrimaryKeys

      @Deprecated String[] getSyntheticPrimaryKeys()
      Deprecated.
      - 3.14.0 - [#10588] - Use getConfiguredSyntheticPrimaryKeys() instead.
      Columns matching these regular expressions will be considered as members of synthetic primary keys in generated code.
    • setOverridePrimaryKeys

      @Deprecated void setOverridePrimaryKeys(String[] primaryKeys)
      Deprecated.
      - 3.14.0 - [#10588] - Use setConfiguredSyntheticObjects(SyntheticObjectsType) instead.
      Unique keys matching these regular expressions will be considered as primary keys in generated code.
    • getOverridePrimaryKeys

      @Deprecated String[] getOverridePrimaryKeys()
      Deprecated.
      - 3.14.0 - [#10588] - Use getConfiguredSyntheticPrimaryKeys() instead.
      Unique keys matching these regular expressions will be considered as primary keys in generated code.
    • setSyntheticIdentities

      @Deprecated void setSyntheticIdentities(String[] syntheticIdentities)
      Deprecated.
      - 3.14.0 - [#10588] - Use setConfiguredSyntheticObjects(SyntheticObjectsType) instead.
      Columns matching these regular expressions will be considered as identity columns in generated code.
    • getSyntheticIdentities

      @Deprecated String[] getSyntheticIdentities()
      Deprecated.
      - 3.14.0 - [#10588] - Use getConfiguredSyntheticIdentities() instead.
      Columns matching these regular expressions will be considered as identity columns in generated code.
    • setConfiguredCustomTypes

      @Deprecated void setConfiguredCustomTypes(List<CustomType> types)
      Deprecated.
      - 3.10.0 - [#5750] - Use getConfiguredForcedTypes() only.
      Database objects matching any of these field names will be generated as custom types.
    • getConfiguredCustomTypes

      @Deprecated List<CustomType> getConfiguredCustomTypes()
      Deprecated.
      - 3.10.0 - [#5750] - Use getConfiguredForcedTypes() only.
      Database objects matching any of these field names will be generated as custom types.
    • getConfiguredCustomType

      @Deprecated CustomType getConfiguredCustomType(String name)
      Deprecated.
      - 3.10.0 - [#5750] - Use getConfiguredForcedTypes() only.
      Get a specific configured custom type by its name.
    • setConfiguredEnumTypes

      void setConfiguredEnumTypes(List<EnumType> types)
      Database objects matching any of these field names will be generated as enum types.
    • getConfiguredEnumTypes

      List<EnumType> getConfiguredEnumTypes()
      Database objects matching any of these field names will be generated as enum types.
    • setConfiguredForcedTypes

      void setConfiguredForcedTypes(List<ForcedType> types)
      Database objects matching any of these field names will be generated as forced types.
    • getForcedTypesForBuiltinDataTypeExtensions

      boolean getForcedTypesForBuiltinDataTypeExtensions()
      Whether some additional forced types for built in data type extensions, such as the ones from jooq-codegen-postgres should be added.
    • setForcedTypesForBuiltinDataTypeExtensions

      void setForcedTypesForBuiltinDataTypeExtensions(boolean forcedTypesForBuiltinDataTypeExtensions)
      Whether some additional forced types for built in data type extensions, such as the ones from jooq-codegen-postgres should be added.
    • getForcedTypesForXMLSchemaCollections

      boolean getForcedTypesForXMLSchemaCollections()
      Whether some additional forced types for XMLSchemaCollectionDefinition types should be created automatically for columns that have non-ambiguous references to an XMLTypeDefinition.

      This feature is available in the commercial distribution only.

    • setForcedTypesForXMLSchemaCollections

      void setForcedTypesForXMLSchemaCollections(boolean forcedTypesForXMLSchemaCollections)
      Whether some additional forced types for XMLSchemaCollectionDefinition types should be created automatically for columns that have non-ambiguous references to an XMLTypeDefinition.

      This feature is available in the commercial distribution only.

    • getLogSlowQueriesAfterSeconds

      int getLogSlowQueriesAfterSeconds()
      Log slow queries after this amount of seconds.
    • setLogSlowQueriesAfterSeconds

      void setLogSlowQueriesAfterSeconds(int logSlowQueriesAfterSeconds)
      Log slow queries after this amount of seconds.
    • getLogSlowResultsAfterSeconds

      int getLogSlowResultsAfterSeconds()
      Log slow results after this amount of seconds.
    • setLogSlowResultsAfterSeconds

      void setLogSlowResultsAfterSeconds(int logSlowResultsAfterSeconds)
      Log slow results after this amount of seconds.
    • getSchemaVersionProvider

      SchemaVersionProvider getSchemaVersionProvider()
      The database's schema version provider.
    • setSchemaVersionProvider

      void setSchemaVersionProvider(SchemaVersionProvider provider)
      The database's schema version provider.
    • getCatalogVersionProvider

      CatalogVersionProvider getCatalogVersionProvider()
      The database's catalog version provider.
    • setCatalogVersionProvider

      void setCatalogVersionProvider(CatalogVersionProvider provider)
      The database's catalog version provider.
    • getOrderProvider

      Comparator<Definition> getOrderProvider()
      The database's order provider.
    • setOrderProvider

      void setOrderProvider(Comparator<Definition> provider)
      The database's order provider.
    • markUsed

      void markUsed(ForcedType forcedType)
      Mark a forced type as used.
    • getUnusedForcedTypes

      List<ForcedType> getUnusedForcedTypes()
      Retrieve the not-yet used forced types.
    • getConfiguredForcedTypes

      List<ForcedType> getConfiguredForcedTypes()
      Database objects matching any of these field names will be generated as forced types.
    • getConfiguredForcedType

      ForcedType getConfiguredForcedType(Definition definition)
      Get the configured forced type object for any given Definition, or null if no ForcedType matches the definition.
    • getConfiguredForcedType

      ForcedType getConfiguredForcedType(Definition definition, DataTypeDefinition definedType)
      Get the configured forced type object for any given Definition, or null if no ForcedType matches the definition.
    • setConfiguredEmbeddables

      void setConfiguredEmbeddables(List<EmbeddableDefinitionType> configuredEmbeddables)
      Configure the embeddable types.
    • getConfiguredEmbeddables

      List<EmbeddableDefinitionType> getConfiguredEmbeddables()
      Get the configured embeddable type definitions for any given Definition.
    • markUsed

      void markUsed(EmbeddableDefinitionType embeddable)
      Mark an embeddable as used.
    • getUnusedEmbeddables

      List<EmbeddableDefinitionType> getUnusedEmbeddables()
      Retrieve the not-yet used embeddables.
    • embeddablePrimaryKeys

      String embeddablePrimaryKeys()
      A regular expression matching primary keys for which embeddable types should be generated.

      This feature is available in the commercial distribution only.

    • setEmbeddablePrimaryKeys

      void setEmbeddablePrimaryKeys(String embeddablePrimaryKeys)
      A regular expression matching primary keys for which embeddable types should be generated.

      This feature is available in the commercial distribution only.

    • embeddableUniqueKeys

      String embeddableUniqueKeys()
      A regular expression matching unique keys for which embeddable types should be generated.

      This feature is available in the commercial distribution only.

    • setEmbeddableUniqueKeys

      void setEmbeddableUniqueKeys(String embeddableUniqueKeys)
      A regular expression matching unique keys for which embeddable types should be generated.

      This feature is available in the commercial distribution only.

    • embeddableDomains

      String embeddableDomains()
      A regular expression matching domain type definitions for which embeddable types should be generated.

      This feature is available in the commercial distribution only.

    • setEmbeddableDomains

      void setEmbeddableDomains(String embeddableDomains)
      A regular expression matching domain type definitions for which embeddable types should be generated.

      This feature is available in the commercial distribution only.

    • readonlyIdentities

      boolean readonlyIdentities()
      Whether identity columns should expose DataType.readonly() behaviour.

      This feature is available in the commercial distribution only.

    • setReadonlyIdentities

      void setReadonlyIdentities(boolean readonlyIdentities)
      Whether identity columns should expose DataType.readonly() behaviour.

      This feature is available in the commercial distribution only.

    • readonlyComputedColumns

      boolean readonlyComputedColumns()
      Whether computed columns columns should expose DataType.readonly() behaviour.

      This feature is available in the commercial distribution only.

    • setReadonlyComputedColumns

      void setReadonlyComputedColumns(boolean readonlyComputedColumns)
      Whether computed columns columns should expose DataType.readonly() behaviour.

      This feature is available in the commercial distribution only.

    • readonlyNonUpdatableColumns

      boolean readonlyNonUpdatableColumns()
      Whether columns that are known not to be updatable (e.g. in views) should expose DataType.readonly() behaviour.

      This feature is available in the commercial distribution only.

    • setReadonlyNonUpdatableColumns

      void setReadonlyNonUpdatableColumns(boolean readonlyNonUpdatableColumns)
      Whether columns that are known not to be updatable (e.g. in views) should expose DataType.readonly() behaviour.

      This feature is available in the commercial distribution only.

    • setConfiguredComments

      void setConfiguredComments(List<CommentType> configuredComments)
      Configure the comments.
    • getConfiguredComments

      List<CommentType> getConfiguredComments()
      Get the configured comments.
    • markUsed

      void markUsed(CommentType comment)
      Mark a comment as used.
    • getUnusedComments

      List<CommentType> getUnusedComments()
      Retrieve the not-yet used comments.
    • setConfiguredSyntheticObjects

      void setConfiguredSyntheticObjects(SyntheticObjectsType configuredSyntheticObjects)
      Configure the synthetic objects.
    • getConfiguredSyntheticColumns

      List<SyntheticColumnType> getConfiguredSyntheticColumns()
      Get the configured synthetic columns.
    • getConfiguredSyntheticReadonlyColumns

      List<SyntheticReadonlyColumnType> getConfiguredSyntheticReadonlyColumns()
      Get the configured synthetic readonly columns.
    • getConfiguredSyntheticReadonlyRowids

      List<SyntheticReadonlyRowidType> getConfiguredSyntheticReadonlyRowids()
      Get the configured synthetic readonly rowids.
    • getConfiguredSyntheticIdentities

      List<SyntheticIdentityType> getConfiguredSyntheticIdentities()
      Get the configured synthetic identities.
    • getConfiguredSyntheticDefaults

      List<SyntheticDefaultType> getConfiguredSyntheticDefaults()
      Get the configured synthetic defaults.
    • getConfiguredSyntheticEnums

      List<SyntheticEnumType> getConfiguredSyntheticEnums()
      Get the configured synthetic enums.
    • getConfiguredSyntheticEnum

      SyntheticEnumType getConfiguredSyntheticEnum(Definition definition)
      Get the configured forced type object for any given Definition, or null if no SyntheticEnumType matches the definition.
    • getConfiguredSyntheticPrimaryKeys

      List<SyntheticPrimaryKeyType> getConfiguredSyntheticPrimaryKeys()
      Get the configured synthetic primary keys.
    • getConfiguredSyntheticUniqueKeys

      List<SyntheticUniqueKeyType> getConfiguredSyntheticUniqueKeys()
      Get the configured synthetic unique keys.
    • getConfiguredSyntheticForeignKeys

      List<SyntheticForeignKeyType> getConfiguredSyntheticForeignKeys()
      Get the configured synthetic foreign keys.
    • getConfiguredSyntheticSynonyms

      List<SyntheticSynonymType> getConfiguredSyntheticSynonyms()
      Get the configured synthetic synonyms.
    • getConfiguredSyntheticViews

      List<SyntheticViewType> getConfiguredSyntheticViews()
      Get the configured synthetic views.
    • getConfiguredSyntheticDaos

      List<SyntheticDaoType> getConfiguredSyntheticDaos()
      Get the configured synthetic DAOs.
    • markUsed

      void markUsed(SyntheticColumnType readonlyColumn)
      Mark a synthetic column as used.
    • getUnusedSyntheticColumns

      List<SyntheticColumnType> getUnusedSyntheticColumns()
      Retrieve the not-yet used synthetic columns.
    • markUsed

      void markUsed(SyntheticReadonlyColumnType readonlyColumn)
      Mark a synthetic readonly column as used.
    • getUnusedSyntheticReadonlyColumns

      List<SyntheticReadonlyColumnType> getUnusedSyntheticReadonlyColumns()
      Retrieve the not-yet used synthetic readonly columns.
    • markUsed

      void markUsed(SyntheticReadonlyRowidType readonlyRowid)
      Mark a synthetic readonly rowids as used.
    • getUnusedSyntheticReadonlyRowids

      List<SyntheticReadonlyRowidType> getUnusedSyntheticReadonlyRowids()
      Retrieve the not-yet used synthetic readonly rowids.
    • markUsed

      void markUsed(SyntheticIdentityType identity)
      Mark a synthetic identity as used.
    • getUnusedSyntheticIdentities

      List<SyntheticIdentityType> getUnusedSyntheticIdentities()
      Retrieve the not-yet used synthetic identities.
    • markUsed

      void markUsed(SyntheticDefaultType default_)
      Mark a synthetic default as used.
    • getUnusedSyntheticDefaults

      List<SyntheticDefaultType> getUnusedSyntheticDefaults()
      Retrieve the not-yet used synthetic defaults.
    • markUsed

      void markUsed(SyntheticEnumType e)
      Mark a synthetic enum as used.
    • getUnusedSyntheticEnums

      List<SyntheticEnumType> getUnusedSyntheticEnums()
      Retrieve the not-yet used synthetic enums.
    • markUsed

      void markUsed(SyntheticPrimaryKeyType primaryKey)
      Mark a synthetic primary key as used.
    • getUnusedSyntheticPrimaryKeys

      List<SyntheticPrimaryKeyType> getUnusedSyntheticPrimaryKeys()
      Retrieve the not-yet used synthetic primary keys.
    • markUsed

      void markUsed(SyntheticUniqueKeyType uniqueKey)
      Mark a synthetic unique key as used.
    • getUnusedSyntheticUniqueKeys

      List<SyntheticUniqueKeyType> getUnusedSyntheticUniqueKeys()
      Retrieve the not-yet used synthetic unique keys.
    • markUsed

      void markUsed(SyntheticForeignKeyType foreignKey)
      Mark a synthetic foreign key as used.
    • getUnusedSyntheticForeignKeys

      List<SyntheticForeignKeyType> getUnusedSyntheticForeignKeys()
      Retrieve the not-yet used synthetic foreign keys.
    • markUsed

      void markUsed(SyntheticSynonymType synonym)
      Mark a synthetic synonym as used.
    • getUnusedSyntheticSynonyms

      List<SyntheticSynonymType> getUnusedSyntheticSynonyms()
      Retrieve the not-yet used synthetic synonyms.
    • markUsed

      void markUsed(SyntheticViewType view)
      Mark a synthetic view as used.
    • getUnusedSyntheticViews

      List<SyntheticViewType> getUnusedSyntheticViews()
      Retrieve the not-yet used synthetic views.
    • getDialect

      SQLDialect getDialect()
      Get the dialect for this database.
    • setDialect

      void setDialect(SQLDialect dialect)
      Set the dialect for this database.
    • create

      DSLContext create()
      Create the factory for this database.
    • isArrayType

      boolean isArrayType(String dataType)
      Check whether a type is an array type.
    • setSupportsUnsignedTypes

      void setSupportsUnsignedTypes(boolean supportsUnsignedTypes)
      Whether this database supports unsigned types.
    • supportsUnsignedTypes

      boolean supportsUnsignedTypes()
      Whether this database supports unsigned types.
    • setIntegerDisplayWidths

      void setIntegerDisplayWidths(boolean integerDisplayWidths)
      Whether this database includes integer display widths in metadata, where applicable.
    • integerDisplayWidths

      boolean integerDisplayWidths()
      Whether this database includes integer display widths in metadata, where applicable.
    • setIgnoreProcedureReturnValues

      void setIgnoreProcedureReturnValues(boolean ignoreProcedureReturnValues)
      Whether this database should ignore procedure return values.
    • ignoreProcedureReturnValues

      boolean ignoreProcedureReturnValues()
      Whether this database should ignore procedure return values.
    • setDateAsTimestamp

      void setDateAsTimestamp(boolean dateAsTimestamp)
      Whether DATE columns should be treated as TIMESTAMP columns.
    • dateAsTimestamp

      boolean dateAsTimestamp()
      Whether DATE columns should be treated as TIMESTAMP columns.
    • setJavaTimeTypes

      void setJavaTimeTypes(boolean javaTimeTypes)
      Whether java.time types are used, as opposed to java.sql types.
    • javaTimeTypes

      boolean javaTimeTypes()
      Whether java.time types are used, as opposed to java.sql types.
    • setIncludeRelations

      void setIncludeRelations(boolean includeRelations)
      [#3559] Whether relations (i.e. constraints) should be included in this database.
    • includeRelations

      boolean includeRelations()
      [#3559] Whether relations (i.e. constraints) should be included in this database.
    • setTableValuedFunctions

      void setTableValuedFunctions(boolean tableValuedFunctions)
      [#4838] Whether table-valued functions should be reported as tables.
    • tableValuedFunctions

      boolean tableValuedFunctions()
      [#4838] Whether table-valued functions should be reported as tables.
    • exists

      boolean exists(TableField<?,?> field)
      Check for the existence of a table field in the dictionary views.
    • existAll

      boolean existAll(TableField<?,?>... fields)
      Check for the existence of several table fields in the dictionary views.
    • exists

      boolean exists(Table<?> table)
      Check for the existence of a table in the dictionary views.
    • existAll

      boolean existAll(Table<?>... tables)
      Check for the existence of several tables in the dictionary views.
    • setProperties

      void setProperties(Properties properties)
      Database properties.

      These properties are typically used by database implementations like the jooq-meta-extensions's JPADatabase (reverse-engineering JPA-annotated entities: properties are used to describe entity lookup paths) or the XMLDatabase (reverse-engineering an XML file: properties are used to describe the XML file's location).

      User-defined database implementations may use these properties for the same reason.

    • getProperties

      Properties getProperties()
      Database properties.

      These properties are typically used by database implementations like the jooq-meta-extensions's JPADatabase (reverse-engineering JPA-annotated entities: properties are used to describe entity lookup paths) or the XMLDatabase (reverse-engineering an XML file: properties are used to describe the XML file's location).

      User-defined database implementations may use these properties for the same reason.

    • setBasedir

      void setBasedir(String basedir)
      The basedir that can be used by file based implementations to resolve relative paths.
    • getBasedir

      String getBasedir()
      The basedir that can be used by file based implementations to resolve relative paths.
    • close

      void close()
      Release any resources that this Database may have allocated.
      Specified by:
      close in interface AutoCloseable
    • doOnce

      void doOnce(Object key, Runnable runnable)
      Do something (e.g. log a message) only once per key.