Module

Yoga.Postgres.ClientOm

Package
purescript-yoga-postgres-om
Repository
rowtype-yoga/purescript-yoga-postgres-om

#run Source

run :: forall tables result params paramsRL stage r err. RowToList params paramsRL => ParamsToArray paramsRL params => ReadForeign (Record result) => Record params -> Q tables result params stage -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record result))

#runOne Source

runOne :: forall tables result params paramsRL stage r err. RowToList params paramsRL => ParamsToArray paramsRL params => ReadForeign (Record result) => Record params -> Q tables result params stage -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record result))

#runExec Source

runExec :: forall tables params paramsRL stage r err. RowToList params paramsRL => ParamsToArray paramsRL params => Record params -> Q tables () params stage -> Om { postgresConnection :: Connection | r } err Int

#Gt Source

data Gt a

Constructors

Instances

#Gte Source

data Gte a

Constructors

Instances

#Lt Source

data Lt a

Constructors

Instances

#Lte Source

data Lte a

Constructors

Instances

#Ne Source

data Ne a

Constructors

Instances

#Like Source

data Like a

Constructors

Instances

#ILike Source

data ILike a

Constructors

Instances

#InArray Source

data InArray a

Constructors

Instances

#Eq Source

data Eq a

Constructors

Instances

#Or Source

data Or a b

Constructors

Instances

#Not Source

data Not a

Constructors

Instances

#gt Source

gt :: forall a. a -> Gt a

#gte Source

gte :: forall a. a -> Gte a

#lt Source

lt :: forall a. a -> Lt a

#lte Source

lte :: forall a. a -> Lte a

#ne Source

ne :: forall a. a -> Ne a

#like_ Source

like_ :: forall a. a -> Like a

#ilike Source

ilike :: forall a. a -> ILike a

#inArray Source

inArray :: forall a. Array a -> InArray a

#eq_ Source

eq_ :: forall a. a -> Eq a

#or_ Source

or_ :: forall a b. a -> b -> Or a b

#not_ Source

not_ :: forall a. a -> Not a

#ValidateWhereColumnsRL Source

class ValidateWhereColumnsRL :: RowList Type -> Row Type -> Constraintclass ValidateWhereColumnsRL rl cols 

Instances

#WhereClauseRL Source

class WhereClauseRL :: RowList Type -> Row Type -> Constraintclass WhereClauseRL rl row  where

Members

Instances

#TableRow Source

class TableRow :: Type -> Row Type -> Constraintclass TableRow table row | table -> row

Instances

#InsertableRow Source

class InsertableRow :: Type -> Row Type -> Constraintclass InsertableRow table row | table -> row

Instances

#FindPrimaryKeyRL Source

class FindPrimaryKeyRL :: RowList Type -> Symbol -> Type -> Constraintclass FindPrimaryKeyRL rl colName colType | rl -> colName colType

Instances

#FindPrimaryKeyDecide Source

class FindPrimaryKeyDecide :: Boolean -> Symbol -> Type -> RowList Type -> Symbol -> Type -> Constraintclass FindPrimaryKeyDecide isPK name entry tail colName colType | isPK name entry tail -> colName colType

Instances

#FindPrimaryKey Source

class FindPrimaryKey :: Type -> Symbol -> Type -> Constraintclass FindPrimaryKey table colName colType | table -> colName colType

Instances

#HasForeignKeyTo Source

class HasForeignKeyTo :: Type -> Symbol -> Boolean -> Constraintclass HasForeignKeyTo colType tableName result | colType tableName -> result

Instances

#ExtractForeignKeyCol Source

class ExtractForeignKeyCol :: Type -> Symbol -> Symbol -> Constraintclass ExtractForeignKeyCol colType tableName refCol | colType tableName -> refCol

Instances

#FindForeignKeyToRL Source

class FindForeignKeyToRL :: RowList Type -> Symbol -> Symbol -> Symbol -> Constraintclass FindForeignKeyToRL childRL parentName localCol parentCol | childRL parentName -> localCol parentCol

Instances

#FindForeignKeyToDecide Source

class FindForeignKeyToDecide :: Boolean -> Symbol -> Type -> RowList Type -> Symbol -> Symbol -> Symbol -> Constraintclass FindForeignKeyToDecide hasFK name entry tail parentName localCol parentCol | hasFK name entry tail parentName -> localCol parentCol

