| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.ApiDataTypes
Description
This provides types that represent sql query structure
- data TableName = TableName Text
- data ColumnName = ColumnName Text
- data Operator = Operator Text
- data Action = Action Text
- data Format = Format {}
- type DateVal = Text
- data FieldValue
- data JoinTable = JoinTable {}
- data WhereCondition = WhereCondition {}
- data SqlQuery = SqlQuery {
- format :: Int
- action :: Action
- selectName :: TableName
- joinTables :: [JoinTable]
- whereCondition :: [WhereCondition]
- data SqlResultQuery = SqlResultQuery {}
Documentation
Type declaration
Represents db table name
data ColumnName Source #
Represents db table column name
Constructors
| ColumnName Text |
Instances
| Show ColumnName Source # | |
| Generic ColumnName Source # | |
| ToJSON ColumnName Source # | aeson instance for ColumnName |
| FromJSON ColumnName Source # | aeson instance for ColumnName |
| type Rep ColumnName Source # | |
Represents operator (=, >, <, like, not like etc.)
Represents the main action for the sql query (SELECT,INSERT, UPDATE, DELETE)
Represents return format (for now this is only raw sql string)
data FieldValue Source #
Represents field value which can be integer, string or date
Instances
| Show FieldValue Source # | |
| Generic FieldValue Source # | |
| ToJSON FieldValue Source # | aeson instance for FieldValue |
| FromJSON FieldValue Source # | aeson instance for FieldValue |
| type Rep FieldValue Source # | |
Represents join table for the sql query
Constructors
| JoinTable | |
Fields
| |
data WhereCondition Source #
Represents main where condition
Constructors
| WhereCondition | |
Fields | |
Instances
| Show WhereCondition Source # | |
| Generic WhereCondition Source # | |
| ToJSON WhereCondition Source # | aeson instance for WhereCondition |
| FromJSON WhereCondition Source # | aeson instance for WhereCondition |
| type Rep WhereCondition Source # | |
Represents intermediate type for receiving json
Constructors
| SqlQuery | |
Fields
| |
data SqlResultQuery Source #
Represents type that is the result of the json "computation"
Constructors
| SqlResultQuery | |
Fields
| |
Instances
| Show SqlResultQuery Source # | |
| Generic SqlResultQuery Source # | |
| ToJSON SqlResultQuery Source # | aeson instance for SqlResultQuery |
| FromJSON SqlResultQuery Source # | aeson instance for SqlResultQuery |
| type Rep SqlResultQuery Source # | |