Portability | unknown |
---|---|
Stability | experimental |
Maintainer | ex8k.hibino@gmail.com |
Safe Haskell | None |
This module defines functions to generate simple SQL strings.
- type QuerySuffix = [Keyword]
- showsQuerySuffix :: QuerySuffix -> StringSQL
- updatePrefixSQL :: Table r -> StringSQL
- updateSQL' :: String -> [ColumnSQL] -> [ColumnSQL] -> String
- updateOtherThanKeySQL' :: String -> [ColumnSQL] -> [Int] -> String
- updateOtherThanKeySQL :: Table r -> Pi r p -> String
- insertPrefixSQL :: Pi r r' -> Table r -> StringSQL
- insertSQL :: Pi r r' -> Table r -> String
- insertSizedChunkSQL :: Pi r r' -> Table r -> Int -> (String, Int)
- deletePrefixSQL' :: String -> StringSQL
- deletePrefixSQL :: Table r -> StringSQL
Query suffix
type QuerySuffix = [Keyword]Source
Type for query suffix words
showsQuerySuffix :: QuerySuffix -> StringSQLSource
Expand query suffix words
Update SQL
updatePrefixSQL :: Table r -> StringSQLSource
Generate prefix string of update SQL.
:: String | Table name |
-> [ColumnSQL] | Column name list to update |
-> [ColumnSQL] | Key column name list |
-> String | Result SQL |
Generate update SQL by specified key and table. Columns name list of table are also required.
Generate update SQL by specified key and table. Columns name list of table are also required.
Generate update SQL specified by single key.
Insert SQL
insertPrefixSQL :: Pi r r' -> Table r -> StringSQLSource
Generate prefix string of insert SQL.
Generate insert SQL.
:: Pi r r' | Columns selector to insert |
-> Table r | Table metadata |
-> Int | Chunk size threshold (column count) |
-> (String, Int) | Result SQL and records count of chunk |
Generate size measured records chunk insert SQL.
Delete SQL
deletePrefixSQL' :: String -> StringSQLSource
Generate all column delete SQL by specified table. Untyped table version.
:: Table r | Table metadata |
-> StringSQL | Result SQL |
Generate all column delete SQL by specified table.