serviette-0.1.0.3: JSON to raw Sql string

Safe HaskellNone
LanguageHaskell2010

Data.ApiDataTypes

Description

This provides types that represent sql query structure

Synopsis

Documentation

data TableName Source #

Type declaration

Represents db table name

Constructors

TableName Text 

Instances

Show TableName Source # 
Generic TableName Source # 

Associated Types

type Rep TableName :: * -> * #

ToJSON TableName Source #

Json instance for TableName

FromJSON TableName Source #

Instances

Json instance for TableName

type Rep TableName Source # 
type Rep TableName = D1 (MetaData "TableName" "Data.ApiDataTypes" "serviette-0.1.0.3-ColhqKU6zzNJ1eAjDDgKa7" False) (C1 (MetaCons "TableName" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

data ColumnName Source #

Represents db table column name

Constructors

ColumnName Text 

Instances

Show ColumnName Source # 
Generic ColumnName Source # 

Associated Types

type Rep ColumnName :: * -> * #

ToJSON ColumnName Source #

aeson instance for ColumnName

FromJSON ColumnName Source #

aeson instance for ColumnName

type Rep ColumnName Source # 
type Rep ColumnName = D1 (MetaData "ColumnName" "Data.ApiDataTypes" "serviette-0.1.0.3-ColhqKU6zzNJ1eAjDDgKa7" False) (C1 (MetaCons "ColumnName" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

data Operator Source #

Represents operator (=, >, <, like, not like etc.)

Constructors

Operator Text 

Instances

Show Operator Source # 
Generic Operator Source # 

Associated Types

type Rep Operator :: * -> * #

Methods

from :: Operator -> Rep Operator x #

to :: Rep Operator x -> Operator #

ToJSON Operator Source #

aeson instance for Operator

FromJSON Operator Source #

aeson instance for Operator

type Rep Operator Source # 
type Rep Operator = D1 (MetaData "Operator" "Data.ApiDataTypes" "serviette-0.1.0.3-ColhqKU6zzNJ1eAjDDgKa7" False) (C1 (MetaCons "Operator" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

data Action Source #

Represents the main action for the sql query (SELECT,INSERT, UPDATE, DELETE)

Constructors

Action Text 

Instances

Show Action Source # 
Generic Action Source # 

Associated Types

type Rep Action :: * -> * #

Methods

from :: Action -> Rep Action x #

to :: Rep Action x -> Action #

ToJSON Action Source #

aeson instance for Action

FromJSON Action Source #

aeson instance for Action

type Rep Action Source # 
type Rep Action = D1 (MetaData "Action" "Data.ApiDataTypes" "serviette-0.1.0.3-ColhqKU6zzNJ1eAjDDgKa7" False) (C1 (MetaCons "Action" PrefixI False) (S1 (MetaSel (Nothing Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Text)))

data Format Source #

Represents return format (for now this is only raw sql string)

Constructors

Format 

Fields

Instances

type DateVal = Text Source #

Represents Date field value

data FieldValue Source #

Represents field value which can be integer, string or date

data JoinTable Source #

Represents join table for the sql query

data WhereCondition Source #

Represents main where condition

data SqlQuery Source #

Represents intermediate type for receiving json

data SqlResultQuery Source #

Represents type that is the result of the json "computation"