data-basic-0.3.0.0: A database library with a focus on ease of use, type safety and useful error messages

Safe HaskellNone
LanguageHaskell2010

Internal.Data.Basic.TH.Compiler

Synopsis

Documentation

compileSQLStatement :: (Throws ParseError m, MonadIO m) => ParseContext -> Statement -> m ParseContext Source #

Updates CompileContext with data. The kind of data that is being added depends on the statement being processed.

handleAlterTableOperations :: Throws ParseError m => ParseContext -> Name -> AlterTableAction -> m ParseContext Source #

Updates CompileContext with constraints that have been added using alter table

updateContext :: Throws ParseError m => ParseContext -> Name -> EntityInfo -> AttributeDef -> m (ParseContext, EntityInfo) Source #

Updates compile context from CREATE TABLE statement. Used when CREATE TABLE statement is used. Adds to CompileContext any constraints that are found and returns updated EntityInfo and CompileContext

compileRowConstraint :: Throws ParseError m => ParseContext -> EntityInfo -> ColumnInfo -> RowConstraint -> m (ParseContext, ColumnInfo) Source #

Adds sql row constraints to compile context

compileConstraint :: Throws ParseError m => ParseContext -> EntityInfo -> Constraint -> m ParseContext Source #

Adds sql constraint to compile context. If a sql constraint is unnamed, it will be named.

compileConstraint' :: Throws ParseError m => ParseContext -> EntityInfo -> Constraint -> m ParseContext Source #

Adds sql constraint to compile context.