- All Superinterfaces:
Named
,QueryPart
,Serializable
- All Known Implementing Classes:
LazySchema
,SchemaImpl
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 Catalog
The catalog of this schema.@Nullable Domain<?>
Get a domain by its name (case-sensitive) in this schema, ornull
if no such domain exists.@Nullable Domain<?>
Get a domain by its qualified or unqualified name in this schema, ornull
if 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, ornull
if no such sequence exists.@Nullable Sequence<?>
getSequence(Name name)
Get a sequence by its qualified or unqualified name in this schema, ornull
if no such sequence exists.List all sequences contained in this schema.@Nullable Table<?>
Get a table by its name (case-sensitive) in this schema, ornull
if no such table exists.@Nullable Table<?>
Get a table by its qualified or unqualified name in this schema, ornull
if no such table exists.List all tables contained in this schema.@Nullable UDT<?>
Get a UDT by its name (case-sensitive) in this schema, ornull
if no such UDT exists.@Nullable UDT<?>
Get a UDT by its qualified or unqualified name in this schema, ornull
if 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 tables 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 org.jooq.Named
getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
-
Method Details
-
getCatalog
The catalog of this schema. -
tableStream
Stream all tables contained in this schema. -
getTables
List all tables contained in this schema. -
getTable
Get a table by its name (case-sensitive) in this schema, ornull
if no such table exists. -
getTable
Get a table by its qualified or unqualified name in this schema, ornull
if no such table exists. -
Stream all primary keys contained in this schema.
-
getPrimaryKeys
List all primary keys contained in this schema. -
getPrimaryKeys
Get primary keys by their name (case-sensitive) in this schema. -
getPrimaryKeys
Get primary keys by their qualified or unqualified name in this schema. -
uniqueKeyStream
Stream all unique keys (including primary keys) contained in this schema. -
getUniqueKeys
List all unique keys (including primary keys) contained in this schema. -
getUniqueKeys
Get unique keys (including primary keys) by their name (case-sensitive) in this schema. -
getUniqueKeys
Get unique keys (including primary keys) by their qualified or unqualified name in this schema. -
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
Stream all indexes contained in this schema. -
getIndexes
List all indexes contained in this schema. -
getIndexes
Get indexes by their name (case-sensitive) in this schema. -
getIndexes
Get indexes by their qualified or unqualified name in this schema. -
udtStream
Stream all UDTs contained in this schema. -
getUDTs
List all UDTs contained in this schema. -
getUDT
Get a UDT by its name (case-sensitive) in this schema, ornull
if no such UDT exists. -
getUDT
Get a UDT by its qualified or unqualified name in this schema, ornull
if no such UDT exists. -
domainStream
Stream all domains contained in this schema. -
getDomains
List all domains contained in this schema. -
getDomain
Get a domain by its name (case-sensitive) in this schema, ornull
if no such domain exists. -
getDomain
Get a domain by its qualified or unqualified name in this schema, ornull
if no such domain exists. -
sequenceStream
Stream all sequences contained in this schema. -
getSequences
List all sequences contained in this schema. -
getSequence
Get a sequence by its name (case-sensitive) in this schema, ornull
if no such sequence exists. -
getSequence
Get a sequence by its qualified or unqualified name in this schema, ornull
if no such sequence exists.
-