beam-postgres-0.4.0.0: Connection layer between beam and postgres

Safe HaskellNone
LanguageHaskell2010

Database.Beam.Postgres

Contents

Description

Postgres is a popular, open-source RDBMS. It is fairly standards compliant and supports many advanced features and data types.

The beam-postgres module is built atop of postgresql-simple, which is used for connection management, transaction support, serialization, and deserialization.

beam-postgres supports most beam features as well as many postgres-specific features. For example, beam-postgres provides support for full-text search, DISTINCT ON, JSON handling, postgres ARRAYs, RANGEs, and the MONEY type.

The documentation for beam-postgres functionality below indicates which postgres function each function or type wraps. Postgres maintains its own in-depth documentation. Please refer to that for more detailed information on behavior.

For examples on how to use beam-postgres usage, see its manual.

Synopsis

Beam Postgres backend

data Postgres Source #

The Postgres backend type, used to parameterize MonadBeam. See the definitions there for more information. The corresponding query monad is Pg. See documentation for MonadBeam and the user guide for more information on using this backend.

Constructors

Postgres 
Instances
HasQBuilder Postgres Source # 
Instance details

Defined in Database.Beam.Postgres.Types

BeamSqlBackend Postgres Source # 
Instance details

Defined in Database.Beam.Postgres.Types

BeamBackend Postgres Source # 
Instance details

Defined in Database.Beam.Postgres.Types

Associated Types

type BackendFromField Postgres :: Type -> Constraint #

BeamSqlBackendHasSerial Postgres Source # 
Instance details

Defined in Database.Beam.Postgres.Migrate

BeamMigrateOnlySqlBackend Postgres Source # 
Instance details

Defined in Database.Beam.Postgres.Types

MonadBeamInsertReturning Postgres Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

MonadBeamUpdateReturning Postgres Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

MonadBeamDeleteReturning Postgres Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

HasSqlEqualityCheck Postgres Bool Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Double Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Float Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Int Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Int8 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Int16 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Int32 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Int64 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Integer Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Word Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Word8 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Word16 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Word32 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Word64 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres ByteString Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres ByteString Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Scientific Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Text Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres UTCTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Value Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Text Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Oid Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres HStoreList Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres HStoreMap Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres LocalTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres UTCTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres ZonedTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Date Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres ZonedTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres LocalTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres TimeOfDay Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres NominalDiffTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres Day Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres UUID Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres PgMoney Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres TsVectorConfig Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres Bool Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Double Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Float Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Int Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Int8 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Int16 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Int32 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Int64 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Integer Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Word Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Word8 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Word16 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Word32 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Word64 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres ByteString Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres ByteString Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Scientific Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Text Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres UTCTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Value Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Text Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Oid Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres HStoreList Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres HStoreMap Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres LocalTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres UTCTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres ZonedTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Date Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres ZonedTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres LocalTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres TimeOfDay Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres NominalDiffTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres Day Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres UUID Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres PgMoney Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres TsVectorConfig Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

MonadBeam Postgres Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

BeamSqlBackendIsString Postgres Text Source # 
Instance details

Defined in Database.Beam.Postgres.Types

BeamSqlBackendIsString Postgres String Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Bool Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Char Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Double Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Int Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Int16 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Int32 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Int64 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Integer Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Word Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Word16 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Word32 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Word64 Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres ByteString Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres ByteString Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Scientific Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Text Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres UTCTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Value Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Text Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres SqlNull Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Oid Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres HStoreList Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres HStoreMap Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Null Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres LocalTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres UTCTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres ZonedTimestamp Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Date Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres LocalTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres TimeOfDay Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres Day Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres UUID Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres PgBox Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

FromBackendRow Postgres PgPoint Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

FromBackendRow Postgres PgMoney Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

FromBackendRow Postgres TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

