Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal.Data.Basic.TH.Compiler
- compileSQL :: Text -> Q (Either ParseError [Statement])
- compileContext :: ParseContext -> Q [Dec]
- compileEntity :: ParseContext -> EntityInfo -> [Dec]
- compileSQLStatements :: (Throws ParseError m, MonadIO m) => ParseContext -> [Statement] -> m ParseContext
- compileSQLStatement :: (Throws ParseError m, MonadIO m) => ParseContext -> Statement -> m ParseContext
- handleAlterTableOperations :: Throws ParseError m => ParseContext -> Name -> AlterTableAction -> m ParseContext
- updateContext :: Throws ParseError m => ParseContext -> Name -> EntityInfo -> AttributeDef -> m (ParseContext, EntityInfo)
- compileRowConstraint :: Throws ParseError m => ParseContext -> EntityInfo -> ColumnInfo -> RowConstraint -> m (ParseContext, ColumnInfo)
- compileConstraint :: Throws ParseError m => ParseContext -> EntityInfo -> Constraint -> m ParseContext
- compileConstraint' :: Throws ParseError m => ParseContext -> EntityInfo -> Constraint -> m ParseContext
Documentation
compileSQL :: Text -> Q (Either ParseError [Statement]) Source #
compileContext :: ParseContext -> Q [Dec] Source #
compileEntity :: ParseContext -> EntityInfo -> [Dec] Source #
compileSQLStatements :: (Throws ParseError m, MonadIO m) => ParseContext -> [Statement] -> m ParseContext Source #
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.