-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Connection layer between beam and postgres -- -- Beam driver for PostgreSQL, an advanced open-source RDBMS @package beam-postgres @version 0.5.2.1 -- | Data types for Postgres syntax. Access is given mainly for extension -- modules. The types and definitions here are likely to change. module Database.Beam.Postgres.Syntax data PgSyntaxF f [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 -- | 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. newtype PgSyntax PgSyntax :: PgSyntaxM () -> PgSyntax [buildPgSyntax] :: PgSyntax -> PgSyntaxM () emit :: ByteString -> PgSyntax emitBuilder :: Builder -> PgSyntax escapeString :: ByteString -> PgSyntax escapeBytea :: ByteString -> PgSyntax escapeIdentifier :: ByteString -> PgSyntax pgParens :: PgSyntax -> PgSyntax nextSyntaxStep :: PgSyntaxF f -> f -- | 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 PgCommandSyntax PgCommandSyntax :: PgCommandType -> PgSyntax -> PgCommandSyntax [pgCommandType] :: PgCommandSyntax -> PgCommandType [fromPgCommand] :: PgCommandSyntax -> PgSyntax data PgCommandType PgCommandTypeQuery :: PgCommandType PgCommandTypeDdl :: PgCommandType PgCommandTypeDataUpdate :: PgCommandType PgCommandTypeDataUpdateReturning :: PgCommandType -- | IsSql92SelectSyntax for Postgres newtype PgSelectSyntax PgSelectSyntax :: PgSyntax -> PgSelectSyntax [fromPgSelect] :: PgSelectSyntax -> PgSyntax newtype PgSelectSetQuantifierSyntax PgSelectSetQuantifierSyntax :: PgSyntax -> PgSelectSetQuantifierSyntax [fromPgSelectSetQuantifier] :: PgSelectSetQuantifierSyntax -> PgSyntax -- | IsSql92InsertSyntax for Postgres newtype PgInsertSyntax PgInsertSyntax :: PgSyntax -> PgInsertSyntax [fromPgInsert] :: PgInsertSyntax -> PgSyntax -- | IsSql92DeleteSyntax for Postgres newtype PgDeleteSyntax PgDeleteSyntax :: PgSyntax -> PgDeleteSyntax [fromPgDelete] :: PgDeleteSyntax -> PgSyntax -- | IsSql92UpdateSyntax for Postgres newtype PgUpdateSyntax PgUpdateSyntax :: PgSyntax -> PgUpdateSyntax [fromPgUpdate] :: PgUpdateSyntax -> PgSyntax newtype PgExpressionSyntax PgExpressionSyntax :: PgSyntax -> PgExpressionSyntax [fromPgExpression] :: PgExpressionSyntax -> PgSyntax newtype PgFromSyntax PgFromSyntax :: PgSyntax -> PgFromSyntax [fromPgFrom] :: PgFromSyntax -> PgSyntax newtype PgTableNameSyntax PgTableNameSyntax :: PgSyntax -> PgTableNameSyntax [fromPgTableName] :: PgTableNameSyntax -> PgSyntax newtype PgComparisonQuantifierSyntax PgComparisonQuantifierSyntax :: PgSyntax -> PgComparisonQuantifierSyntax [fromPgComparisonQuantifier] :: PgComparisonQuantifierSyntax -> PgSyntax newtype PgExtractFieldSyntax PgExtractFieldSyntax :: PgSyntax -> PgExtractFieldSyntax [fromPgExtractField] :: PgExtractFieldSyntax -> PgSyntax newtype PgProjectionSyntax PgProjectionSyntax :: PgSyntax -> PgProjectionSyntax [fromPgProjection] :: PgProjectionSyntax -> PgSyntax newtype PgGroupingSyntax PgGroupingSyntax :: PgSyntax -> PgGroupingSyntax [fromPgGrouping] :: PgGroupingSyntax -> PgSyntax data PgOrderingSyntax PgOrderingSyntax :: PgSyntax -> Maybe PgNullOrdering -> PgOrderingSyntax [pgOrderingSyntax] :: PgOrderingSyntax -> PgSyntax [pgOrderingNullOrdering] :: PgOrderingSyntax -> Maybe PgNullOrdering newtype PgValueSyntax PgValueSyntax :: PgSyntax -> PgValueSyntax [fromPgValue] :: PgValueSyntax -> PgSyntax newtype PgTableSourceSyntax PgTableSourceSyntax :: PgSyntax -> PgTableSourceSyntax [fromPgTableSource] :: PgTableSourceSyntax -> PgSyntax newtype PgFieldNameSyntax PgFieldNameSyntax :: PgSyntax -> PgFieldNameSyntax [fromPgFieldName] :: PgFieldNameSyntax -> PgSyntax newtype PgAggregationSetQuantifierSyntax PgAggregationSetQuantifierSyntax :: PgSyntax -> PgAggregationSetQuantifierSyntax [fromPgAggregationSetQuantifier] :: PgAggregationSetQuantifierSyntax -> PgSyntax newtype PgInsertValuesSyntax PgInsertValuesSyntax :: PgSyntax -> PgInsertValuesSyntax [fromPgInsertValues] :: PgInsertValuesSyntax -> PgSyntax newtype PgInsertOnConflictSyntax PgInsertOnConflictSyntax :: PgSyntax -> PgInsertOnConflictSyntax [fromPgInsertOnConflict] :: PgInsertOnConflictSyntax -> PgSyntax newtype PgInsertOnConflictTargetSyntax PgInsertOnConflictTargetSyntax :: PgSyntax -> PgInsertOnConflictTargetSyntax [fromPgInsertOnConflictTarget] :: PgInsertOnConflictTargetSyntax -> PgSyntax newtype PgConflictActionSyntax PgConflictActionSyntax :: PgSyntax -> PgConflictActionSyntax [fromPgConflictAction] :: PgConflictActionSyntax -> PgSyntax newtype PgCreateTableSyntax PgCreateTableSyntax :: PgSyntax -> PgCreateTableSyntax [fromPgCreateTable] :: PgCreateTableSyntax -> PgSyntax data PgTableOptionsSyntax PgTableOptionsSyntax :: PgSyntax -> PgSyntax -> PgTableOptionsSyntax newtype PgColumnSchemaSyntax PgColumnSchemaSyntax :: PgSyntax -> PgColumnSchemaSyntax [fromPgColumnSchema] :: PgColumnSchemaSyntax -> PgSyntax data PgDataTypeSyntax PgDataTypeSyntax :: PgDataTypeDescr -> PgSyntax -> BeamSerializedDataType -> PgDataTypeSyntax [pgDataTypeDescr] :: PgDataTypeSyntax -> PgDataTypeDescr [fromPgDataType] :: PgDataTypeSyntax -> PgSyntax [pgDataTypeSerialized] :: PgDataTypeSyntax -> BeamSerializedDataType data PgColumnConstraintDefinitionSyntax PgColumnConstraintDefinitionSyntax :: PgSyntax -> BeamSerializedConstraintDefinition -> PgColumnConstraintDefinitionSyntax [fromPgColumnConstraintDefinition] :: PgColumnConstraintDefinitionSyntax -> PgSyntax [pgColumnConstraintDefinitionSerialized] :: PgColumnConstraintDefinitionSyntax -> BeamSerializedConstraintDefinition data PgColumnConstraintSyntax PgColumnConstraintSyntax :: PgSyntax -> BeamSerializedConstraint -> PgColumnConstraintSyntax [fromPgColumnConstraint] :: PgColumnConstraintSyntax -> PgSyntax [pgColumnConstraintSerialized] :: PgColumnConstraintSyntax -> BeamSerializedConstraint newtype PgTableConstraintSyntax PgTableConstraintSyntax :: PgSyntax -> PgTableConstraintSyntax [fromPgTableConstraint] :: PgTableConstraintSyntax -> PgSyntax data PgMatchTypeSyntax PgMatchTypeSyntax :: PgSyntax -> BeamSerializedMatchType -> PgMatchTypeSyntax [fromPgMatchType] :: PgMatchTypeSyntax -> PgSyntax [pgMatchTypeSerialized] :: PgMatchTypeSyntax -> BeamSerializedMatchType data PgReferentialActionSyntax PgReferentialActionSyntax :: PgSyntax -> BeamSerializedReferentialAction -> PgReferentialActionSyntax [fromPgReferentialAction] :: PgReferentialActionSyntax -> PgSyntax [pgReferentialActionSerialized] :: PgReferentialActionSyntax -> BeamSerializedReferentialAction newtype PgAlterTableSyntax PgAlterTableSyntax :: PgSyntax -> PgAlterTableSyntax [fromPgAlterTable] :: PgAlterTableSyntax -> PgSyntax newtype PgAlterTableActionSyntax PgAlterTableActionSyntax :: PgSyntax -> PgAlterTableActionSyntax [fromPgAlterTableAction] :: PgAlterTableActionSyntax -> PgSyntax newtype PgAlterColumnActionSyntax PgAlterColumnActionSyntax :: PgSyntax -> PgAlterColumnActionSyntax [fromPgAlterColumnAction] :: PgAlterColumnActionSyntax -> PgSyntax newtype PgWindowFrameSyntax PgWindowFrameSyntax :: PgSyntax -> PgWindowFrameSyntax [fromPgWindowFrame] :: PgWindowFrameSyntax -> PgSyntax newtype PgWindowFrameBoundsSyntax PgWindowFrameBoundsSyntax :: PgSyntax -> PgWindowFrameBoundsSyntax [fromPgWindowFrameBounds] :: PgWindowFrameBoundsSyntax -> PgSyntax newtype PgWindowFrameBoundSyntax PgWindowFrameBoundSyntax :: (ByteString -> PgSyntax) -> PgWindowFrameBoundSyntax [fromPgWindowFrameBound] :: PgWindowFrameBoundSyntax -> ByteString -> PgSyntax data PgSelectLockingClauseSyntax PgSelectLockingClauseSyntax :: PgSelectLockingStrength -> [Text] -> Maybe PgSelectLockingOptions -> PgSelectLockingClauseSyntax [pgSelectLockingClauseStrength] :: PgSelectLockingClauseSyntax -> PgSelectLockingStrength [pgSelectLockingTables] :: PgSelectLockingClauseSyntax -> [Text] [pgSelectLockingClauseOptions] :: PgSelectLockingClauseSyntax -> Maybe PgSelectLockingOptions -- | Specifies the level of lock that will be taken against a row. See -- the manual section for more information. data PgSelectLockingStrength -- |
-- UPDATE --PgSelectLockingStrengthUpdate :: PgSelectLockingStrength -- |
-- NO KEY UPDATE --PgSelectLockingStrengthNoKeyUpdate :: PgSelectLockingStrength -- |
-- SHARE --PgSelectLockingStrengthShare :: PgSelectLockingStrength -- |
-- KEY SHARE --PgSelectLockingStrengthKeyShare :: PgSelectLockingStrength -- | Specifies how we should handle lock conflicts. -- -- See the manual section for more information data PgSelectLockingOptions -- | NOWAIT. Report an error rather than waiting for the lock PgSelectLockingOptionsNoWait :: PgSelectLockingOptions -- | SKIP LOCKED. Rather than wait for a lock, skip the row -- instead PgSelectLockingOptionsSkipLocked :: PgSelectLockingOptions fromPgSelectLockingClause :: PgSelectLockingClauseSyntax -> PgSyntax pgSelectStmt :: PgSelectTableSyntax -> [PgOrderingSyntax] -> Maybe Integer -> Maybe Integer -> Maybe PgSelectLockingClauseSyntax -> PgSelectSyntax defaultPgValueSyntax :: ToField a => a -> PgValueSyntax data PgDataTypeDescr PgDataTypeDescrOid :: Oid -> Maybe Int32 -> PgDataTypeDescr PgDataTypeDescrDomain :: Text -> PgDataTypeDescr data PgHasEnum PgHasEnum :: Text -> [Text] -> PgHasEnum pgCreateExtensionSyntax :: Text -> PgCommandSyntax pgDropExtensionSyntax :: Text -> PgCommandSyntax pgCreateEnumSyntax :: Text -> [PgValueSyntax] -> PgCommandSyntax pgDropTypeSyntax :: Text -> PgCommandSyntax pgSimpleMatchSyntax :: PgMatchTypeSyntax pgSelectSetQuantifierDistinctOn :: [PgExpressionSyntax] -> PgSelectSetQuantifierSyntax pgDataTypeJSON :: Value -> BeamSerializedDataType pgTsQueryType :: PgDataTypeSyntax pgTsVectorType :: PgDataTypeSyntax pgJsonType :: PgDataTypeSyntax pgJsonbType :: PgDataTypeSyntax pgUuidType :: PgDataTypeSyntax pgMoneyType :: PgDataTypeSyntax pgTsQueryTypeInfo :: TypeInfo -- | Postgres TypeInfo for tsvector TODO Is the Oid stable from postgres -- instance to postgres instance? pgTsVectorTypeInfo :: TypeInfo pgByteaType :: PgDataTypeSyntax pgTextType :: PgDataTypeSyntax pgUnboundedArrayType :: PgDataTypeSyntax -> PgDataTypeSyntax pgSerialType :: PgDataTypeSyntax pgSmallSerialType :: PgDataTypeSyntax pgBigSerialType :: PgDataTypeSyntax pgPointType :: PgDataTypeSyntax pgLineType :: PgDataTypeSyntax pgLineSegmentType :: PgDataTypeSyntax pgBoxType :: 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 instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgCommandType instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgExpressionSyntax instance GHC.Base.Monoid (Database.Beam.Query.CustomSQL.CustomSqlSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax) instance GHC.Generics.Generic Database.Beam.Postgres.Syntax.PgNullOrdering instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgNullOrdering instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgNullOrdering instance GHC.Generics.Generic Database.Beam.Postgres.Syntax.PgSelectLockingStrength instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgSelectLockingStrength instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgSelectLockingStrength instance GHC.Generics.Generic Database.Beam.Postgres.Syntax.PgSelectLockingOptions instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgSelectLockingOptions instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgSelectLockingOptions instance GHC.Generics.Generic Database.Beam.Postgres.Syntax.PgDataTypeDescr instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgDataTypeDescr instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgDataTypeDescr instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgColumnSchemaSyntax instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgColumnSchemaSyntax instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgColumnConstraintDefinitionSyntax instance GHC.Generics.Generic Database.Beam.Postgres.Syntax.PgHasEnum instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgHasEnum instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgHasEnum instance GHC.Enum.Bounded Database.Beam.Postgres.Syntax.PgEscapeType instance GHC.Enum.Enum Database.Beam.Postgres.Syntax.PgEscapeType instance GHC.Classes.Ord Database.Beam.Postgres.Syntax.PgEscapeType instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgEscapeType instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgEscapeType instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgSyntaxPrim instance GHC.Base.Functor Database.Beam.Postgres.Syntax.PgSyntaxF instance Data.String.IsString Database.Beam.Postgres.Syntax.PgSyntaxPrim instance Database.Beam.Migrate.Checks.HasDataTypeCreatedCheck Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance Data.Hashable.Class.Hashable Database.Beam.Postgres.Syntax.PgHasEnum instance Database.Beam.Migrate.Types.Predicates.DatabasePredicate Database.Beam.Postgres.Syntax.PgHasEnum instance Database.Beam.Backend.SQL.SQL2003.IsSql2003WindowFrameBoundsSyntax Database.Beam.Postgres.Syntax.PgWindowFrameBoundsSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003WindowFrameBoundSyntax Database.Beam.Postgres.Syntax.PgWindowFrameBoundSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003WindowFrameSyntax Database.Beam.Postgres.Syntax.PgWindowFrameSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003ExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92AlterTableActionSyntax Database.Beam.Postgres.Syntax.PgAlterTableActionSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92AlterColumnActionSyntax Database.Beam.Postgres.Syntax.PgAlterColumnActionSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92AlterTableSyntax Database.Beam.Postgres.Syntax.PgAlterTableSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92DdlCommandSyntax Database.Beam.Postgres.Syntax.PgCommandSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92DropTableSyntax Database.Beam.Postgres.Syntax.PgDropTableSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92ReferentialActionSyntax Database.Beam.Postgres.Syntax.PgReferentialActionSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92ColumnConstraintSyntax Database.Beam.Postgres.Syntax.PgColumnConstraintSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92MatchTypeSyntax Database.Beam.Postgres.Syntax.PgMatchTypeSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92CreateTableSyntax Database.Beam.Postgres.Syntax.PgCreateTableSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92TableConstraintSyntax Database.Beam.Postgres.Syntax.PgTableConstraintSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92ColumnConstraintDefinitionSyntax Database.Beam.Postgres.Syntax.PgColumnConstraintDefinitionSyntax instance Database.Beam.Backend.SQL.SQL92.Sql92DisplaySyntax Database.Beam.Postgres.Syntax.PgColumnConstraintDefinitionSyntax instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgColumnConstraintDefinitionSyntax instance Database.Beam.Migrate.SQL.SQL92.IsSql92ColumnSchemaSyntax Database.Beam.Postgres.Syntax.PgColumnSchemaSyntax instance Data.Hashable.Class.Hashable Database.Beam.Postgres.Syntax.PgColumnConstraintDefinitionSyntax instance Database.Beam.Migrate.SQL.SQL92.Sql92SerializableConstraintDefinitionSyntax Database.Beam.Postgres.Syntax.PgColumnConstraintDefinitionSyntax instance Database.Beam.Backend.SQL.SQL92.Sql92DisplaySyntax Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance Data.Hashable.Class.Hashable Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92DataTypeSyntax Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance Database.Beam.Backend.SQL.SQL99.IsSql99DataTypeSyntax Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2008BigIntDataTypeSyntax Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance Database.Beam.Migrate.SQL.SQL92.Sql92SerializableDataTypeSyntax Database.Beam.Postgres.Syntax.PgDataTypeSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92ExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL92.Sql92DisplaySyntax Database.Beam.Postgres.Syntax.PgColumnSchemaSyntax instance Data.Hashable.Class.Hashable Database.Beam.Postgres.Syntax.PgColumnSchemaSyntax instance Data.Hashable.Class.Hashable Database.Beam.Postgres.Syntax.PgDataTypeDescr instance Database.Beam.Backend.SQL.SQL92.IsSql92SelectSyntax Database.Beam.Postgres.Syntax.PgSelectSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92OrderingSyntax Database.Beam.Postgres.Syntax.PgOrderingSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003OrderingElementaryOLAPOperationsSyntax Database.Beam.Postgres.Syntax.PgOrderingSyntax instance Database.Beam.Backend.SQL.SQL99.IsSql99CommonTableExpressionSelectSyntax Database.Beam.Postgres.Syntax.PgSelectSyntax instance Database.Beam.Backend.SQL.SQL99.IsSql99RecursiveCommonTableExpressionSelectSyntax Database.Beam.Postgres.Syntax.PgSelectSyntax instance Database.Beam.Backend.SQL.SQL99.IsSql99CommonTableExpressionSyntax Database.Beam.Postgres.Syntax.PgCommonTableExpressionSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92InsertSyntax Database.Beam.Postgres.Syntax.PgInsertSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92InsertValuesSyntax Database.Beam.Postgres.Syntax.PgInsertValuesSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92UpdateSyntax Database.Beam.Postgres.Syntax.PgUpdateSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92FieldNameSyntax Database.Beam.Postgres.Syntax.PgFieldNameSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92FromSyntax Database.Beam.Postgres.Syntax.PgFromSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92TableSourceSyntax Database.Beam.Postgres.Syntax.PgTableSourceSyntax instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Types.Bool instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Types.Double instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Types.Float instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Int.Int8 instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Int.Int16 instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Int.Int32 instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Int.Int64 instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Integer.Type.Integer instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Word.Word8 instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Word.Word16 instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Word.Word32 instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Word.Word64 instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Text.Internal.Text instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Text.Internal.Lazy.Text instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Aeson.Types.Internal.Value instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Database.PostgreSQL.LibPQ.Oid instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Time.LocalTime.Internal.LocalTime.LocalTime instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Time.Clock.Internal.UTCTime.UTCTime instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Time.LocalTime.Internal.TimeOfDay.TimeOfDay instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Time.Clock.Internal.NominalDiffTime.NominalDiffTime instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Time.Calendar.Days.Day instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax [GHC.Types.Char] instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Database.PostgreSQL.Simple.HStore.Implementation.HStoreMap instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Database.PostgreSQL.Simple.HStore.Implementation.HStoreList instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Database.PostgreSQL.Simple.HStore.Implementation.HStoreBuilder instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Database.PostgreSQL.Simple.Time.Implementation.Date instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Database.PostgreSQL.Simple.Time.Implementation.LocalTimestamp instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Database.PostgreSQL.Simple.Time.Implementation.UTCTimestamp instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.Scientific.Scientific instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax (Data.CaseInsensitive.Internal.CI Data.Text.Internal.Text) instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax (Data.CaseInsensitive.Internal.CI Data.Text.Internal.Lazy.Text) instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Database.Beam.Backend.SQL.Types.SqlNull instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax x => Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax (GHC.Maybe.Maybe x) instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.ByteString.Internal.ByteString instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.ByteString.Lazy.Internal.ByteString instance Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax Data.UUID.Types.Internal.UUID instance Database.PostgreSQL.Simple.ToField.ToField a => Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax (Data.Vector.Vector a) instance (TypeError ...) => Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Types.Int instance (TypeError ...) => Database.Beam.Backend.SQL.SQL92.HasSqlValueSyntax Database.Beam.Postgres.Syntax.PgValueSyntax GHC.Types.Word instance Database.Beam.Backend.SQL.SQL92.IsSql92SelectTableSyntax Database.Beam.Postgres.Syntax.PgSelectTableSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92GroupingSyntax Database.Beam.Postgres.Syntax.PgGroupingSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92ProjectionSyntax Database.Beam.Postgres.Syntax.PgProjectionSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92ExtractFieldSyntax Database.Beam.Postgres.Syntax.PgExtractFieldSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92QuantifierSyntax Database.Beam.Postgres.Syntax.PgComparisonQuantifierSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92TableNameSyntax Database.Beam.Postgres.Syntax.PgTableNameSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92DeleteSyntax Database.Beam.Postgres.Syntax.PgDeleteSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92FromOuterJoinSyntax Database.Beam.Postgres.Syntax.PgFromSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92AggregationSetQuantifierSyntax Database.Beam.Postgres.Syntax.PgSelectSetQuantifierSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92AggregationExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92AggregationSetQuantifierSyntax Database.Beam.Postgres.Syntax.PgAggregationSetQuantifierSyntax instance Database.Beam.Query.CustomSQL.IsCustomSqlSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance GHC.Base.Semigroup (Database.Beam.Query.CustomSQL.CustomSqlSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax) instance Data.String.IsString (Database.Beam.Query.CustomSQL.CustomSqlSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax) instance Database.Beam.Backend.SQL.SQL99.IsSql99FunctionExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL99.IsSql99ExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL99.IsSql99ConcatExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003EnhancedNumericFunctionsExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003ExpressionAdvancedOLAPOperationsSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003ExpressionElementaryOLAPOperationsSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003EnhancedNumericFunctionsAggregationExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003NtileExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003LeadAndLagExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003FirstValueAndLastValueExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL2003.IsSql2003NthValueExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL99.IsSql99AggregationExpressionSyntax Database.Beam.Postgres.Syntax.PgExpressionSyntax instance Database.Beam.Backend.SQL.SQL92.IsSql92Syntax Database.Beam.Postgres.Syntax.PgCommandSyntax instance Data.Hashable.Class.Hashable Database.Beam.Postgres.Syntax.PgSyntax instance Database.Beam.Backend.SQL.SQL92.Sql92DisplaySyntax Database.Beam.Postgres.Syntax.PgSyntax instance GHC.Base.Semigroup Database.Beam.Postgres.Syntax.PgSyntax instance GHC.Base.Monoid Database.Beam.Postgres.Syntax.PgSyntax instance GHC.Classes.Eq Database.Beam.Postgres.Syntax.PgSyntax instance GHC.Show.Show Database.Beam.Postgres.Syntax.PgSyntax instance Data.Functor.Classes.Eq1 Database.Beam.Postgres.Syntax.PgSyntaxF instance GHC.Classes.Eq f => GHC.Classes.Eq (Database.Beam.Postgres.Syntax.PgSyntaxF f) -- | Module providing (almost) full support for Postgres query and data -- manipulation statements. These functions shadow the functions in -- Database.Beam.Query and provide a strict superset of -- functionality. They map 1-to-1 with the underlying Postgres support. module Database.Beam.Postgres.Full -- | Combines the result of a query along with a set of locked tables. Used -- as a return value for the lockingFor_ function. data PgWithLocking s a -- | An explicit lock against some tables. You can create a value of this -- type using the locked_ function. You can combine these values -- monoidally to combine multiple locks for use with the -- withLocks_ function. data PgLockedTables s -- | Specifies the level of lock that will be taken against a row. See -- the manual section for more information. data PgSelectLockingStrength -- |
-- UPDATE --PgSelectLockingStrengthUpdate :: PgSelectLockingStrength -- |
-- NO KEY UPDATE --PgSelectLockingStrengthNoKeyUpdate :: PgSelectLockingStrength -- |
-- SHARE --PgSelectLockingStrengthShare :: PgSelectLockingStrength -- |
-- KEY SHARE --PgSelectLockingStrengthKeyShare :: PgSelectLockingStrength -- | Specifies how we should handle lock conflicts. -- -- See the manual section for more information data PgSelectLockingOptions -- | NOWAIT. Report an error rather than waiting for the lock PgSelectLockingOptionsNoWait :: PgSelectLockingOptions -- | SKIP LOCKED. Rather than wait for a lock, skip the row -- instead PgSelectLockingOptionsSkipLocked :: PgSelectLockingOptions -- | Like lockingFor_, but does not require an explicit set of -- locked tables. This produces an empty FOR .. OF clause. lockingAllTablesFor_ :: (Database Postgres db, Projectible Postgres a, ThreadRewritable (QNested s) a) => PgSelectLockingStrength -> Maybe PgSelectLockingOptions -> Q Postgres db (QNested s) a -> Q Postgres db s (WithRewrittenThread (QNested s) s a) -- | Lock some tables during the execution of a query. This is rather -- complicated, and there are several usage examples in the user -- guide -- -- The Postgres locking clause is rather complex, and beam currently does -- not check several pre-conditions. It is assumed you kinda know what -- you're doing. -- -- Things which postgres doesn't like, but beam will do -- --
-- lateral_ (_tableA database) $ \tblA -> -- limit_ 3 $ -- ordering_ (\(_, b) -> asc_ (_bField2 b)) $ do -- b <- _tableB database -- guard_ (_bField1 b ==. _aField1 a) -- pure (a, b0 --lateral_ :: forall s a b db. (ThreadRewritable s a, ThreadRewritable (QNested s) b, Projectible Postgres b) => a -> (WithRewrittenThread s (QNested s) a -> Q Postgres db (QNested s) b) -> Q Postgres db s (WithRewrittenThread (QNested s) s b) -- | A beam-postgres-specific version of insert, which -- provides fuller support for the much richer Postgres INSERT -- syntax. This allows you to specify ON CONFLICT actions. For -- even more complete support, see insertReturning. insert :: DatabaseEntity Postgres db (TableEntity table) -> SqlInsertValues Postgres (table (QExpr Postgres s)) -> PgInsertOnConflict table -> SqlInsert Postgres table -- | The full Postgres INSERT syntax, supporting conflict actions -- and the RETURNING CLAUSE. See PgInsertOnConflict for -- how to specify a conflict action or provide onConflictDefault -- to preserve the behavior without any ON CONFLICT clause. The -- last argument takes a newly inserted row and returns the expression to -- be returned as part of the RETURNING clause. For a -- backend-agnostic version of this functionality see -- MonadBeamInsertReturning. Use runInsertReturning to -- get the results. insertReturning :: Projectible Postgres a => DatabaseEntity Postgres be (TableEntity table) -> SqlInsertValues Postgres (table (QExpr Postgres s)) -> PgInsertOnConflict table -> Maybe (table (QExpr Postgres PostgresInaccessible) -> a) -> PgInsertReturning (QExprToIdentity a) -- | The Postgres DEFAULT VALUES clause for the INSERT -- command. insertDefaults :: SqlInsertValues Postgres tbl runPgInsertReturningList :: (MonadBeam be m, BeamSqlBackendSyntax be ~ PgCommandSyntax, FromBackendRow be a) => PgInsertReturning a -> m [a] -- | The most general kind of INSERT that postgres can perform data PgInsertReturning a PgInsertReturning :: PgSyntax -> PgInsertReturning a PgInsertReturningEmpty :: PgInsertReturning a -- | What to do when an INSERT statement inserts a row into the -- table tbl that violates a constraint. newtype PgInsertOnConflict (tbl :: (* -> *) -> *) PgInsertOnConflict :: (tbl (QField QInternal) -> PgInsertOnConflictSyntax) -> PgInsertOnConflict (tbl :: (* -> *) -> *) -- | By default, Postgres will throw an error when a conflict is detected. -- This preserves that functionality. onConflictDefault :: PgInsertOnConflict tbl -- | Tells postgres what to do on an INSERT conflict. The first -- argument is the type of conflict to provide an action for. For -- example, to only provide an action for certain fields, use -- conflictingFields. Or to only provide an action over certain -- fields where a particular condition is met, use -- conflictingFields. If you have a particular constraint -- violation in mind, use conflictingConstraint. To perform an -- action on any conflict, use anyConflict. -- -- See the Postgres documentation. onConflict :: Beamable tbl => SqlConflictTarget Postgres tbl -> SqlConflictAction Postgres tbl -> PgInsertOnConflict tbl -- | Perform the action only if the given named constraint is violated conflictingConstraint :: Text -> SqlConflictTarget Postgres tbl class BeamSqlBackend be => BeamHasInsertOnConflict be where { -- | Specifies the kind of constraint that must be violated for the action -- to occur data family SqlConflictTarget be (table :: Type -> Type -> Type); -- | What to do when an INSERT statement inserts a row into the -- table tbl that violates a constraint. data family SqlConflictAction be (table :: Type -> Type -> Type); } insertOnConflict :: forall table (db :: (Type -> Type) -> Type) s. (BeamHasInsertOnConflict be, Beamable table) => DatabaseEntity be db (TableEntity table) -> SqlInsertValues be (table (QExpr be s)) -> SqlConflictTarget be table -> SqlConflictAction be table -> SqlInsert be table anyConflict :: forall (table :: (Type -> Type) -> Type). BeamHasInsertOnConflict be => SqlConflictTarget be table conflictingFields :: (BeamHasInsertOnConflict be, Projectible be proj) => (table (QExpr be QInternal) -> proj) -> SqlConflictTarget be table conflictingFieldsWhere :: (BeamHasInsertOnConflict be, Projectible be proj) => (table (QExpr be QInternal) -> proj) -> (forall s. () => table (QExpr be s) -> QExpr be s Bool) -> SqlConflictTarget be table onConflictDoNothing :: forall (table :: (Type -> Type) -> Type). BeamHasInsertOnConflict be => SqlConflictAction be table onConflictUpdateSet :: (BeamHasInsertOnConflict be, Beamable table) => (forall s. () => table (QField s) -> table (QExpr be s) -> QAssignment be s) -> SqlConflictAction be table onConflictUpdateSetWhere :: (BeamHasInsertOnConflict be, Beamable table) => (forall s. () => table (QField s) -> table (QExpr be s) -> QAssignment be s) -> (forall s. () => table (QField s) -> table (QExpr be s) -> QExpr be s Bool) -> SqlConflictAction be table onConflictUpdateAll :: forall be (table :: (Type -> Type) -> Type). (BeamHasInsertOnConflict be, Beamable table) => SqlConflictAction be table onConflictUpdateInstead :: (BeamHasInsertOnConflict be, Beamable table, ProjectibleWithPredicate AnyType () (InaccessibleQAssignment be) proj) => (table (Const (InaccessibleQAssignment be) :: Type -> Type) -> proj) -> SqlConflictAction be table -- | The most general kind of UPDATE that postgres can perform -- -- You can build this from a SqlUpdate by using returning -- --
-- update tbl where `returning` projection ---- -- Run the result with runPgUpdateReturningList data PgUpdateReturning a PgUpdateReturning :: PgSyntax -> PgUpdateReturning a PgUpdateReturningEmpty :: PgUpdateReturning a runPgUpdateReturningList :: (MonadBeam be m, BeamSqlBackendSyntax be ~ PgCommandSyntax, FromBackendRow be a) => PgUpdateReturning a -> m [a] -- | Postgres UPDATE ... RETURNING statement support. The last -- argument takes the newly inserted row and returns the values to be -- returned. Use runUpdateReturning to get the results. updateReturning :: Projectible Postgres a => DatabaseEntity Postgres be (TableEntity table) -> (forall s. table (QField s) -> QAssignment Postgres s) -> (forall s. table (QExpr Postgres s) -> QExpr Postgres s Bool) -> (table (QExpr Postgres PostgresInaccessible) -> a) -> PgUpdateReturning (QExprToIdentity a) -- | The most general kind of DELETE that postgres can perform -- -- You can build this from a SqlDelete by using returning -- --
-- delete tbl where `returning` projection ---- -- Run the result with runPgDeleteReturningList newtype PgDeleteReturning a PgDeleteReturning :: PgSyntax -> PgDeleteReturning a runPgDeleteReturningList :: (MonadBeam be m, BeamSqlBackendSyntax be ~ PgCommandSyntax, FromBackendRow be a) => PgDeleteReturning a -> m [a] -- | Postgres DELETE ... RETURNING statement support. The last -- argument takes the newly inserted row and returns the values to be -- returned. Use runDeleteReturning to get the results. deleteReturning :: Projectible Postgres a => DatabaseEntity Postgres be (TableEntity table) -> (forall s. table (QExpr Postgres s) -> QExpr Postgres s Bool) -> (table (QExpr Postgres PostgresInaccessible) -> a) -> PgDeleteReturning (QExprToIdentity a) class PgReturning cmd where { type family PgReturningType cmd :: * -> *; } returning :: (PgReturning cmd, Beamable tbl, Projectible Postgres a) => cmd Postgres tbl -> (tbl (QExpr Postgres PostgresInaccessible) -> a) -> PgReturningType cmd (QExprToIdentity a) instance GHC.Base.Monoid (Database.Beam.Postgres.Full.PgLockedTables s) instance GHC.Base.Semigroup (Database.Beam.Postgres.Full.PgLockedTables s) instance Database.Beam.Postgres.Full.PgReturning Database.Beam.Query.SqlInsert instance Database.Beam.Postgres.Full.PgReturning Database.Beam.Query.SqlUpdate instance Database.Beam.Postgres.Full.PgReturning Database.Beam.Query.SqlDelete instance Database.Beam.Query.Internal.ProjectibleWithPredicate c be res a => Database.Beam.Query.Internal.ProjectibleWithPredicate c be res (Database.Beam.Postgres.Full.PgWithLocking s a) instance Database.Beam.Backend.SQL.BeamExtensions.BeamHasInsertOnConflict Database.Beam.Postgres.Types.Postgres module Database.Beam.Postgres.CustomTypes data PgType a newtype PgTypeCheck PgTypeCheck :: (Text -> SomeDatabasePredicate) -> PgTypeCheck data PgDataTypeSchema a class IsPgCustomDataType a pgDataTypeName :: IsPgCustomDataType a => Proxy a -> Text pgDataTypeDescription :: IsPgCustomDataType a => PgDataTypeSchema a data PgHasEnum PgHasEnum :: Text -> [Text] -> PgHasEnum class HasSqlValueSyntax expr ty class BeamBackend be => FromBackendRow be a pgCustomEnumSchema :: HasSqlValueSyntax PgValueSyntax a => [a] -> PgDataTypeSchema a pgBoundedEnumSchema :: (Enum a, Bounded a, HasSqlValueSyntax PgValueSyntax a) => PgDataTypeSchema a pgCustomEnumActionProvider :: ActionProvider Postgres pgCreateEnumActionProvider :: ActionProvider Postgres pgDropEnumActionProvider :: ActionProvider Postgres pgChecksForTypeSchema :: PgDataTypeSchema a -> [PgTypeCheck] pgEnumValueSyntax :: (a -> String) -> a -> PgValueSyntax pgParseEnum :: (Enum a, Bounded a) => (a -> String) -> FromBackendRowM Postgres a createEnum :: forall a db. (HasSqlValueSyntax PgValueSyntax a, Enum a, Bounded a) => Text -> Migration Postgres (CheckedDatabaseEntity Postgres db (PgType a)) beamTypeForCustomPg :: CheckedDatabaseEntity Postgres db (PgType a) -> DataType Postgres a instance Database.Beam.Backend.SQL.Row.FromBackendRow Database.Beam.Postgres.Types.Postgres Database.Beam.Postgres.CustomTypes.PgRawString instance Database.PostgreSQL.Simple.FromField.FromField Database.Beam.Postgres.CustomTypes.PgRawString instance Database.Beam.Schema.Tables.IsDatabaseEntity Database.Beam.Postgres.Types.Postgres (Database.Beam.Postgres.CustomTypes.PgType a) instance Database.Beam.Migrate.Types.CheckedEntities.IsCheckedDatabaseEntity Database.Beam.Postgres.Types.Postgres (Database.Beam.Postgres.CustomTypes.PgType a) instance Database.Beam.Schema.Tables.RenamableWithRule (Database.Beam.Schema.Tables.FieldRenamer (Database.Beam.Schema.Tables.DatabaseEntityDescriptor Database.Beam.Postgres.Types.Postgres (Database.Beam.Postgres.CustomTypes.PgType a))) -- | Migrations support for beam-postgres. See Database.Beam.Migrate -- for more information on beam migrations. module Database.Beam.Postgres.Migrate -- | 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 PgCommandSyntax -- | Top-level migration backend for use by beam-migrate tools migrationBackend :: BeamMigrationBackend Postgres Pg -- | BeamDeserializers for postgres-specific types: -- --
-- arrayUpper_ @2 vectorValuedExpression --arrayUpper_ :: forall (dim :: Nat) context num v s. (KnownNat dim, WithinBounds dim (Vector v), Integral num) => QGenExpr context Postgres s (Vector v) -> QGenExpr context Postgres s num -- | Return the upper or lower bound of the given array at the given -- dimension (statically supplied as a type application on a Nat). -- Note that beam will attempt to statically determine if the dimension -- is in range. GHC errors will be thrown if this cannot be proved. -- -- For example, to get the upper bound of the 2nd-dimension of an array: -- --
-- arrayUpper_ @2 vectorValuedExpression --arrayLower_ :: forall (dim :: Nat) context num v s. (KnownNat dim, WithinBounds dim (Vector v), Integral num) => QGenExpr context Postgres s (Vector v) -> QGenExpr context Postgres s num -- | These functions can be used to find the lower and upper bounds of an -- array where the dimension number is not known until run-time. They are -- marked unsafe because they may cause query processing to fail at -- runtime, even if they typecheck successfully. arrayUpperUnsafe_ :: (Integral dim, Integral length) => QGenExpr context Postgres s (Vector v) -> QGenExpr context Postgres s dim -> QGenExpr context Postgres s (Maybe length) -- | These functions can be used to find the lower and upper bounds of an -- array where the dimension number is not known until run-time. They are -- marked unsafe because they may cause query processing to fail at -- runtime, even if they typecheck successfully. arrayLowerUnsafe_ :: (Integral dim, Integral length) => QGenExpr context Postgres s (Vector v) -> QGenExpr context Postgres s dim -> QGenExpr context Postgres s (Maybe length) -- | Get the size of the array at the given (statically known) dimension, -- provided as a type-level Nat. Like the arrayUpper_ and -- arrayLower_ functions,throws a compile-time error if the -- dimension is out of bounds. arrayLength_ :: forall (dim :: Nat) ctxt num v s. (KnownNat dim, WithinBounds dim (Vector v), Integral num) => QGenExpr ctxt Postgres s (Vector v) -> QGenExpr ctxt Postgres s num -- | Get the size of an array at a dimension not known until run-time. -- Marked unsafe as this may cause runtime errors even if it type checks. arrayLengthUnsafe_ :: (Integral dim, Integral num) => QGenExpr ctxt Postgres s (Vector v) -> QGenExpr ctxt Postgres s dim -> QGenExpr ctxt Postgres s (Maybe num) -- | The Postgres @> operator. Returns true if every member of -- the second array is present in the first. isSupersetOf_ :: QGenExpr ctxt Postgres s (Vector a) -> QGenExpr ctxt Postgres s (Vector a) -> QGenExpr ctxt Postgres s Bool -- | The Postgres <@ operator. Returns true if every member of -- the first array is present in the second. isSubsetOf_ :: QGenExpr ctxt Postgres s (Vector a) -> QGenExpr ctxt Postgres s (Vector a) -> QGenExpr ctxt Postgres s Bool -- | A range of a given Haskell type (represented by a) stored as -- a given Postgres Range Type (represented by n). -- -- A reasonable example might be Range PgInt8Range Int64. This -- represents a range of Haskell Int64 values stored as a range -- of bigint in Postgres. data PgRange (n :: *) a PgEmptyRange :: PgRange (n :: *) a PgRange :: PgRangeBound a -> PgRangeBound a -> PgRange (n :: *) a -- | Represents a single bound on a Range. A bound always has a type, but -- may not have a value (the absense of a value represents unbounded). data PgRangeBound a PgRangeBound :: PgBoundType -> Maybe a -> PgRangeBound a -- | Represents the types of bounds a range can have. A range can and often -- does have mis-matched bound types. data PgBoundType Inclusive :: PgBoundType Exclusive :: PgBoundType -- | A class representing Postgres Range types and how to refer to them -- when speaking to the database. -- -- For custom Range types, create an uninhabited type, and make it an -- instance of this class. class PgIsRange n -- | The range type name in the database. rangeName :: PgIsRange n => ByteString data PgInt4Range data PgInt8Range data PgNumRange data PgTsRange data PgTsTzRange data PgDateRange range_ :: forall n a context s. PgIsRange n => PgBoundType -> PgBoundType -> QGenExpr context Postgres s (Maybe a) -> QGenExpr context Postgres s (Maybe a) -> QGenExpr context Postgres s (PgRange n a) inclusive :: a -> PgRangeBound a exclusive :: a -> PgRangeBound a unbounded :: PgRangeBound a (-@>-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (-@>) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s a -> QGenExpr context Postgres s Bool (-<@-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (<@-) :: QGenExpr context Postgres s a -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (-&&-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (-<<-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (->>-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (-&<-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (-&>-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (--|--) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool (-+-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) (-*-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -- | The postgres range operator - . (-.-) :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) rLower_ :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (Maybe a) rUpper_ :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (Maybe a) isEmpty_ :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool lowerInc_ :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool upperInc_ :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool lowerInf_ :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool upperInf_ :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s Bool rangeMerge_ :: QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) -> QGenExpr context Postgres s (PgRange n a) century_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 decade_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 dow_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 doy_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 epoch_ :: HasSqlTime tgt => ExtractField Postgres tgt NominalDiffTime isodow_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 isoyear_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 microseconds_ :: HasSqlTime tgt => ExtractField Postgres tgt Int32 milliseconds_ :: HasSqlTime tgt => ExtractField Postgres tgt Int32 millennium_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 quarter_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 week_ :: HasSqlDate tgt => ExtractField Postgres tgt Int32 -- | Postgres bool_or aggregate. Returns true if any of the rows -- are true. pgBoolOr :: QExpr Postgres s a -> QAgg Postgres s (Maybe Bool) -- | Postgres bool_and aggregate. Returns false unless every row -- is true. pgBoolAnd :: QExpr Postgres s a -> QAgg Postgres s (Maybe Bool) -- | Joins the string value in each row of the first argument, using the -- second argument as a delimiter. See pgStringAggOver if you want -- to provide explicit quantification. pgStringAgg :: BeamSqlBackendIsString Postgres str => QExpr Postgres s str -> QExpr Postgres s str -> QAgg Postgres s (Maybe str) -- | The Postgres string_agg function, with an explicit -- quantifier. Joins the values of the second argument using the -- delimiter given by the third. pgStringAggOver :: BeamSqlBackendIsString Postgres str => Maybe PgAggregationSetQuantifierSyntax -> QExpr Postgres s str -> QExpr Postgres s str -> QAgg Postgres s (Maybe str) -- | Modify a query to only return rows where the supplied key function -- returns a unique value. This corresponds to the Postgres DISTINCT -- ON support. pgNubBy_ :: (Projectible Postgres key, Projectible Postgres r) => (r -> key) -> Q Postgres db s r -> Q Postgres db s r -- | Postgres NOW() function. Returns the server's timestamp now_ :: QExpr Postgres s LocalTime -- | Postgres ILIKE operator. A case-insensitive version of -- like_. ilike_ :: BeamSqlBackendIsString Postgres text => QExpr Postgres s text -> QExpr Postgres s text -> QExpr Postgres s Bool -- | Postgres ILIKE operator. A case-insensitive version of -- like_'. ilike_' :: (BeamSqlBackendIsString Postgres left, BeamSqlBackendIsString Postgres right) => QExpr Postgres s left -> QExpr Postgres s right -> QExpr Postgres s Bool runBeamPostgres :: Connection -> Pg a -> IO a runBeamPostgresDebug :: (String -> IO ()) -> Connection -> Pg a -> IO a -- | Represents an extension in a database. -- -- For example, to include the Database.Beam.Postgres.PgCrypto -- extension in a database, -- --
-- import Database.Beam.Postgres.PgCrypto
--
-- data MyDatabase entity
-- = MyDatabase
-- { _table1 :: entity (TableEntity Table1)
-- , _cryptoExtension :: entity (PgExtensionEntity PgCrypto)
-- }
--
-- migratableDbSettings :: CheckedDatabaseSettings Postgres MyDatabase
-- migratableDbSettings = defaultMigratableDbSettings
--
-- dbSettings :: DatabaseSettings Postgres MyDatabase
-- dbSettings = unCheckDatabase migratableDbSettings
--
--
-- Note that our database now only works in the Postgres backend.
--
-- Extensions are implemented as records of functions and values that
-- expose extension functionality. For example, the pgcrypto
-- extension (implemented by PgCrypto) provides cryptographic
-- functions. Thus, PgCrypto is a record of functions over
-- QGenExpr which wrap the underlying postgres functionality.
--
-- You get access to these functions by retrieving them from the entity
-- in the database.
--
-- For example, to use the pgcrypto extension in the database
-- above:
--
--
-- let PgCrypto { pgCryptoDigestText = digestText
-- , pgCryptoCrypt = crypt } = getPgExtension (_cryptoExtension dbSettings)
-- in fmap_ (tbl -> (tbl, crypt (_field1 tbl) (_salt tbl))) (all_ (table1 dbSettings))
--
--
-- To implement your own extension, create a record type, and implement
-- the IsPgExtension type class.
data PgExtensionEntity extension
-- | Type class implemented by any Postgresql extension
class IsPgExtension extension
-- | Return the name of this extension. This should be the string that is
-- passed to CREATE EXTENSION. For example, PgCrypto
-- returns "pgcrypto".
pgExtensionName :: IsPgExtension extension => Proxy extension -> Text
-- | Return a value of this extension type. This should fill in all fields
-- in the record. For example, PgCrypto builds a record where
-- each function wraps the underlying Postgres one.
pgExtensionBuild :: IsPgExtension extension => extension
-- | Migration representing the Postgres CREATE EXTENSION
-- command. Because the extension name is statically known by the
-- extension type and IsPgExtension type class, this simply
-- produces the checked extension entity.
--
-- If you need to use the extension in subsequent migration steps, use
-- getPgExtension and unCheck to get access to the
-- underlying DatabaseEntity.
pgCreateExtension :: forall extension db. IsPgExtension extension => Migration Postgres (CheckedDatabaseEntity Postgres db (PgExtensionEntity extension))
-- | Migration representing the Postgres DROP EXTENSION.
-- After this executes, you should expect any further uses of the
-- extension to fail. Unfortunately, without linear types, we cannot
-- check this.
pgDropExtension :: forall extension. CheckedDatabaseEntityDescriptor Postgres (PgExtensionEntity extension) -> Migration Postgres ()
-- | Get the extension record from a database entity. See the documentation
-- for PgExtensionEntity.
getPgExtension :: DatabaseEntity Postgres db (PgExtensionEntity extension) -> extension
-- | Deserialize integral fields, possibly downcasting from a larger
-- integral type, but only if we won't lose data
fromPgIntegral :: forall a. (FromField a, Integral a, Typeable a) => FromBackendRowM Postgres a
-- | Deserialize integral fields, possibly downcasting from a larger
-- numeric type via Scientific if we won't lose data, and then
-- falling back to any integral type via Integer
fromPgScientificOrIntegral :: (Bounded a, Integral a) => FromBackendRowM Postgres a
-- | Type class for Sql* types that can be turned into Postgres
-- syntax, for use in the following debugging functions
--
-- These include
--
--
-- connect defaultConnectInfo { connectHost = "db.example.com" }
--
defaultConnectInfo :: ConnectInfo
-- | Attempt to make a connection based on a libpq connection string. See
-- https://www.postgresql.org/docs/9.5/static/libpq-connect.html#LIBPQ-CONNSTRING
-- for more information. Also note that environment variables also affect
-- parameters not provided, parameters provided as the empty string, and
-- a few other things; see
-- https://www.postgresql.org/docs/9.5/static/libpq-envars.html
-- for details. Here is an example with some of the most commonly used
-- parameters:
--
-- -- host='db.somedomain.com' port=5432 ... ---- -- This attempts to connect to db.somedomain.com:5432. Omitting -- the port will normally default to 5432. -- -- On systems that provide unix domain sockets, omitting the host -- parameter will cause libpq to attempt to connect via unix domain -- sockets. The default filesystem path to the socket is constructed from -- the port number and the DEFAULT_PGSOCKET_DIR constant defined -- in the pg_config_manual.h header file. Connecting via unix -- sockets tends to use the peer authentication method, which is -- very secure and does not require a password. -- -- On Windows and other systems without unix domain sockets, omitting the -- host will default to localhost. -- --
-- ... dbname='postgres' user='postgres' password='secret \' \\ pw' ---- -- This attempts to connect to a database named postgres with -- user postgres and password secret ' \ pw. Backslash -- characters will have to be double-quoted in literal Haskell strings, -- of course. Omitting dbname and user will both -- default to the system username that the client process is running as. -- -- Omitting password will default to an appropriate password -- found in the pgpass file, or no password at all if a matching -- line is not found. The path of the pgpass file may be -- specified by setting the PGPASSFILE environment variable. See -- https://www.postgresql.org/docs/9.5/static/libpq-pgpass.html -- for more information regarding this file. -- -- As all parameters are optional and the defaults are sensible, the -- empty connection string can be useful for development and exploratory -- use, assuming your system is set up appropriately. -- -- On Unix, such a setup would typically consist of a local postgresql -- server listening on port 5432, as well as a system user, database -- user, and database sharing a common name, with permissions granted to -- the user on the database. -- -- On Windows, in addition you will either need pg_hba.conf to -- specify the use of the trust authentication method for the -- connection, which may not be appropriate for multiuser or production -- machines, or you will need to use a pgpass file with the -- password or md5 authentication methods. -- -- See -- https://www.postgresql.org/docs/9.5/static/client-authentication.html -- for more information regarding the authentication process. -- -- SSL/TLS will typically "just work" if your postgresql server supports -- or requires it. However, note that libpq is trivially vulnerable to a -- MITM attack without setting additional SSL connection parameters. In -- particular, sslmode needs to be set to require, -- verify-ca, or verify-full in order to perform -- certificate validation. When sslmode is require, -- then you will also need to specify a sslrootcert file, -- otherwise no validation of the server's identity will be performed. -- Client authentication via certificates is also possible via the -- sslcert and sslkey parameters. See -- https://www.postgresql.org/docs/9.5/static/libpq-ssl.html for -- detailed information regarding libpq and SSL. connectPostgreSQL :: ByteString -> IO Connection -- | Connect with the given username to the given database. Will throw an -- exception if it cannot connect. connect :: ConnectInfo -> IO Connection close :: Connection -> IO () -- | The pgcrypto extension provides several cryptographic -- functions to Postgres. This module provides a beam-postgres -- extension to access this functionality. For an example of usage, see -- the documentation for PgExtensionEntity. module Database.Beam.Postgres.PgCrypto -- | Data type representing definitions contained in the pgcrypto -- extension -- -- Each field maps closely to the underlying pgcrypto function, -- which are described in further detail in the pgcrypto manual. data PgCrypto PgCrypto :: (forall ctxt s. LiftPg ctxt s (Text -> Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (Text -> Text -> Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> Text -> Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (Text -> Text -> Text)) -> (forall ctxt s. LiftPg ctxt s (Text -> Maybe Int32 -> Text)) -> (forall ctxt s. LiftPg ctxt s (Text -> Text -> Maybe Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> Text -> Maybe Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> Text -> Maybe Text -> Text)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> Text -> Maybe Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (Text -> ByteString -> Maybe Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> ByteString -> Maybe Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> ByteString -> Maybe Text -> Maybe Text -> Text)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> ByteString -> Maybe Text -> Maybe Text -> ByteString)) -> (forall ctxt s. LiftPg ctxt s (ByteString -> Text)) -> (forall ctxt s. PgExpr ctxt s ByteString -> Maybe (PgExpr ctxt s (Vector Text), PgExpr ctxt s (Vector Text)) -> PgExpr ctxt s Text) -> (forall ctxt s. LiftPg ctxt s (Text -> ByteString)) -> (forall ctxt s i. Integral i => PgExpr ctxt s i -> PgExpr ctxt s ByteString) -> (forall ctxt s. PgExpr ctxt s UUID) -> PgCrypto [pgCryptoDigestText] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (Text -> Text -> ByteString) [pgCryptoDigestBytes] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> Text -> ByteString) [pgCryptoHmacText] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (Text -> Text -> Text -> ByteString) [pgCryptoHmacBytes] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> Text -> Text -> ByteString) [pgCryptoCrypt] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (Text -> Text -> Text) [pgCryptoGenSalt] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (Text -> Maybe Int32 -> Text) [pgCryptoPgpSymEncrypt] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (Text -> Text -> Maybe Text -> ByteString) [pgCryptoPgpSymEncryptBytea] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> Text -> Maybe Text -> ByteString) [pgCryptoPgpSymDecrypt] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> Text -> Maybe Text -> Text) [pgCryptoPgpSymDecryptBytea] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> Text -> Maybe Text -> ByteString) [pgCryptoPgpPubEncrypt] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (Text -> ByteString -> Maybe Text -> ByteString) [pgCryptoPgpPubEncryptBytea] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> ByteString -> Maybe Text -> ByteString) [pgCryptoPgpPubDecrypt] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> ByteString -> Maybe Text -> Maybe Text -> Text) [pgCryptoPgpPubDecryptBytea] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> ByteString -> Maybe Text -> Maybe Text -> ByteString) [pgCryptoPgpKeyId] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (ByteString -> Text) [pgCryptoArmor] :: PgCrypto -> forall ctxt s. PgExpr ctxt s ByteString -> Maybe (PgExpr ctxt s (Vector Text), PgExpr ctxt s (Vector Text)) -> PgExpr ctxt s Text [pgCryptoDearmor] :: PgCrypto -> forall ctxt s. LiftPg ctxt s (Text -> ByteString) [pgCryptoGenRandomBytes] :: PgCrypto -> forall ctxt s i. Integral i => PgExpr ctxt s i -> PgExpr ctxt s ByteString [pgCryptoGenRandomUUID] :: PgCrypto -> forall ctxt s. PgExpr ctxt s UUID instance Database.Beam.Postgres.Extensions.IsPgExtension Database.Beam.Postgres.PgCrypto.PgCrypto -- | The uuid-ossp extension provides functions for constructing -- UUIDs. -- -- For an example of usage, see the documentation for -- PgExtensionEntity. module Database.Beam.Postgres.Extensions.UuidOssp -- | Data type representing definitions contained in the uuid-ossp -- extension data UuidOssp UuidOssp :: (forall ctxt s. LiftPg ctxt s UUID) -> (forall ctxt s. LiftPg ctxt s UUID) -> (forall ctxt s. LiftPg ctxt s UUID) -> (forall ctxt s. LiftPg ctxt s UUID) -> (forall ctxt s. LiftPg ctxt s UUID) -> (forall ctxt s. LiftPg ctxt s UUID) -> (forall ctxt s. LiftPg ctxt s UUID) -> (forall ctxt s. LiftPg ctxt s (UUID -> Text -> UUID)) -> (forall ctxt s. LiftPg ctxt s UUID) -> (forall ctxt s. LiftPg ctxt s (UUID -> Text -> UUID)) -> UuidOssp [pgUuidNil] :: UuidOssp -> forall ctxt s. LiftPg ctxt s UUID [pgUuidNsDns] :: UuidOssp -> forall ctxt s. LiftPg ctxt s UUID [pgUuidNsUrl] :: UuidOssp -> forall ctxt s. LiftPg ctxt s UUID [pgUuidNsOid] :: UuidOssp -> forall ctxt s. LiftPg ctxt s UUID [pgUuidNsX500] :: UuidOssp -> forall ctxt s. LiftPg ctxt s UUID [pgUuidGenerateV1] :: UuidOssp -> forall ctxt s. LiftPg ctxt s UUID [pgUuidGenerateV1Mc] :: UuidOssp -> forall ctxt s. LiftPg ctxt s UUID [pgUuidGenerateV3] :: UuidOssp -> forall ctxt s. LiftPg ctxt s (UUID -> Text -> UUID) [pgUuidGenerateV4] :: UuidOssp -> forall ctxt s. LiftPg ctxt s UUID [pgUuidGenerateV5] :: UuidOssp -> forall ctxt s. LiftPg ctxt s (UUID -> Text -> UUID) instance Database.Beam.Postgres.Extensions.IsPgExtension Database.Beam.Postgres.Extensions.UuidOssp.UuidOssp