FromBackendRow Postgres TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres ByteString Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasDefaultSqlDataType Postgres LocalTime Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasDefaultSqlDataType Postgres UUID Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasDefaultSqlDataType Postgres PgBox Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres PgLineSegment Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres PgLine Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres PgPoint Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres PgMoney Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres [Char] Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres (CI Text) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres (CI Text) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres (Vector a) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlEqualityCheck Postgres (PgJSONB a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres [Char] Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres (CI Text) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres (CI Text) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres (Vector a) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres (PgJSONB a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

IsDatabaseEntity Postgres (PgExtensionEntity extension) Source # 
Instance details

Defined in Database.Beam.Postgres.Extensions

IsDatabaseEntity Postgres (PgType a) Source # 
Instance details

Defined in Database.Beam.Postgres.CustomTypes

FromBackendRow Postgres [Char] Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres (Ratio Integer) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres (CI Text) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres (CI Text) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

(FromField a, Typeable a) => FromBackendRow Postgres (PGRange a) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres (Binary ByteString) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

FromBackendRow Postgres (Binary ByteString) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

(FromField a, Typeable a) => FromBackendRow Postgres (PGArray a) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

(FromField a, Typeable a) => FromBackendRow Postgres (Vector a) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

(Typeable a, FromJSON a) => FromBackendRow Postgres (PgJSONB a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

(Typeable a, FromJSON a) => FromBackendRow Postgres (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

IsCheckedDatabaseEntity Postgres (PgExtensionEntity extension) Source # 
Instance details

Defined in Database.Beam.Postgres.Extensions

IsCheckedDatabaseEntity Postgres (PgType a) Source # 
Instance details

Defined in Database.Beam.Postgres.CustomTypes

HasDefaultSqlDataType Postgres (SqlSerial Int) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasDefaultSqlDataType Postgres a => HasDefaultSqlDataType Postgres (Vector a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres (PgJSONB a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres (PgRange n a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres (PgRange n a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

(FromField a, FromField b, Typeable a, Typeable b) => FromBackendRow Postgres (Either a b) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

(FromField a, Typeable a, Typeable n, Ord a) => FromBackendRow Postgres (PgRange n a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres a => HasSqlEqualityCheck Postgres (Tagged t a) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

HasSqlQuantifiedEqualityCheck Postgres a => HasSqlQuantifiedEqualityCheck Postgres (Tagged t a) Source # 
Instance details

Defined in Database.Beam.Postgres.Types

RenamableWithRule (FieldRenamer (DatabaseEntityDescriptor Postgres (PgExtensionEntity e))) Source #

There are no fields to rename when defining entities

Instance details

Defined in Database.Beam.Postgres.Extensions

RenamableWithRule (FieldRenamer (DatabaseEntityDescriptor Postgres (PgType a))) Source # 
Instance details

Defined in Database.Beam.Postgres.CustomTypes

PgDebugStmt (SqlSelect Postgres a) Source # 
Instance details

Defined in Database.Beam.Postgres.Debug

PgDebugStmt (SqlInsert Postgres a) Source # 
Instance details

Defined in Database.Beam.Postgres.Debug

PgDebugStmt (SqlUpdate Postgres a) Source # 
Instance details

Defined in Database.Beam.Postgres.Debug

PgDebugStmt (SqlDelete Postgres a) Source # 
Instance details

Defined in Database.Beam.Postgres.Debug

type BeamSqlBackendSyntax Postgres Source # 
Instance details

Defined in Database.Beam.Postgres.Types

type BackendFromField Postgres Source # 
Instance details

Defined in Database.Beam.Postgres.Types

type DatabaseEntityRegularRequirements Postgres (PgExtensionEntity extension) Source # 
Instance details

Defined in Database.Beam.Postgres.Extensions

type DatabaseEntityRegularRequirements Postgres (PgType a) Source # 
Instance details

Defined in Database.Beam.Postgres.CustomTypes

type DatabaseEntityDefaultRequirements Postgres (PgExtensionEntity extension) Source # 
Instance details

Defined in Database.Beam.Postgres.Extensions

type DatabaseEntityDefaultRequirements Postgres (PgType a) Source # 
Instance details

Defined in Database.Beam.Postgres.CustomTypes

data DatabaseEntityDescriptor Postgres (PgExtensionEntity extension) Source # 
Instance details

Defined in Database.Beam.Postgres.Extensions

data DatabaseEntityDescriptor Postgres (PgExtensionEntity extension) where
data DatabaseEntityDescriptor Postgres (PgType a) Source # 
Instance details

Defined in Database.Beam.Postgres.CustomTypes

type CheckedDatabaseEntityDefaultRequirements Postgres (PgExtensionEntity extension) Source # 
Instance details

Defined in Database.Beam.Postgres.Extensions

type CheckedDatabaseEntityDefaultRequirements Postgres (PgType a) Source # 
Instance details

Defined in Database.Beam.Postgres.CustomTypes

newtype CheckedDatabaseEntityDescriptor Postgres (PgExtensionEntity extension) Source # 
Instance details

Defined in Database.Beam.Postgres.Extensions

data CheckedDatabaseEntityDescriptor Postgres (PgType a) Source # 
Instance details

Defined in Database.Beam.Postgres.CustomTypes

data Pg a Source #

MonadBeam in which we can run Postgres commands. See the documentation for MonadBeam on examples of how to use.

beam-postgres also provides functions that let you run queries without MonadBeam. These functions may be more efficient and offer a conduit API. See Database.Beam.Postgres.Conduit for more information.

Instances
Monad Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

Methods

(>>=) :: Pg a -> (a -> Pg b) -> Pg b #

(>>) :: Pg a -> Pg b -> Pg b #

return :: a -> Pg a #

fail :: String -> Pg a #

Functor Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

Methods

fmap :: (a -> b) -> Pg a -> Pg b #

(<$) :: a -> Pg b -> Pg a #

MonadFail Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

Methods

fail :: String -> Pg a #

Applicative Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

Methods

pure :: a -> Pg a #

(<*>) :: Pg (a -> b) -> Pg a -> Pg b #

liftA2 :: (a -> b -> c) -> Pg a -> Pg b -> Pg c #

(*>) :: Pg a -> Pg b -> Pg b #

(<*) :: Pg a -> Pg b -> Pg a #

MonadIO Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

Methods

liftIO :: IO a -> Pg a #

MonadBeamInsertReturning Postgres Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

MonadBeamUpdateReturning Postgres Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

MonadBeamDeleteReturning Postgres Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

MonadBeam Postgres Pg Source # 
Instance details

Defined in Database.Beam.Postgres.Connection

Postgres syntax

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.

Instances
IsSql92Syntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

IsSql92DdlCommandSyntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

type Sql92DeleteSyntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

type Sql92UpdateSyntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

type Sql92InsertSyntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

type Sql92SelectSyntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

type Sql92DdlCommandDropTableSyntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

type Sql92DdlCommandAlterTableSyntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

type Sql92DdlCommandCreateTableSyntax PgCommandSyntax Source # 
Instance details

Defined in Database.Beam.Postgres.Syntax

data PgSyntax Source #

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.

Beam URI support

postgresUriSyntax :: c Postgres Connection Pg -> BeamURIOpeners c Source #

BeamURIOpeners for the standard postgresql: URI scheme. See the postgres documentation for more details on the formatting. See documentation for BeamURIOpeners for more information on how to use this with beam

Postgres-specific features

Postgres-specific data types

json :: (ToJSON a, FromJSON a) => DataType Postgres (PgJSON a) Source #

DataType for JSON. See PgJSON for more information

jsonb :: (ToJSON a, FromJSON a) => DataType Postgres (PgJSONB a) Source #

DataType for JSONB. See PgJSON for more information

uuid :: DataType Postgres UUID Source #

DataType for UUID columns. The pgCryptoGenRandomUUID function in the PgCrypto extension can be used to generate UUIDs at random.

tsquery :: DataType Postgres TsQuery Source #

DataType for tsquery. See TsQuery for more information

tsvector :: DataType Postgres TsVector Source #

DataType for tsvector. See TsVector for more information

text :: DataType Postgres Text Source #

DataType for Postgres TEXT. characterLargeObject is also mapped to this data type

bytea :: DataType Postgres ByteString Source #

DataType for Postgres BYTEA. binaryLargeObject is also mapped to this data type

unboundedArray :: forall a. Typeable a => DataType Postgres a -> DataType Postgres (Vector a) Source #

DataType for a Postgres array without any bounds.

Note that array support in beam-migrate is still incomplete.

SERIAL support

smallserial :: Integral a => DataType Postgres (SqlSerial a) Source #

Postgres SERIAL data types. Automatically generates an appropriate DEFAULT clause and sequence

serial :: Integral a => DataType Postgres (SqlSerial a) Source #

Postgres SERIAL data types. Automatically generates an appropriate DEFAULT clause and sequence

bigserial :: Integral a => DataType Postgres (SqlSerial a) Source #

Postgres SERIAL data types. Automatically generates an appropriate DEFAULT clause and sequence

Full-text search

Postgres has comprehensive, and thus complicated, support for full text search. The types and functions in this section map closely to the underlying Postgres API, which is described in the documentation.

TSVECTOR data type

data TsVectorConfig Source #

The identifier of a Postgres text search configuration.

Use the IsString instance to construct new values of this type

Instances
Eq TsVectorConfig Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Ord TsVectorConfig Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Show TsVectorConfig Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

IsString TsVectorConfig Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres TsVectorConfig Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres TsVectorConfig Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

newtype TsVector Source #

The type of a document preprocessed for full-text search. The contained ByteString is the Postgres representation of the TSVECTOR type. Use toTsVector to construct these on-the-fly from strings.

When this field is embedded in a beam table, defaultMigratableDbSettings will give the column the postgres TSVECTOR type.

Constructors

TsVector ByteString 
Instances
Eq TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Ord TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Show TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

FromField TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

ToField TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Methods

toField :: TsVector -> Action #

HasSqlEqualityCheck Postgres TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

FromBackendRow Postgres TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres TsVector Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

toTsVector :: BeamSqlBackendIsString Postgres str => Maybe TsVectorConfig -> QGenExpr context Postgres s str -> QGenExpr context Postgres s TsVector Source #

The Postgres to_tsvector function. Given a configuration and string, return the TSVECTOR that represents the contents of the string.

english :: TsVectorConfig Source #

A full-text search configuration with sensible defaults for english

TSQUERY data type

newtype TsQuery Source #

A query that can be run against a document contained in a TsVector.

When this field is embedded in a beam table, defaultMigratableDbSettings will give the column the postgres TSVECTOR type

Constructors

TsQuery ByteString 
Instances
Eq TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Methods

(==) :: TsQuery -> TsQuery -> Bool #

(/=) :: TsQuery -> TsQuery -> Bool #

Ord TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Show TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

FromField TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

FromBackendRow Postgres TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres TsQuery Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

(@@) :: QGenExpr context Postgres s TsVector -> QGenExpr context Postgres s TsQuery -> QGenExpr context Postgres s Bool Source #

Determine if the given TSQUERY matches the document represented by the TSVECTOR. Behaves exactly like the similarly-named operator in postgres.

toTsQuery :: BeamSqlBackendIsString Postgres str => Maybe TsVectorConfig -> QGenExpr context Postgres s str -> QGenExpr context Postgres s TsQuery Source #

The Postgres to_tsquery function. Given a configuration and string, return the TSQUERY that represents the contents of the string.

JSON and JSONB data types

Postgres supports storing JSON in columns, as either a text-based type (JSON) or a specialized binary encoding (JSONB). beam-postgres accordingly provides the PgJSON and PgJSONB data types. Each of these types takes a type parameter indicating the Haskell object represented by the JSON object stored in the column. In order for serialization to work, be sure to provide FromJSON and ToJSON instances for this type. If you do not know the shape of the data stored, substitute Value for this type parameter.

For more information on Psotgres json support see the postgres manual.

newtype PgJSON a Source #

The Postgres JSON type, which stores textual values that represent JSON objects. The type parameter indicates the Haskell type which the JSON encodes. This type must be a member of FromJSON and ToJSON in order for deserialization and serialization to work as expected.

The defaultMigratableDbSettings function automatically assigns the postgres JSON type to fields with this type.

Constructors

PgJSON a 
Instances
IsPgJSON PgJSON Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlEqualityCheck Postgres (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasSqlQuantifiedEqualityCheck Postgres (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

ToJSON a => HasSqlValueSyntax PgValueSyntax (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

(Typeable a, FromJSON a) => FromBackendRow Postgres (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

HasDefaultSqlDataType Postgres (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Eq a => Eq (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Methods

(==) :: PgJSON a -> PgJSON a -> Bool #

(/=) :: PgJSON a -> PgJSON a -> Bool #

Ord a => Ord (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Methods

compare :: PgJSON a -> PgJSON a -> Ordering #

(<) :: PgJSON a -> PgJSON a -> Bool #

(<=) :: PgJSON a -> PgJSON a -> Bool #

(>) :: PgJSON a -> PgJSON a -> Bool #

(>=) :: PgJSON a -> PgJSON a -> Bool #

max :: PgJSON a -> PgJSON a -> PgJSON a #

min :: PgJSON a -> PgJSON a -> PgJSON a #

Show a => Show (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Methods

showsPrec :: Int -> PgJSON a -> ShowS #

show :: PgJSON a -> String #

showList :: [PgJSON a] -> ShowS #

Semigroup a => Semigroup (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Methods

(<>) :: PgJSON a -> PgJSON a -> PgJSON a #

sconcat :: NonEmpty (PgJSON a) -> PgJSON a #

stimes :: Integral b => b -> PgJSON a -> PgJSON a #

Monoid a => Monoid (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Methods

mempty :: PgJSON a #

mappend :: PgJSON a -> PgJSON a -> PgJSON a #

mconcat :: [PgJSON a] -> PgJSON a #

Hashable a => Hashable (PgJSON a) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

Methods

hashWithSalt :: Int -> PgJSON a -> Int #

hash :: PgJSON a -> Int #

(Typeable x, FromJSON x) => FromField (PgJSON x) Source # 
Instance details

Defined in Database.Beam.Postgres.PgSpecific

newtype PgJSONB a Source #

The Postgres JSONB type, which stores JSON-encoded data in a postgres-specific binary format. Like PgJSON, the type parameter indicates the Hgaskell type which the JSON encodes.

Fields with this type are automatically given the Postgres JSONB type

Constructors

PgJSONB a 
Instances