Module

Selda.Query.Type

Package
purescript-selda
Repository
Kamirus/purescript-selda

#Source Source

#GenState Source

type GenState = { aggr :: Array (Exists Expr), cols :: Array (Tuple Alias (Exists Expr)), limit :: Maybe Int, nextId :: Int, order :: Array (Tuple Order (Exists Expr)), restricts :: Array (Expr Boolean), sources :: Array Source }

#Query Source

newtype Query s a

Represents an intermediate query state. Before being wrapped with FullQuery this state represents SQL query without FROM component, but having every other including JOIN[s]

Constructors

Instances

#FullQuery Source

newtype FullQuery s a

wrapper for query that is ready for SQL generation This could be simple record { head ∷ SQL, st ∷ GenState } where st is state from wrapped query

Constructors

Instances

#Order Source

data Order

Constructors

#freshId Source

freshId :: forall s. Query s Int

#runQuery Source

runQuery :: forall s a. Query s a -> Tuple a GenState