beam-core-0.7.2.0: 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 # 
HasSqlValueSyntax syntax x => HasSqlValueSyntax syntax (SqlSerial x) Source # 

Methods

sqlValueSyntax :: SqlSerial x -> syntax Source #

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

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 # 

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 # 
Eq a => Eq (SqlSerial a) Source # 

Methods

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

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

Integral a => Integral (SqlSerial a) Source # 
Num a => Num (SqlSerial a) Source # 
Ord a => Ord (SqlSerial a) Source # 
Read a => Read (SqlSerial a) Source # 
Real a => Real (SqlSerial a) Source # 
Show a => Show (SqlSerial a) Source # 
ToJSON a => ToJSON (SqlSerial a) Source # 
FromJSON a => FromJSON (SqlSerial a) Source #