Top Description Methods
org.jooq

public Interface Catalog

extends Named
Known Direct Implementers
org.jooq.impl.LazyCatalog, org.jooq.impl.CatalogImpl
Imports
java.util.List, java.util.stream.Stream, org.jooq.impl.DSL, org.jetbrains.annotations.NotNull, .Nullable

A catalog.

Standard SQL object identifiers come in 3 parts: [catalog].[schema].[object]. The catalog is an object that groups a set of Schema instances, which again group a set of objects, where objects can be Table, Sequence, Routine and many other types of objects.

If your RDBMS supports catalogs, and jOOQ supports using catalogs with your RDBMS, then generated catalog references can be used to fully qualify objects

Example:


// Assuming import static org.jooq.impl.DSL.*;

using(configuration)
   .select(CATALOG.SCHEMA.ACTOR.FIRST_NAME, CATALOG.SCHEMA.ACTOR.LAST_NAME)
   .from(CATALOG.SCHEMA.ACTOR)
   .fetch();

Compatibility:

jOOQ supports catalogs in SQLDialect#SQLSERVER and related dialects, such as SQLDialect#SQLDATAWAREHOUSE. 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#catalog(Name) and overloads.

Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public @Nullable Schema
getSchema(String name)

Get a schema by its name (case-sensitive) in this catalog, or null if no such schema exists.

public @Nullable Schema
getSchema(Name name)

Get a schema by its qualified or unqualified name in this catalog, or null if no such schema exists.

public @NotNull List<Schema>
getSchemas()

List all schemas contained in this catalog.

public @NotNull Stream<Schema>
schemaStream()

Stream all schemas contained in this catalog.

Inherited from org.jooq.Named:
$namegetCommentgetCommentPartgetNamegetQualifiedNamegetUnqualifiedName

Method Detail

getSchemaback to summary
public @Nullable Schema getSchema(String name)

Get a schema by its name (case-sensitive) in this catalog, or null if no such schema exists.

Annotations
@Nullable
getSchemaback to summary
public @Nullable Schema getSchema(Name name)

Get a schema by its qualified or unqualified name in this catalog, or null if no such schema exists.

Annotations
@Nullable
getSchemasback to summary
public @NotNull List<Schema> getSchemas()

List all schemas contained in this catalog.

Annotations
@NotNull
schemaStreamback to summary
public @NotNull Stream<Schema> schemaStream()

Stream all schemas contained in this catalog.

Annotations
@NotNull