-
- All Superinterfaces:
Named,QueryPart,Serializable
- All Known Implementing Classes:
LazySchema,SchemaImpl
public interface Schema extends Named
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 beTable,Sequence,Routineand 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.MYSQLand related dialects, such asSQLDialect.MARIADBuse 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description @NotNull Stream<Domain<?>>domainStream()Stream all domains contained in this schema.@Nullable CataloggetCatalog()The catalog of this schema.@Nullable Domain<?>getDomain(String name)Get a domain by its name (case-sensitive) in this schema, ornullif no such domain exists.@Nullable Domain<?>getDomain(Name name)Get a domain by its qualified or unqualified name in this schema, ornullif no such domain exists.@NotNull List<Domain<?>>getDomains()List all domains contained 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.@NotNull List<Sequence<?>>getSequences()List all sequences contained in this schema.@Nullable Table<?>getTable(String name)Get a table by its name (case-sensitive) in this schema, ornullif no such table exists.@Nullable Table<?>getTable(Name name)Get a table by its qualified or unqualified name in this schema, ornullif no such table exists.@NotNull List<Table<?>>getTables()List all tables contained in this schema.@Nullable UDT<?>getUDT(String name)Get a UDT by its name (case-sensitive) in this schema, ornullif no such UDT exists.@Nullable UDT<?>getUDT(Name name)Get a UDT by its qualified or unqualified name in this schema, ornullif no such UDT exists.@NotNull List<UDT<?>>getUDTs()List all UDTs contained in this schema.@NotNull Stream<Sequence<?>>sequenceStream()Stream all sequences contained in this schema.@NotNull Stream<Table<?>>tableStream()Stream all tables contained in this schema.@NotNull Stream<UDT<?>>udtStream()Stream all UDTs contained in this schema.-
Methods inherited from interface org.jooq.Named
getComment, getCommentPart, getName, getQualifiedName, getUnqualifiedName
-
-
-
-
Method Detail
-
getCatalog
@Nullable @Nullable Catalog getCatalog()
The catalog of this schema.
-
tableStream
@NotNull @NotNull Stream<Table<?>> tableStream()
Stream all tables contained in this schema.
-
getTable
@Nullable @Nullable Table<?> getTable(String name)
Get a table by its name (case-sensitive) in this schema, ornullif no such table exists.
-
getTable
@Nullable @Nullable Table<?> getTable(Name name)
Get a table by its qualified or unqualified name in this schema, ornullif no such table exists.
-
getUDT
@Nullable @Nullable UDT<?> getUDT(String name)
Get a UDT by its name (case-sensitive) in this schema, ornullif no such UDT exists.
-
getUDT
@Nullable @Nullable UDT<?> getUDT(Name name)
Get a UDT by its qualified or unqualified name in this schema, ornullif no such UDT exists.
-
domainStream
@NotNull @NotNull Stream<Domain<?>> domainStream()
Stream all domains contained in this schema.
-
getDomains
@NotNull @NotNull List<Domain<?>> getDomains()
List all domains contained in this schema.
-
getDomain
@Nullable @Nullable Domain<?> getDomain(String name)
Get a domain by its name (case-sensitive) in this schema, ornullif no such domain exists.
-
getDomain
@Nullable @Nullable Domain<?> getDomain(Name name)
Get a domain by its qualified or unqualified name in this schema, ornullif no such domain exists.
-
sequenceStream
@NotNull @NotNull Stream<Sequence<?>> sequenceStream()
Stream all sequences contained in this schema.
-
getSequences
@NotNull @NotNull List<Sequence<?>> getSequences()
List all sequences contained in this schema.
-
getSequence
@Nullable @Nullable Sequence<?> getSequence(String name)
Get a sequence by its name (case-sensitive) in this schema, ornullif no such sequence exists.
-
-