haskelldb-2.2.4: A library of combinators for generating and executing SQL statements.

Copyright | Daan Leijen (c) 1999, daan@cs.uu.nl HWT Group (c) 2003, haskelldb-users@lists.sourceforge.net
License | BSD-style
Maintainer | haskelldb-users@lists.sourceforge.net
Stability | experimental
Portability | non-portable
Safe Haskell | None
Language | Haskell98

Database.HaskellDB.Sql.Generate

Description

The type of SQL generators.

# Documentation

data SqlGenerator Source

Constructors

SqlGenerator |

Fields

sqlQuery :: PrimQuery -> SqlSelect
sqlUpdate :: TableName -> [PrimExpr] -> Assoc -> SqlUpdate
sqlDelete :: TableName -> [PrimExpr] -> SqlDelete
sqlInsert :: TableName -> Assoc -> SqlInsert
sqlInsertQuery :: TableName -> PrimQuery -> SqlInsert
sqlCreateDB :: String -> SqlCreate
sqlCreateTable :: TableName -> [(Attribute, FieldDesc)] -> SqlCreate
sqlDropDB :: String -> SqlDrop
sqlDropTable :: TableName -> SqlDrop
sqlEmpty :: SqlSelect
sqlTable :: TableName -> Scheme -> SqlSelect
sqlProject :: Assoc -> SqlSelect -> SqlSelect
sqlGroup :: Assoc -> SqlSelect -> SqlSelect

  Ensures non-aggregate expressions in the select are included in group by clause.

sqlRestrict :: PrimExpr -> SqlSelect -> SqlSelect
sqlBinary :: RelOp -> SqlSelect -> SqlSelect -> SqlSelect
sqlSpecial :: SpecialOp -> SqlSelect -> SqlSelect
sqlExpr :: PrimExpr -> SqlExpr
sqlLiteral :: Literal -> String
sqlType :: FieldType -> SqlType
sqlQuote :: String -> String

  Turn a string into a quoted string. Quote characters and any escaping are handled by this function.