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

Orville.PostgreSQL.Expr.Name

Description

Since: 1.0.0.0

Synopsis

Documentation

data TableName Source #

Type to represent a SQL table name. TableName values constructed via the tableName function will be properly escaped as part of the generated SQL. E.G.

"some_table_name"

TableName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

tableName :: String -> TableName Source #

Construct a TableName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

data SequenceName Source #

Type to represent a SQL sequence name. SequenceName values constructed via the sequenceName function will be properly escaped as part of the generated SQL. E.G.

"some_sequence_name"

SequenceName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

sequenceName :: String -> SequenceName Source #

Construct a SequenceName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

data SchemaName Source #

Type to represent a SQL schema name. SchemaName values constructed via the schemaName function will be properly escaped as part of the generated SQL. E.G.

"some_schema_name"

SchemaName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

schemaName :: String -> SchemaName Source #

Construct a SchemaName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

data SavepointName Source #

Type to represent a SQL savepoint name. SavepointName values constructed via the savepointName function will be properly escaped as part of the generated SQL. E.G.

"some_savepoint_name"

SavepointName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

savepointName :: String -> SavepointName Source #

Construct a SavepointName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

data Qualified name Source #

Type to represent a qualified SQL name. E.G.

"some_schema_name"."some_table_name"

Qualified provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

Instances

Instances details
SqlExpression (Qualified name) Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.Qualified

qualifyTable :: Maybe SchemaName -> TableName -> Qualified TableName Source #

Optionally qualifies a TableName with a SchemaName.

Note: If you already have a TableIdentifier in hand you should probably use tableIdQualifiedName instead. @since 1.0.0.0

qualifySequence :: Maybe SchemaName -> SequenceName -> Qualified SequenceName Source #

Optionally qualifies a SequenceName with a SchemaName.

Note: If you already have a SequenceIdentifier in hand you should probably use sequenceIdQualifiedName instead.

Since: 1.0.0.0

qualifyColumn :: Maybe SchemaName -> TableName -> ColumnName -> Qualified ColumnName Source #

Qualifies a ColumnName with a TableName and, optionally, a SchemaName. This should be used to refer to the column in SQL queries where a qualified reference is appropriate.

Since: 1.0.0.0

data IndexName Source #

Type to represent a SQL index name. IndexName values constructed via the indexName function will be properly escaped as part of the generated SQL. E.G.

"some_index_name"

IndexName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

indexName :: String -> IndexName Source #

Construct an IndexName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

data Identifier Source #

Type to represent a SQL identifier. Identifier values constructed via the identifier function will be properly escaped as part of the generated SQL. E.G.

"some_identifier"

Identifier provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

identifier :: String -> Identifier Source #

Construct an Identifier from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

identifierFromBytes :: ByteString -> Identifier Source #

Construct an Identifier from a ByteString with proper escaping as part of the generated SQL.

Since: 1.0.0.0

class IdentifierExpression name where Source #

This class aids in giving additional polymorphism so that many different identifiers can be created without being forced to only use the Identifier type.

Since: 1.0.0.0

Methods

toIdentifier :: name -> Identifier Source #

Since: 1.0.0.0

fromIdentifier :: Identifier -> name Source #

Since: 1.0.0.0

Instances

Instances details
IdentifierExpression ColumnName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.ColumnName

IdentifierExpression ConstraintName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.ConstraintName

IdentifierExpression CursorName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.CursorName

IdentifierExpression FunctionName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.FunctionName

IdentifierExpression Identifier Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.Identifier

IdentifierExpression IndexName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.IndexName

IdentifierExpression SavepointName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.SavepointName

IdentifierExpression SchemaName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.SchemaName

IdentifierExpression SequenceName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.SequenceName

IdentifierExpression TableName Source #

Since: 1.0.0.0

Instance details

Defined in Orville.PostgreSQL.Expr.Internal.Name.TableName

data FunctionName Source #

Type to represent a SQL function name. FunctionName values constructed via the functionName function will be properly escaped as part of the generated SQL. E.G.

"some_function_name"

FunctionName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

functionName :: String -> FunctionName Source #

Construct a FunctionName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

data CursorName Source #

Type to represent a SQL cursor name. CursorName values constructed via the cursorName function will be properly escaped as part of the generated SQL. E.G.

"some_cursor_name"

CursorName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

cursorName :: String -> CursorName Source #

Construct a CursorName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

data ConstraintName Source #

Type to represent a SQL constraint name. ConstraintName values constructed via the constraintName function will be properly escaped as part of the generated SQL. E.G.

"some_constraint_name"

ConstraintName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

constraintName :: String -> ConstraintName Source #

Construct a ConstraintName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0

data ColumnName Source #

Type to represent a SQL column name. ColumnName values constructed via the columnName function will be properly escaped as part of the generated SQL. E.G.

"some_column_name"

ColumnName provides a SqlExpression instance. See unsafeSqlExpression for how to construct a value with your own custom SQL.

Since: 1.0.0.0

columnName :: String -> ColumnName Source #

Construct a ColumnName from a String with proper escaping as part of the generated SQL.

Since: 1.0.0.0