haskelldb-0.12: SQL unwrapper for Haskell.Source codeContentsIndex
Database.HaskellDB.Sql.Default
Portabilitynon-portable
Stabilityexperimental
Maintainerhaskelldb-users@lists.sourceforge.net
Contents
Utilities
Description
Default SQL generation.
Synopsis
mkSqlGenerator :: SqlGenerator -> SqlGenerator
defaultSqlGenerator :: SqlGenerator
defaultSqlQuery :: SqlGenerator -> PrimQuery -> SqlSelect
defaultSqlUpdate :: SqlGenerator -> TableName -> [PrimExpr] -> Assoc -> SqlUpdate
defaultSqlDelete :: SqlGenerator -> TableName -> [PrimExpr] -> SqlDelete
defaultSqlInsert :: SqlGenerator -> TableName -> Assoc -> SqlInsert
defaultSqlInsertQuery :: SqlGenerator -> TableName -> PrimQuery -> SqlInsert
defaultSqlCreateDB :: SqlGenerator -> String -> SqlCreate
defaultSqlCreateTable :: SqlGenerator -> TableName -> [(Attribute, FieldDesc)] -> SqlCreate
defaultSqlDropDB :: SqlGenerator -> String -> SqlDrop
defaultSqlDropTable :: SqlGenerator -> TableName -> SqlDrop
defaultSqlEmpty :: SqlGenerator -> SqlSelect
defaultSqlTable :: SqlGenerator -> TableName -> Scheme -> SqlSelect
defaultSqlProject :: SqlGenerator -> Assoc -> SqlSelect -> SqlSelect
defaultSqlRestrict :: SqlGenerator -> PrimExpr -> SqlSelect -> SqlSelect
defaultSqlBinary :: SqlGenerator -> RelOp -> SqlSelect -> SqlSelect -> SqlSelect
defaultSqlGroup :: SqlGenerator -> Assoc -> SqlSelect -> SqlSelect
defaultSqlSpecial :: SqlGenerator -> SpecialOp -> SqlSelect -> SqlSelect
defaultSqlExpr :: SqlGenerator -> PrimExpr -> SqlExpr
defaultSqlLiteral :: SqlGenerator -> Literal -> String
defaultSqlType :: SqlGenerator -> FieldType -> SqlType
toSqlSelect :: SqlSelect -> SqlSelect
Documentation
mkSqlGenerator :: SqlGenerator -> SqlGeneratorSource
defaultSqlGenerator :: SqlGeneratorSource
defaultSqlQuery :: SqlGenerator -> PrimQuery -> SqlSelectSource
Creates a SqlSelect based on the PrimQuery supplied. Corresponds to the SQL statement SELECT.
defaultSqlUpdateSource
:: SqlGenerator
-> TableNameName of the table to update.
-> [PrimExpr]Conditions which must all be true for a row to be updated.
-> AssocUpdate the data with this.
-> SqlUpdate
Creates a SqlUpdate. Corresponds to the SQL statement UPDATE which updates data in a table.
defaultSqlDeleteSource
:: SqlGenerator
-> TableNameName of the table
-> [PrimExpr]Criteria which must all be true for a row to be deleted.
-> SqlDelete
Creates a SqlDelete. Corresponds to the SQL statement DELETE which deletes rows in a table.
defaultSqlInsertSource
:: SqlGenerator
-> TableNameName of the table
-> AssocWhat to insert.
-> SqlInsert
Creates a SqlInsert.
defaultSqlInsertQuerySource
:: SqlGenerator
-> TableNameName of the table
-> PrimQueryWhat to insert
-> SqlInsert
Creates a SqlInsert. Corresponds to the SQL statement INSERT INTO which is used to insert new rows in a table.
defaultSqlCreateDBSource
:: SqlGenerator
-> Stringname of the database.
-> SqlCreate
Use this to create a SqlCreate data type corresponding to the SQL statement CREATE DATABASE which creates a new database.
defaultSqlCreateTableSource
:: SqlGenerator
-> TableNamename of the table to be created.
-> [(Attribute, FieldDesc)]Column descriptions
-> SqlCreate
Use this to create a SqlCreate data type corresponding to the SQL statement CREATE which creates a new table.
defaultSqlDropDB :: SqlGenerator -> String -> SqlDropSource
Creates a SqlDrop that delete the database with the name given as the first argument.
defaultSqlDropTable :: SqlGenerator -> TableName -> SqlDropSource
Creates a SqlDrop that delete the database named in the first argument.
defaultSqlEmpty :: SqlGenerator -> SqlSelectSource
defaultSqlTable :: SqlGenerator -> TableName -> Scheme -> SqlSelectSource
defaultSqlProject :: SqlGenerator -> Assoc -> SqlSelect -> SqlSelectSource
defaultSqlRestrict :: SqlGenerator -> PrimExpr -> SqlSelect -> SqlSelectSource
defaultSqlBinary :: SqlGenerator -> RelOp -> SqlSelect -> SqlSelect -> SqlSelectSource
defaultSqlGroup :: SqlGenerator -> Assoc -> SqlSelect -> SqlSelectSource
Takes all non-aggregate expressions in the select and adds them to the 'group by' clause.
defaultSqlSpecial :: SqlGenerator -> SpecialOp -> SqlSelect -> SqlSelectSource
defaultSqlExpr :: SqlGenerator -> PrimExpr -> SqlExprSource
defaultSqlLiteral :: SqlGenerator -> Literal -> StringSource
defaultSqlType :: SqlGenerator -> FieldType -> SqlTypeSource
Utilities
toSqlSelect :: SqlSelect -> SqlSelectSource
Produced by Haddock version 2.6.0