Instances

#FindForeignKeyTo Source

class FindForeignKeyTo :: Type -> Symbol -> Symbol -> Symbol -> Constraintclass FindForeignKeyTo childTable parentTableName localCol parentCol | childTable parentTableName -> localCol parentCol

Instances

#ParseColumnList Source

class ParseColumnList :: Symbol -> Row Type -> RowList Type -> Constraintclass ParseColumnList sym cols resultRL | sym cols -> resultRL

Instances

#ParseColumnListContinue Source

class ParseColumnListContinue :: Symbol -> Row Type -> RowList Type -> Constraintclass ParseColumnListContinue rest cols resultRL | rest cols -> resultRL

Instances

#selectFrom Source

selectFrom :: forall @colsStr name cols resultRL result r err. IsSymbol name => IsSymbol colsStr => ParseColumnList colsStr cols resultRL => ColumnNamesRL resultRL => ListToRow resultRL result => ReadForeign (Record result) => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record result))

#selectOneFrom Source

selectOneFrom :: forall @colsStr name cols resultRL result r err. IsSymbol name => IsSymbol colsStr => ParseColumnList colsStr cols resultRL => ColumnNamesRL resultRL => ListToRow resultRL result => ReadForeign (Record result) => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record result))

#selectFromWhere Source

selectFromWhere :: forall @colsStr name cols resultRL result whereRow whereRL r err. IsSymbol name => IsSymbol colsStr => ParseColumnList colsStr cols resultRL => ColumnNamesRL resultRL => ListToRow resultRL result => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record result) => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record result))

#selectOneFromWhere Source

selectOneFromWhere :: forall @colsStr name cols resultRL result whereRow whereRL r err. IsSymbol name => IsSymbol colsStr => ParseColumnList colsStr cols resultRL => ColumnNamesRL resultRL => ListToRow resultRL result => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record result) => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record result))

#findById Source

findById :: forall name cols row pkCol pkType r err. IsSymbol name => IsSymbol pkCol => TableRow (Table name cols) row => FindPrimaryKey (Table name cols) pkCol pkType => FieldToPGValue pkType => ReadForeign (Record row) => pkType -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record row))

#create Source

create :: forall name cols colsRL insertableRL insertable requiredRL required optionalProvided missing userRow userRowRL row r err. IsSymbol name => RowToList cols colsRL => InsertableColumnsRL colsRL insertableRL => ListToRow insertableRL insertable => RequiredColumnsRL insertableRL requiredRL => ListToRow requiredRL required => Union required optionalProvided userRow => Union userRow missing insertable => RowToList userRow userRowRL => ColumnNamesRL userRowRL => RecordValuesRL userRowRL userRow => TableRow (Table name cols) row => ReadForeign (Record row) => Record userRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record row))

#updateById Source

updateById :: forall name cols row pkCol pkType setRow setRL r err. IsSymbol name => IsSymbol pkCol => TableRow (Table name cols) row => FindPrimaryKey (Table name cols) pkCol pkType => RowToList setRow setRL => ValidateSetColumnsRL setRL cols => SetClauseRL setRL => ColumnCountRL setRL => RecordValuesRL setRL setRow => FieldToPGValue pkType => ReadForeign (Record row) => pkType -> Record setRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record row))

#deleteById Source

deleteById :: forall name cols pkCol pkType r err. IsSymbol name => IsSymbol pkCol => FindPrimaryKey (Table name cols) pkCol pkType => FieldToPGValue pkType => pkType -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Int

#findBy Source

findBy :: forall @col name cols colEntry rest row colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => FieldToPGValue colType => TableRow (Table name cols) row => ReadForeign (Record row) => colType -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#findOneBy Source

findOneBy :: forall @col name cols colEntry rest row colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => FieldToPGValue colType => TableRow (Table name cols) row => ReadForeign (Record row) => colType -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record row))

#findAllWhere Source

findAllWhere :: forall name cols row whereRow whereRL r err. IsSymbol name => TableRow (Table name cols) row => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record row) => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#findOneWhere Source

findOneWhere :: forall name cols row whereRow whereRL r err. IsSymbol name => TableRow (Table name cols) row => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record row) => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record row))

#count Source

count :: forall name cols r err. IsSymbol name => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Int

#countWhere Source

