@libreworks/db-provision-pgsql
    Preparing search index...

    Class Schema

    A PostgreSQL schema.

    Hierarchy (View Summary)

    Implements

    Index

    Constructors

    • Creates a new Schema.

      Parameters

      • catalog: Catalog

        The database catalog to which this schema belongs

      • name: string

        The name of this schema

      • Optionalowner: Role

        Optional, the owner of this schema

      Returns Schema

    Accessors

    • get catalog(): Catalog

      Returns Catalog

      The catalog to which this schema belongs.

    • get grantName(): string

      Formats this object for use in a GRANT statement.

      Returns string

      This object name for use in a GRANT statement

    • get name(): string

      Gets the name of this database object.

      Returns string

      The name of this database object

    • get owner(): undefined | Role

      Returns undefined | Role

      The owner of this schema, or undefined

    Methods

    • Returns Securable

      A Securable that represents all routines currently in this schema

    • Returns Securable

      A Securable that represents all sequences currently in this schema

    • Returns Securable

      A Securable that represents all tables currently in this schema

    • Changes the owner of this schema to someone else.

      Parameters

      • to: Role

        The new owner

      Returns Executable

      An executable statement

    • Assigns privileges for this object to a role.

      Parameters

      • grantee: Role

        The role to receive the privileges

      • ...privileges: string[]

        The privileges to grant

      Returns Privileges

      The grant statement

    • Sets the default privileges for newly created sequences in this schema.

      Parameters

      • grantee: Role

        The role to receive the privileges

      • ...privileges: string[]

        The privileges to grant

      Returns DefaultPrivileges

    • Sets the default privileges for newly created sequences in this schema.

      Parameters

      • grantee: Role

        The role to receive the privileges

      • ...privileges: string[]

        The privileges to grant

      Returns DefaultPrivileges

    • Sets the default privileges for newly created tables in this schema.

      Parameters

      • grantee: Role

        The role to receive the privileges

      • ...privileges: string[]

        The privileges to grant

      Returns DefaultPrivileges

    • Produces a SQL statement that creates this object.

      Returns string

      The SQL statement