Safe Haskell | None |
---|---|
Language | Haskell2010 |
- ppSQL :: SQLCommand -> (String, [SqlValue])
- noConstraints :: SqlColDesc -> SQLColumnSchema
- notNull :: SqlColDesc -> SQLColumnSchema
- data SQLCommand
- data SQLCreateTable = SQLCreateTable {
- ctTableName :: Text
- ctFields :: [(Text, SQLColumnSchema)]
- data SQLColumnSchema = SQLColumnSchema {}
- data SQLConstraint
- data SQLInsert = SQLInsert {
- iTableName :: Text
- iValues :: [SqlValue]
- data SQLUpdate = SQLUpdate {
- uTableNames :: [Text]
- uAssignments :: [(SQLFieldName, SQLExpr)]
- uWhere :: Maybe SQLExpr
- data SQLDelete = SQLDelete {
- dTableName :: Text
- dWhere :: Maybe SQLExpr
- data SQLSelect = SQLSelect {}
- data SQLFieldName
- data SQLAliased a = SQLAliased a (Maybe Text)
- data SQLProjection
- data SQLSource
- data SQLJoinType
- data SQLFrom
- data SQLGrouping = SQLGrouping {
- sqlGroupBy :: [SQLExpr]
- sqlHaving :: SQLExpr
- data SQLOrdering
- data SQLExpr' f
- type SQLExpr = SQLExpr' SQLFieldName
SQL pretty printing
ppSQL :: SQLCommand -> (String, [SqlValue]) Source
Convert a SQLCommand
into a SQL expression (with placeholders) and literal values to be submitted to the SQL server.
Splitting into a SQL expression and literals prevents SQL injection attacks.
Untyped SQL types
SQL queries
data SQLCommand Source
data SQLCreateTable Source
SQLCreateTable | |
|
data SQLColumnSchema Source
data SQLConstraint Source
SQLUpdate | |
|
SQLSelect | |
|
data SQLFieldName Source
data SQLProjection Source
SQLProjStar | The * from SELECT * |
SQLProj [SQLAliased SQLExpr] |
data SQLGrouping Source
SQLGrouping | |
|
type SQLExpr = SQLExpr' SQLFieldName Source