| Copyright | 2013-2017 Kei Hibino |
|---|---|
| License | BSD3 |
| Maintainer | ex8k.hibino@gmail.com |
| Stability | experimental |
| Portability | unknown |
| Safe Haskell | None |
| Language | Haskell2010 |
Database.Relational.Query.SQL
Description
This module defines functions to generate simple SQL strings.
- type QuerySuffix = [Keyword]
- showsQuerySuffix :: QuerySuffix -> StringSQL
- updatePrefixSQL :: Table r -> StringSQL
- updateSQL' :: String -> [StringSQL] -> [StringSQL] -> String
- updateOtherThanKeySQL' :: String -> [StringSQL] -> [Int] -> String
- updateOtherThanKeySQL :: Table r -> Pi r p -> String
- insertPrefixSQL :: Pi r r' -> Table r -> StringSQL
- insertSQL :: PersistableWidth r => Pi r r' -> Table r -> String
- deletePrefixSQL' :: String -> StringSQL
- deletePrefixSQL :: Table r -> StringSQL
Query suffix
type QuerySuffix = [Keyword] Source #
Type for query suffix words
showsQuerySuffix :: QuerySuffix -> StringSQL Source #
Expand query suffix words
Update SQL
updatePrefixSQL :: Table r -> StringSQL Source #
Generate prefix string of update SQL.
Arguments
| :: String | Table name |
| -> [StringSQL] | Column name list to update |
| -> [StringSQL] | Key column name list |
| -> String | Result SQL |
Generate update SQL by specified key and table. Columns name list of table are also required.
updateOtherThanKeySQL' Source #
Arguments
| :: String | Table name |
| -> [StringSQL] | Column name list |
| -> [Int] | Key column indexes |
| -> String | Result SQL |
Generate update SQL by specified key and table. Columns name list of table are also required.
updateOtherThanKeySQL Source #
Generate update SQL specified by single key.
Insert SQL
Arguments
| :: PersistableWidth r | |
| => Pi r r' | Columns selector to insert |
| -> Table r | Table metadata |
| -> String | Result SQL |
Deprecated: Deprecated.
Generate insert SQL.
Delete SQL
deletePrefixSQL' :: String -> StringSQL Source #
Generate all column delete SQL by specified table. Untyped table version.
Generate all column delete SQL by specified table.