countWhere :: forall name cols whereRow whereRL r err. IsSymbol name => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Int

#exists Source

exists :: forall name cols pkCol pkType r err. IsSymbol name => IsSymbol pkCol => FindPrimaryKey (Table name cols) pkCol pkType => FieldToPGValue pkType => pkType -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Boolean

#existsWhere Source

existsWhere :: forall name cols whereRow whereRL r err. IsSymbol name => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Boolean

#createMany Source

createMany :: forall name cols colsRL insertableRL insertable requiredRL required optionalProvided missing userRow userRowRL row r err. IsSymbol name => RowToList cols colsRL => InsertableColumnsRL colsRL insertableRL => ListToRow insertableRL insertable => RequiredColumnsRL insertableRL requiredRL => ListToRow requiredRL required => Union required optionalProvided userRow => Union userRow missing insertable => RowToList userRow userRowRL => ColumnNamesRL userRowRL => ColumnCountRL userRowRL => RecordValuesRL userRowRL userRow => TableRow (Table name cols) row => ReadForeign (Record row) => Array (Record userRow) -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#upsert Source

upsert :: forall name cols colsRL insertableRL insertable requiredRL required optionalProvided missing userRow userRowRL row pkCol pkType r err. IsSymbol name => IsSymbol pkCol => RowToList cols colsRL => InsertableColumnsRL colsRL insertableRL => ListToRow insertableRL insertable => RequiredColumnsRL insertableRL requiredRL => ListToRow requiredRL required => Union required optionalProvided userRow => Union userRow missing insertable => RowToList userRow userRowRL => ColumnNamesRL userRowRL => RecordValuesRL userRowRL userRow => FindPrimaryKey (Table name cols) pkCol pkType => TableRow (Table name cols) row => ReadForeign (Record row) => Record userRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record row))

#deleteAll Source

deleteAll :: forall name cols r err. IsSymbol name => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Int

#deleteWhere Source

deleteWhere :: forall name cols whereRow whereRL r err. IsSymbol name => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Int

#updateWhere Source

updateWhere :: forall name cols row setRow setRL whereRow whereRL r err. IsSymbol name => TableRow (Table name cols) row => RowToList setRow setRL => ValidateSetColumnsRL setRL cols => SetClauseRL setRL => ColumnCountRL setRL => RecordValuesRL setRL setRow => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record row) => Record whereRow -> Record setRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#createIfNotExists Source

createIfNotExists :: forall name cols colsRL insertableRL insertable requiredRL required optionalProvided missing userRow userRowRL row pkCol pkType r err. IsSymbol name => IsSymbol pkCol => RowToList cols colsRL => InsertableColumnsRL colsRL insertableRL => ListToRow insertableRL insertable => RequiredColumnsRL insertableRL requiredRL => ListToRow requiredRL required => Union required optionalProvided userRow => Union userRow missing insertable => RowToList userRow userRowRL => ColumnNamesRL userRowRL => RecordValuesRL userRowRL userRow => FindPrimaryKey (Table name cols) pkCol pkType => TableRow (Table name cols) row => ReadForeign (Record row) => Record userRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record row))

#upsertMany Source

upsertMany :: forall name cols colsRL insertableRL insertable requiredRL required optionalProvided missing userRow userRowRL row pkCol pkType r err. IsSymbol name => IsSymbol pkCol => RowToList cols colsRL => InsertableColumnsRL colsRL insertableRL => ListToRow insertableRL insertable => RequiredColumnsRL insertableRL requiredRL => ListToRow requiredRL required => Union required optionalProvided userRow => Union userRow missing insertable => RowToList userRow userRowRL => ColumnNamesRL userRowRL => ColumnCountRL userRowRL => RecordValuesRL userRowRL userRow => FindPrimaryKey (Table name cols) pkCol pkType => TableRow (Table name cols) row => ReadForeign (Record row) => Array (Record userRow) -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#findByIdIn Source

findByIdIn :: forall name cols row pkCol pkType r err. IsSymbol name => IsSymbol pkCol => TableRow (Table name cols) row => FindPrimaryKey (Table name cols) pkCol pkType => FieldToPGValue pkType => ReadForeign (Record row) => Array pkType -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#join Source

join :: forall child source. Proxy child -> source -> source /\ (Proxy child)

#JoinRoot Source

