Database.Selda

Running queries

class MonadSelda m

data SeldaError

data ValidationError

data SeldaT m a

type SeldaM

data Table a

data Query s a

data Col s a

class Result r

query

transaction

setLocalCache

Constructing queries

data Selector t a

(!)

data Assignment s t

with

class SqlType a

type family Cols s a where ...

class Columns a

data Order

data a :*: b

select

selectValues

from

restrict

limit

order

ascending

descending

inner

suchThat

Expressions over columns

class Set set

data RowID

invalidRowId

isInvalidRowId

fromRowId

(.==)

(./=)

(.>)

(.<)

(.>=)

(.<=)

like

(.&&)

(.||)

not_

literal

int

float

text

true

false

null_

roundTo

length_

isNull

Converting between column types

round_

just

fromBool

fromInt

toString

Inner queries

data Aggr s a

class Aggregates a

type family OuterCols a where ...

type family LeftCols a where ...

data Inner s

class SqlOrd a

innerJoin

leftJoin

aggregate

groupBy

count

avg

sum_

max_

min_

Modifying tables

class Insert a

insert

insert_

insertWithPK

tryInsert

insertUnless

insertWhen

def

update

update_

upsert

deleteFrom

deleteFrom_

Prepared statements

class Preparable q

class Prepare q f

prepared

Defining schemas

class TableSpec a

type family ColSpecs a where ...

data ColSpec a

data TableName

data ColName

class NonNull a

type family IsNullable a where ...

data Nullable

data NotNullable

class Append a b

type family a :++: b where ...

type family Selectors t a where ...

class HasSelectors t a

table

tableWithSelectors

selectors

required

optional

primary

autoPrimary

fk

unique

Creating and dropping tables

createTable

tryCreateTable

dropTable

tryDropTable

Compiling and inspecting queries

data OnError

compile

compileCreateTable

compileDropTable

compileInsert

compileUpdate

Tuple convenience functions

class Tup a

type family Head a where ...

first

second

third

fourth

fifth

sixth

seventh

eighth

ninth

tenth

Useful re-exports

class MonadIO m

liftIO

data Text

data Day

data TimeOfDay

data UTCTime