Interface Schema
- All Superinterfaces:
Named, QueryPart, Serializable
- All Known Implementing Classes:
LazySchema, SchemaImpl
A schema.
Standard SQL object identifiers come in 3 parts:
[catalog].[schema].[object]. The schema is an object that groups
a set of objects, where objects can be Table, Sequence,
Routine and many other types of objects.
If your RDBMS supports schemas, and jOOQ supports using schemas with your RDBMS, then generated schemas references can be used to qualify objects
Example:
// Assuming import static org.jooq.impl.DSL.*;
using(configuration)
.select(SCHEMA.ACTOR.FIRST_NAME, SCHEMA.ACTOR.LAST_NAME)
.from(SCHEMA.ACTOR)
.fetch();
Compatibility:
Database products like SQLDialect.MYSQL and related dialects, such as
SQLDialect.MARIADB use catalogs ("databases") instead of schemas, and
lack schema support. For historic reasons, jOOQ treats MySQL catalogs as
schemas and does not support any catalog qualifier in MySQL.
Instances can be created using DSL.schema(Name) and overloads.
- Author:
- Lukas Eder
-
Method Summary
Modifier and TypeMethodDescriptionStream all domains contained in this schema.@NotNull Stream<ForeignKey<?, ?>> Stream all foreign keys contained in this schema.@Nullable CatalogThe catalog of this schema.@Nullable Domain<?> Get a domain by its name (case-sensitive) in this schema, ornullif no such domain exists.@Nullable Domain<?> Get a domain by its qualified or unqualified name in this schema, ornullif no such domain exists.List all domains contained in this schema.@NotNull List<ForeignKey<?, ?>> List all foreign keys contained in this schema.@NotNull List<ForeignKey<?, ?>> getForeignKeys(String name) Get foreign keys by their name (case-sensitive) in this schema.@NotNull List<ForeignKey<?, ?>> getForeignKeys(Name name) Get foreign keys by their qualified or unqualified name in this schema.List all indexes contained in this schema.getIndexes(String name) Get indexes by their name (case-sensitive) in this schema.getIndexes(Name name) Get indexes by their qualified or unqualified name in this schema.List all primary keys contained in this schema.getPrimaryKeys(String name) Get primary keys by their name (case-sensitive) in this schema.getPrimaryKeys(Name name) Get primary keys by their qualified or unqualified name in this schema.@Nullable Sequence<?> getSequence(String name) Get a sequence by its name (case-sensitive) in this schema, ornullif no such sequence exists.@Nullable Sequence<?> getSequence(Name name) Get a sequence by its qualified or unqualified name in this schema, ornullif no such sequence exists.List all sequences contained in this schema.@Nullable SynonymgetSynonym(String name) Get a synonym by its name (case-sensitive) in this schema, ornullif no such synonym exists.@Nullable SynonymgetSynonym(Name name) Get a synonym by its qualified or unqualified name in this schema, ornullif no such synonym exists.List all synonyms contained in this schema.@Nullable Table<?> Get a table by its name (case-sensitive) in this schema, ornullif no such table exists.@Nullable Table<?> Get a table by its qualified or unqualified name in this schema, ornullif no such table exists.List all tables contained in this schema.@Nullable TriggergetTrigger(String name) Get a trigger by its name (case-sensitive) in this schema, ornullif no such trigger exists.@Nullable TriggergetTrigger(Name name) Get a trigger by its qualified or unqualified name in this schema, ornullif no such trigger exists.List all triggers contained in this schema.@Nullable UDT<?> Get a UDT by its name (case-sensitive) in this schema, ornullif no such UDT exists.@Nullable UDT<?> Get a UDT by its qualified or unqualified name in this schema, ornullif no such UDT exists.getUDTs()List all UDTs contained in this schema.List all unique keys (including primary keys) contained in this schema.getUniqueKeys(String name) Get unique keys (including primary keys) by their name (case-sensitive) in this schema.getUniqueKeys(Name name) Get unique keys (including primary keys) by their qualified or unqualified name in this schema.Stream all indexes contained in this schema.Stream all primary keys contained in this schema.Stream all sequences contained in this schema.Stream all synonyms contained in this schema.Stream all tables contained in this schema.Stream all triggers contained in this schema.Stream all UDTs contained in this schema.Stream all unique keys (including primary keys) contained in this schema.Methods inherited from interface Named
$name, getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
-
Method Details
-
getCatalog
The catalog of this schema. -
tableStream
-
getTables
-
getTable
-
getTable
-
-
getPrimaryKeys
-
getPrimaryKeys
-
getPrimaryKeys
-
uniqueKeyStream
-
getUniqueKeys
-
getUniqueKeys
-
getUniqueKeys
-
foreignKeyStream
Stream all foreign keys contained in this schema. -
getForeignKeys
List all foreign keys contained in this schema. -
getForeignKeys
Get foreign keys by their name (case-sensitive) in this schema. -
getForeignKeys
Get foreign keys by their qualified or unqualified name in this schema. -
indexStream
-
getIndexes
-
getIndexes
-
getIndexes
-
udtStream
-
getUDTs
-
getUDT
-
getUDT
-
domainStream
-
getDomains
-
getDomain
-
getDomain
-
triggerStream
-
getTriggers
-
getTrigger
-
getTrigger
-
synonymStream
-
getSynonyms
-
getSynonym
-
getSynonym
-
sequenceStream
-
getSequences
-
getSequence
-
getSequence
-