Copyright | Flipstone Technology Partners 2023 |
---|---|
License | MIT |
Stability | Stable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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 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 |
SqlExpression SequenceName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.SequenceName 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 toIdentifier :: SchemaName -> Identifier Source # | |
SqlExpression SchemaName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.SchemaName toRawSql :: SchemaName -> RawSql Source # unsafeFromRawSql :: RawSql -> SchemaName Source # |
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 |
SqlExpression SavepointName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.SavepointName 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 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 toIdentifier :: Identifier -> Identifier Source # | |
SqlExpression Identifier Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.Identifier toRawSql :: Identifier -> RawSql Source # unsafeFromRawSql :: RawSql -> Identifier Source # |
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
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 |
SqlExpression FunctionName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.FunctionName 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 toIdentifier :: CursorName -> Identifier Source # | |
SqlExpression CursorName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.CursorName toRawSql :: CursorName -> RawSql Source # unsafeFromRawSql :: RawSql -> CursorName Source # |
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 |
SqlExpression ConstraintName Source # | 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
Instances
IdentifierExpression ColumnName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.ColumnName toIdentifier :: ColumnName -> Identifier Source # | |
SqlExpression ColumnName Source # | Since: 1.0.0.0 |
Defined in Orville.PostgreSQL.Expr.Internal.Name.ColumnName toRawSql :: ColumnName -> RawSql Source # unsafeFromRawSql :: RawSql -> ColumnName Source # |
columnName :: String -> ColumnName Source #
Construct a ColumnName
from a String
with proper escaping as part of the generated SQL.
Since: 1.0.0.0