class JoinRoot :: Type -> Symbol -> Row Type -> Constraintclass JoinRoot source name cols | source -> name cols

Instances

#JoinSubqueries Source

class JoinSubqueries :: Type -> Symbol -> Constraintclass JoinSubqueries source rootName  where

Members

Instances

#JoinResult Source

class JoinResult :: Type -> Row Type -> Constraintclass JoinResult source result | source -> result

Instances

#findAll Source

findAll :: forall source rootName rootCols result r err. JoinRoot source rootName rootCols => JoinSubqueries source rootName => JoinResult source result => IsSymbol rootName => ReadForeign (Record result) => source -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record result))

#findWith Source

findWith :: forall childName childCols parentName parentCols childRow parentRow localCol parentCol rest result r err. IsSymbol childName => IsSymbol parentName => IsSymbol localCol => IsSymbol parentCol => TableRow (Table childName childCols) childRow => TableRow (Table parentName parentCols) parentRow => FindForeignKeyTo (Table childName childCols) parentName localCol parentCol => Cons parentName (Record parentRow) () rest => Cons childName (Record childRow) rest result => ReadForeign (Record result) => Proxy (Table childName childCols) -> Proxy (Table parentName parentCols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record result))

#findByIdWith Source

findByIdWith :: forall childName childCols parentName parentCols childRow parentRow localCol parentCol pkCol pkType rest result r err. IsSymbol childName => IsSymbol parentName => IsSymbol localCol => IsSymbol parentCol => IsSymbol pkCol => TableRow (Table childName childCols) childRow => TableRow (Table parentName parentCols) parentRow => FindForeignKeyTo (Table childName childCols) parentName localCol parentCol => FindPrimaryKey (Table childName childCols) pkCol pkType => FieldToPGValue pkType => Cons parentName (Record parentRow) () rest => Cons childName (Record childRow) rest result => ReadForeign (Record result) => pkType -> Proxy (Table childName childCols) -> Proxy (Table parentName parentCols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record result))

#findWithWhere Source

findWithWhere :: forall childName childCols parentName parentCols childRow parentRow localCol parentCol rest result whereRow whereRL r err. IsSymbol childName => IsSymbol parentName => IsSymbol localCol => IsSymbol parentCol => TableRow (Table childName childCols) childRow => TableRow (Table parentName parentCols) parentRow => FindForeignKeyTo (Table childName childCols) parentName localCol parentCol => Cons parentName (Record parentRow) () rest => Cons childName (Record childRow) rest result => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL childCols => WhereClauseRL whereRL whereRow => ReadForeign (Record result) => Record whereRow -> Proxy (Table childName childCols) -> Proxy (Table parentName parentCols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record result))

#findIncluding Source

findIncluding :: forall @label parentName parentCols childName childCols parentRow childRow localCol parentCol result r err. IsSymbol label => IsSymbol parentName => IsSymbol childName => IsSymbol localCol => IsSymbol parentCol => TableRow (Table parentName parentCols) parentRow => TableRow (Table childName childCols) childRow => FindForeignKeyTo (Table childName childCols) parentName localCol parentCol => Cons label (Array (Record childRow)) parentRow result => Lacks label parentRow => ReadForeign (Record result) => Proxy (Table parentName parentCols) -> Proxy (Table childName childCols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record result))

#findByIdIncluding Source

findByIdIncluding :: forall @label parentName parentCols childName childCols parentRow childRow localCol parentCol pkCol pkType result r err. IsSymbol label => IsSymbol parentName => IsSymbol childName => IsSymbol localCol => IsSymbol parentCol => IsSymbol pkCol => TableRow (Table parentName parentCols) parentRow => TableRow (Table childName childCols) childRow => FindForeignKeyTo (Table childName childCols) parentName localCol parentCol => FindPrimaryKey (Table parentName parentCols) pkCol pkType => FieldToPGValue pkType => Cons label (Array (Record childRow)) parentRow result => Lacks label parentRow => ReadForeign (Record result) => pkType -> Proxy (Table parentName parentCols) -> Proxy (Table childName childCols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe (Record result))

#findIncludingWhere Source

