| Copyright | Flipstone Technology Partners 2023 |
|---|---|
| License | MIT |
| Stability | Stable |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Orville.PostgreSQL.Expr.Name
Description
Since: 1.0.0.0
Synopsis
- data TableName
- tableName :: String -> TableName
- data SequenceName
- sequenceName :: String -> SequenceName
- data SchemaName
- schemaName :: String -> SchemaName
- data SavepointName
- savepointName :: String -> SavepointName
- data Qualified name
- qualifyTable :: Maybe SchemaName -> TableName -> Qualified TableName
- qualifySequence :: Maybe SchemaName -> SequenceName -> Qualified SequenceName
- qualifyColumn :: Maybe SchemaName -> TableName -> ColumnName -> Qualified ColumnName
- data IndexName
- indexName :: String -> IndexName
- data Identifier
- identifier :: String -> Identifier
- identifierFromBytes :: ByteString -> Identifier
- class IdentifierExpression name where
- toIdentifier :: name -> Identifier
- fromIdentifier :: Identifier -> name
- data FunctionName
- functionName :: String -> FunctionName
- data CursorName
- cursorName :: String -> CursorName
- data ConstraintName
- constraintName :: String -> ConstraintName
- data ColumnName
- columnName :: String -> ColumnName
Documentation
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
Instances
| IdentifierExpression TableName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.TableName Methods toIdentifier :: TableName -> Identifier Source # fromIdentifier :: Identifier -> TableName Source # | |
| SqlExpression TableName Source # | 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
Instances
| IdentifierExpression SequenceName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.SequenceName Methods | |
| SqlExpression SequenceName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.SequenceName Methods toRawSql :: SequenceName -> RawSql Source # | |
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
Instances
| IdentifierExpression SchemaName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.SchemaName Methods toIdentifier :: SchemaName -> Identifier Source # | |
| SqlExpression SchemaName Source # | 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
Instances
| IdentifierExpression SavepointName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.SavepointName Methods | |
| SqlExpression SavepointName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.SavepointName Methods toRawSql :: SavepointName -> RawSql Source # | |
savepointName :: String -> SavepointName Source #
Construct a SavepointName from a String with proper escaping as part of the generated SQL.
Since: 1.0.0.0
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
| SqlExpression (Qualified name) Source # | Since: 1.0.0.0 |
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
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
Instances
| IdentifierExpression IndexName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.IndexName Methods toIdentifier :: IndexName -> Identifier Source # fromIdentifier :: Identifier -> IndexName Source # | |
| SqlExpression IndexName Source # | 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
Instances
| IdentifierExpression Identifier Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.Identifier Methods toIdentifier :: Identifier -> Identifier Source # | |
| SqlExpression Identifier Source # | 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
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
Instances
| IdentifierExpression FunctionName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.FunctionName Methods | |
| SqlExpression FunctionName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.FunctionName Methods toRawSql :: FunctionName -> RawSql Source # | |
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
Instances
| IdentifierExpression CursorName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.CursorName Methods toIdentifier :: CursorName -> Identifier Source # | |
| SqlExpression CursorName Source # | 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
Instances
| IdentifierExpression ConstraintName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.ConstraintName Methods | |
| SqlExpression ConstraintName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.ConstraintName Methods toRawSql :: ConstraintName -> RawSql Source # | |
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
Instances
| IdentifierExpression ColumnName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.ColumnName Methods toIdentifier :: ColumnName -> Identifier Source # | |
| SqlExpression ColumnName Source # | 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