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

Orville.PostgreSQL.Schema.TableIdentifier

Description

Since: 1.0.0.0

Synopsis

Documentation

unqualifiedNameToTableId :: String -> TableIdentifier Source #

Constructs a TableIdentifier where the table's name will not be qualified by a particular schema.

Since: 1.0.0.0

setTableIdSchema :: String -> TableIdentifier -> TableIdentifier Source #

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

Since: 1.0.0.0

tableIdQualifiedName :: TableIdentifier -> Qualified TableName Source #

Returns the 'Expr.Qualified Expr.TableName' that should be used to refer to the table in SQL queries.

Since: 1.0.0.0

tableIdUnqualifiedName :: TableIdentifier -> TableName Source #

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

Since: 1.0.0.0

tableIdSchemaName :: TableIdentifier -> Maybe SchemaName Source #

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

Since: 1.0.0.0

tableIdToString :: TableIdentifier -> String Source #

Converts a TableIdentifier to 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 tableIdQualifiedName instead for that.

Since: 1.0.0.0

tableIdUnqualifiedNameString :: TableIdentifier -> String Source #

Retrieves the unqualified name of the table as a String.

Since: 1.0.0.0

tableIdSchemaNameString :: TableIdentifier -> Maybe String Source #

Retrieves the schema name of the table as a String.

Since: 1.0.0.0