findIncludingWhere :: forall @label parentName parentCols childName childCols parentRow childRow localCol parentCol result whereRow whereRL r err. IsSymbol label => IsSymbol parentName => IsSymbol childName => IsSymbol localCol => IsSymbol parentCol => TableRow (Table parentName parentCols) parentRow => TableRow (Table childName childCols) childRow => FindForeignKeyTo (Table childName childCols) parentName localCol parentCol => Cons label (Array (Record childRow)) parentRow result => Lacks label parentRow => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL parentCols => WhereClauseRL whereRL whereRow => ReadForeign (Record result) => Record whereRow -> Proxy (Table parentName parentCols) -> Proxy (Table childName childCols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record result))

#Page Source

type Page :: Row Type -> Typetype Page row = { hasMore :: Boolean, items :: Array (Record row) }

#findFirst Source

findFirst :: forall @col name cols colEntry rest row colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => TableRow (Table name cols) row => ReadForeign (Record row) => Int -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Page row)

#findAfter Source

findAfter :: forall @col name cols colEntry rest row colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => FieldToPGValue colType => TableRow (Table name cols) row => ReadForeign (Record row) => colType -> Int -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Page row)

#findBefore Source

findBefore :: forall @col name cols colEntry rest row colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => FieldToPGValue colType => TableRow (Table name cols) row => ReadForeign (Record row) => colType -> Int -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Page row)

#findFirstWhere Source

findFirstWhere :: forall @col name cols colEntry rest row colType whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => TableRow (Table name cols) row => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record row) => Record whereRow -> Int -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Page row)

#findAfterWhere Source

findAfterWhere :: forall @col name cols colEntry rest row colType whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => FieldToPGValue colType => TableRow (Table name cols) row => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record row) => Record whereRow -> colType -> Int -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Page row)

#OrderDir Source

data OrderDir

Constructors

#findOrdered Source

findOrdered :: forall @col name cols colEntry rest row r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => TableRow (Table name cols) row => ReadForeign (Record row) => OrderDir -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#findWhereOrdered Source

findWhereOrdered :: forall @col name cols colEntry rest row whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => TableRow (Table name cols) row => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record row) => Record whereRow -> OrderDir -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#findWhereLimited Source

findWhereLimited :: forall @col name cols colEntry rest row whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => TableRow (Table name cols) row => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record row) => Record whereRow -> OrderDir -> { limit :: Int, offset :: Int } -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#sumOf Source

sumOf :: forall @col name cols colEntry rest colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Number

#sumOfWhere Source

sumOfWhere :: forall @col name cols colEntry rest colType whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err Number

#avgOf Source

avgOf :: forall @col name cols colEntry rest colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err (Maybe Number)

#avgOfWhere Source

avgOfWhere :: forall @col name cols colEntry rest colType whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } err (Maybe Number)

#minOf Source

minOf :: forall @col name cols colEntry rest colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => ReadForeign colType => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe colType)

#minOfWhere Source

minOfWhere :: forall @col name cols colEntry rest colType whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => ReadForeign colType => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe colType)

#maxOf Source

maxOf :: forall @col name cols colEntry rest colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => ReadForeign colType => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe colType)

#maxOfWhere Source

maxOfWhere :: forall @col name cols colEntry rest colType whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => ReadForeign colType => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Maybe colType)

#findDistinct Source

findDistinct :: forall @col name cols colEntry rest colType r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => ReadForeign colType => Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array colType)

#findDistinctWhere Source

findDistinctWhere :: forall @col name cols colEntry rest colType whereRow whereRL r err. IsSymbol name => IsSymbol col => Cons col colEntry rest cols => ExtractType colEntry colType => ReadForeign colType => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array colType)

#deleteWhereReturning Source

deleteWhereReturning :: forall name cols row whereRow whereRL r err. IsSymbol name => TableRow (Table name cols) row => RowToList whereRow whereRL => ValidateWhereColumnsRL whereRL cols => WhereClauseRL whereRL whereRow => ReadForeign (Record row) => Record whereRow -> Proxy (Table name cols) -> Om { postgresConnection :: Connection | r } (parseError :: MultipleErrors | err) (Array (Record row))

#withTransaction Source

withTransaction :: forall r err a. Om { postgresConnection :: Connection | r } err a -> Om { postgresConnection :: Connection | r } err a

#parseRow Source

parseRow :: forall a ctx err. ReadForeign a => Foreign -> Om ctx (parseError :: MultipleErrors | err) a