Safe Haskell | None |
---|---|
Language | Haskell2010 |
Data types for Postgres syntax. Access is given mainly for extension modules. The types and definitions here are likely to change.
- data PgSyntaxF f where
- EmitByteString :: ByteString -> f -> PgSyntaxF f
- EmitBuilder :: Builder -> f -> PgSyntaxF f
- EscapeString :: ByteString -> f -> PgSyntaxF f
- EscapeBytea :: ByteString -> f -> PgSyntaxF f
- EscapeIdentifier :: ByteString -> f -> PgSyntaxF f
- type PgSyntaxM = F PgSyntaxF
- newtype PgSyntax = PgSyntax {
- buildPgSyntax :: PgSyntaxM ()
- emit :: ByteString -> PgSyntax
- emitBuilder :: Builder -> PgSyntax
- escapeString :: ByteString -> PgSyntax
- escapeBytea :: ByteString -> PgSyntax
- escapeIdentifier :: ByteString -> PgSyntax
- pgParens :: PgSyntax -> PgSyntax
- nextSyntaxStep :: PgSyntaxF f -> f
- data PgCommandSyntax = PgCommandSyntax {}
- data PgCommandType
- newtype PgSelectSyntax = PgSelectSyntax {}
- newtype PgSelectSetQuantifierSyntax = PgSelectSetQuantifierSyntax {}
- newtype PgInsertSyntax = PgInsertSyntax {}
- newtype PgDeleteSyntax = PgDeleteSyntax {}
- newtype PgUpdateSyntax = PgUpdateSyntax {}
- newtype PgExpressionSyntax = PgExpressionSyntax {}
- newtype PgFromSyntax = PgFromSyntax {}
- newtype PgComparisonQuantifierSyntax = PgComparisonQuantifierSyntax {}
- newtype PgExtractFieldSyntax = PgExtractFieldSyntax {}
- newtype PgProjectionSyntax = PgProjectionSyntax {}
- newtype PgGroupingSyntax = PgGroupingSyntax {}
- data PgOrderingSyntax = PgOrderingSyntax {
- pgOrderingSyntax :: PgSyntax
- pgOrderingNullOrdering :: Maybe PgNullOrdering
- newtype PgValueSyntax = PgValueSyntax {}
- newtype PgTableSourceSyntax = PgTableSourceSyntax {}
- newtype PgFieldNameSyntax = PgFieldNameSyntax {}
- newtype PgAggregationSetQuantifierSyntax = PgAggregationSetQuantifierSyntax {}
- newtype PgInsertValuesSyntax = PgInsertValuesSyntax {}
- newtype PgInsertOnConflictSyntax = PgInsertOnConflictSyntax {}
- newtype PgInsertOnConflictTargetSyntax = PgInsertOnConflictTargetSyntax {}
- newtype PgConflictActionSyntax = PgConflictActionSyntax {}
- newtype PgCreateTableSyntax = PgCreateTableSyntax {}
- data PgTableOptionsSyntax = PgTableOptionsSyntax PgSyntax PgSyntax
- newtype PgColumnSchemaSyntax = PgColumnSchemaSyntax {}
- data PgDataTypeSyntax = PgDataTypeSyntax {}
- data PgColumnConstraintDefinitionSyntax = PgColumnConstraintDefinitionSyntax {}
- data PgColumnConstraintSyntax = PgColumnConstraintSyntax {}
- newtype PgTableConstraintSyntax = PgTableConstraintSyntax {}
- data PgMatchTypeSyntax = PgMatchTypeSyntax {}
- data PgReferentialActionSyntax = PgReferentialActionSyntax {}
- newtype PgAlterTableSyntax = PgAlterTableSyntax {}
- newtype PgAlterTableActionSyntax = PgAlterTableActionSyntax {}
- newtype PgAlterColumnActionSyntax = PgAlterColumnActionSyntax {}
- newtype PgWindowFrameSyntax = PgWindowFrameSyntax {}
- newtype PgWindowFrameBoundsSyntax = PgWindowFrameBoundsSyntax {}
- newtype PgWindowFrameBoundSyntax = PgWindowFrameBoundSyntax {}
- data PgSelectLockingClauseSyntax = PgSelectLockingClauseSyntax {}
- data PgSelectLockingStrength
- data PgSelectLockingOptions
- fromPgSelectLockingClause :: PgSelectLockingClauseSyntax -> PgSyntax
- pgSelectStmt :: PgSelectTableSyntax -> [PgOrderingSyntax] -> Maybe Integer -> Maybe Integer -> Maybe PgSelectLockingClauseSyntax -> PgSelectSyntax
- data PgDataTypeDescr
- pgCreateExtensionSyntax :: Text -> PgCommandSyntax
- pgDropExtensionSyntax :: Text -> PgCommandSyntax
- insertDefaults :: SqlInsertValues PgInsertValuesSyntax tbl
- pgSimpleMatchSyntax :: PgMatchTypeSyntax
- pgSelectSetQuantifierDistinctOn :: [PgExpressionSyntax] -> PgSelectSetQuantifierSyntax
- pgDataTypeJSON :: Value -> BeamSerializedDataType
- pgTsQueryType :: PgDataTypeSyntax
- pgTsVectorType :: PgDataTypeSyntax
- pgJsonType :: PgDataTypeSyntax
- pgJsonbType :: PgDataTypeSyntax
- pgUuidType :: PgDataTypeSyntax
- pgMoneyType :: PgDataTypeSyntax
- pgTsQueryTypeInfo :: TypeInfo
- pgTsVectorTypeInfo :: TypeInfo
- pgByteaType :: PgDataTypeSyntax
- pgTextType :: PgDataTypeSyntax
- pgUnboundedArrayType :: PgDataTypeSyntax -> PgDataTypeSyntax
- pgSerialType :: PgDataTypeSyntax
- pgSmallSerialType :: PgDataTypeSyntax
- pgBigSerialType :: PgDataTypeSyntax
- pgQuotedIdentifier :: Text -> PgSyntax
- pgSepBy :: PgSyntax -> [PgSyntax] -> PgSyntax
- pgDebugRenderSyntax :: PgSyntax -> IO ()
- pgRenderSyntaxScript :: PgSyntax -> ByteString
- pgBuildAction :: [Action] -> PgSyntax
- pgBinOp :: ByteString -> PgExpressionSyntax -> PgExpressionSyntax -> PgExpressionSyntax
- pgCompOp :: ByteString -> Maybe PgComparisonQuantifierSyntax -> PgExpressionSyntax -> PgExpressionSyntax -> PgExpressionSyntax
- pgUnOp :: ByteString -> PgExpressionSyntax -> PgExpressionSyntax
- pgPostFix :: ByteString -> PgExpressionSyntax -> PgExpressionSyntax
- pgTestSyntax :: PgSyntax -> [PgSyntaxPrim]
- data PostgresInaccessible
Documentation
data PgSyntaxF f where Source #
EmitByteString :: ByteString -> f -> PgSyntaxF f | |
EmitBuilder :: Builder -> f -> PgSyntaxF f | |
EscapeString :: ByteString -> f -> PgSyntaxF f | |
EscapeBytea :: ByteString -> f -> PgSyntaxF f | |
EscapeIdentifier :: ByteString -> f -> PgSyntaxF f |
A piece of Postgres SQL syntax, which may contain embedded escaped byte and
text sequences. PgSyntax
composes monoidally, and may be created with
emit
, emitBuilder
, escapeString
, escapBytea
, and escapeIdentifier
.
PgSyntax | |
|
emit :: ByteString -> PgSyntax Source #
emitBuilder :: Builder -> PgSyntax Source #
escapeString :: ByteString -> PgSyntax Source #
escapeBytea :: ByteString -> PgSyntax Source #
nextSyntaxStep :: PgSyntaxF f -> f Source #
data PgCommandSyntax Source #
Representation of an arbitrary Postgres command. This is the combination of
the command syntax (repesented by PgSyntax
), as well as the type of command
(represented by PgCommandType
). The command type is necessary for us to
know how to retrieve results from the database.
data PgCommandType Source #
newtype PgSelectSyntax Source #
IsSql92SelectSyntax
for Postgres
newtype PgSelectSetQuantifierSyntax Source #
newtype PgInsertSyntax Source #
IsSql92InsertSyntax
for Postgres
newtype PgDeleteSyntax Source #
IsSql92DeleteSyntax
for Postgres
newtype PgUpdateSyntax Source #
IsSql92UpdateSyntax
for Postgres
newtype PgExpressionSyntax Source #
newtype PgFromSyntax Source #
newtype PgComparisonQuantifierSyntax Source #
newtype PgProjectionSyntax Source #
newtype PgGroupingSyntax Source #
data PgOrderingSyntax Source #
PgOrderingSyntax | |
|
newtype PgValueSyntax Source #
newtype PgTableSourceSyntax Source #
newtype PgFieldNameSyntax Source #
newtype PgAggregationSetQuantifierSyntax Source #
newtype PgInsertValuesSyntax Source #
newtype PgInsertOnConflictSyntax Source #
newtype PgInsertOnConflictTargetSyntax Source #
newtype PgCreateTableSyntax Source #
newtype PgColumnSchemaSyntax Source #
data PgDataTypeSyntax Source #
data PgColumnConstraintDefinitionSyntax Source #
data PgColumnConstraintSyntax Source #
newtype PgTableConstraintSyntax Source #
data PgMatchTypeSyntax Source #
newtype PgAlterTableSyntax Source #
newtype PgAlterTableActionSyntax Source #
newtype PgAlterColumnActionSyntax Source #
newtype PgWindowFrameSyntax Source #
newtype PgWindowFrameBoundsSyntax Source #
newtype PgWindowFrameBoundSyntax Source #
data PgSelectLockingStrength Source #
Specifies the level of lock that will be taken against a row. See the manual section for more information.
PgSelectLockingStrengthUpdate | UPDATE |
PgSelectLockingStrengthNoKeyUpdate | NO KEY UPDATE |
PgSelectLockingStrengthShare | SHARE |
PgSelectLockingStrengthKeyShare | KEY SHARE |
data PgSelectLockingOptions Source #
Specifies how we should handle lock conflicts.
See the manual section for more information
PgSelectLockingOptionsNoWait |
|
PgSelectLockingOptionsSkipLocked |
|
:: PgSelectTableSyntax | |
-> [PgOrderingSyntax] | |
-> Maybe Integer | LIMIT |
-> Maybe Integer | OFFSET |
-> Maybe PgSelectLockingClauseSyntax | |
-> PgSelectSyntax |
data PgDataTypeDescr Source #
pgTsVectorTypeInfo :: TypeInfo Source #
Postgres TypeInfo for tsvector TODO Is the Oid stable from postgres instance to postgres instance?
pgQuotedIdentifier :: Text -> PgSyntax Source #
pgDebugRenderSyntax :: PgSyntax -> IO () Source #
pgBuildAction :: [Action] -> PgSyntax Source #
pgCompOp :: ByteString -> Maybe PgComparisonQuantifierSyntax -> PgExpressionSyntax -> PgExpressionSyntax -> PgExpressionSyntax Source #
pgTestSyntax :: PgSyntax -> [PgSyntaxPrim] Source #
data PostgresInaccessible Source #