Module

Chanpon

Package
purescript-chanpon
Repository
justinwoo/purescript-chanpon

#Effects Source

type Effects e = (db :: DBEffects | e)

#Table Source

newtype Table

Constructors

Instances

#selectAll Source

selectAll :: forall e rl result. RowToList result rl => Keys rl => FromResultFields rl () result => Table -> DBConnection -> Aff (Effects e) (Array (F (Record result)))

#createTableIfNotExists Source

createTableIfNotExists :: forall e rl spec. RowToList spec rl => PrepareSpec rl spec => Table -> DBConnection -> Record spec -> Aff (Effects e) Unit

#insertOrReplaceInto Source

insertOrReplaceInto :: forall e inputL input. RowToList input inputL => PrepareInput inputL input => Table -> DBConnection -> Record input -> Aff (Effects e) Unit

#deleteFrom Source

deleteFrom :: forall e input ty name. RowToList input (Cons name ty Nil) => RowCons name ty () input => IsSymbol name => ToParam ty => Table -> DBConnection -> Record input -> Aff (Effects e) Unit

#fromResultRow Source

fromResultRow :: forall rl fields. RowToList fields rl => FromResultFields rl () fields => Foreign -> F (Record fields)