orville-postgresql-1.0.0.0: A Haskell library for PostgreSQL
CopyrightFlipstone Technology Partners 2023
LicenseMIT
StabilityStable
Safe HaskellSafe-Inferred
LanguageHaskell2010

Orville.PostgreSQL.Schema.SequenceIdentifier

Description

Since: 1.0.0.0

Synopsis

Documentation

unqualifiedNameToSequenceId :: String -> SequenceIdentifier Source #

Constructs a SequenceIdentifier where the sequence's name will not be qualified by a particular schema.

Since: 1.0.0.0

setSequenceIdSchema :: String -> SequenceIdentifier -> SequenceIdentifier Source #

Sets the schema of the SequenceIdentifier. Wherever applicable, references to the sequence will be qualified by the given schema name.

Since: 1.0.0.0

sequenceIdQualifiedName :: SequenceIdentifier -> Qualified SequenceName Source #

Returns the 'Expr.Qualified Expr.SequenceName' that should be used to refer to the sequence in SQL queries.

Since: 1.0.0.0

sequenceIdUnqualifiedName :: SequenceIdentifier -> SequenceName Source #

Returns the unqualified SequenceName that should be used to refer to the sequence in SQL queries where an unqualified reference is appropriate.

Since: 1.0.0.0

sequenceIdSchemaName :: SequenceIdentifier -> Maybe SchemaName Source #

Returns the SchemaName (if any) that should be used to qualify references to the sequence in SQL queries.

Since: 1.0.0.0

sequenceIdToString :: SequenceIdentifier -> String Source #

Converts a SequenceIdentifier for a String for descriptive purposes. The name will be qualified if a schema name has been set for the identifier.

Note: You should not use this function for building SQL expressions. Use sequenceIdQualifiedName instead for that.

Since: 1.0.0.0

sequenceIdUnqualifiedNameString :: SequenceIdentifier -> String Source #

Retrieves the unqualified name of the sequence as a String.

Since: 1.0.0.0

sequenceIdSchemaNameString :: SequenceIdentifier -> Maybe String Source #

Retrieves the schema name of the sequence as a String.

Since: 1.0.0.0