beam-core-0.7.2.2: Type-safe, feature-complete SQL query and manipulation interface for Haskell

Safe HaskellNone
LanguageHaskell2010

Database.Beam.Backend.SQL.BeamExtensions

Description

Some functionality is useful enough to be provided across backends, but is not standardized. For example, many RDBMS systems provide ways of fetching auto-incrementing or defaulting fields on INSERT or UPDATE.

Beam provides type classes that some backends instantiate that provide this support. This uses direct means on sufficiently advanced backends and is emulated on others.

Synopsis

Documentation

class MonadBeam syntax be handle m => MonadBeamInsertReturning syntax be handle m | m -> syntax be handle, be -> m, handle -> m where Source #

MonadBeams that support returning the newly created rows of an INSERT statement. Useful for discovering the real value of a defaulted value.

Minimal complete definition

runInsertReturningList

class MonadBeam syntax be handle m => MonadBeamUpdateReturning syntax be handle m | m -> syntax be handle, be -> m, handle -> m where Source #

MonadBeams that support returning the updated rows of an UPDATE statement. Useful for discovering the new values of the updated rows.

Minimal complete definition

runUpdateReturningList

class MonadBeam syntax be handle m => MonadBeamDeleteReturning syntax be handle m | m -> syntax be handle, be -> m, handle -> m where Source #

MonadBeams that suppert returning rows that will be deleted by the given DELETE statement. Useful for deallocating resources based on the value of deleted rows.

Minimal complete definition

runDeleteReturningList

newtype SqlSerial a Source #

Constructors

SqlSerial 

Fields

Instances
FromBackendRow be x => FromBackendRow be (SqlSerial x) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Types

HasSqlValueSyntax syntax x => HasSqlValueSyntax syntax (SqlSerial x) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.SQL92

Methods

sqlValueSyntax :: SqlSerial x -> syntax Source #

HasSqlQuantifiedEqualityCheck syntax a => HasSqlQuantifiedEqualityCheck syntax (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Query.Ord

Methods

sqlQEqE :: Proxy (SqlSerial a) -> Maybe (Sql92ExpressionQuantifierSyntax syntax) -> syntax -> syntax -> syntax Source #

sqlQNeqE :: Proxy (SqlSerial a) -> Maybe (Sql92ExpressionQuantifierSyntax syntax) -> syntax -> syntax -> syntax Source #

HasSqlEqualityCheck syntax a => HasSqlEqualityCheck syntax (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Query.Ord

Methods

sqlEqE :: Proxy (SqlSerial a) -> syntax -> syntax -> syntax Source #

sqlNeqE :: Proxy (SqlSerial a) -> syntax -> syntax -> syntax Source #

sqlEqTriE :: Proxy (SqlSerial a) -> syntax -> syntax -> syntax Source #

sqlNeqTriE :: Proxy (SqlSerial a) -> syntax -> syntax -> syntax Source #

Enum a => Enum (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Types

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

Defined in Database.Beam.Backend.SQL.Types

Methods

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

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

Integral a => Integral (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Types

Num a => Num (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Types

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

Defined in Database.Beam.Backend.SQL.Types

Read a => Read (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Types

Real a => Real (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Types

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

Defined in Database.Beam.Backend.SQL.Types

ToJSON a => ToJSON (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Types

FromJSON a => FromJSON (SqlSerial a) Source # 
Instance details

Defined in Database.Beam.Backend.SQL.Types