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 aConstructors
Gt a
Instances
ExtractWhereType (Gt a) a(FieldToPGValue a) => WhereFieldSQL (Gt a)
#Gte Source
data Gte aConstructors
Gte a
Instances
ExtractWhereType (Gte a) a(FieldToPGValue a) => WhereFieldSQL (Gte a)
#Lt Source
data Lt aConstructors
Lt a
Instances
ExtractWhereType (Lt a) a(FieldToPGValue a) => WhereFieldSQL (Lt a)
#Lte Source
data Lte aConstructors
Lte a
Instances
ExtractWhereType (Lte a) a(FieldToPGValue a) => WhereFieldSQL (Lte a)
#Ne Source
data Ne aConstructors
Ne a
Instances
ExtractWhereType (Ne a) a(FieldToPGValue a) => WhereFieldSQL (Ne a)
#Like Source
data Like aConstructors
Like a
Instances
ExtractWhereType (Like a) a(FieldToPGValue a) => WhereFieldSQL (Like a)
#ILike Source
data ILike aConstructors
ILike a
Instances
ExtractWhereType (ILike a) a(FieldToPGValue a) => WhereFieldSQL (ILike a)
#InArray Source
data InArray aConstructors
Instances
ExtractWhereType (InArray a) a(FieldToPGValue a) => WhereFieldSQL (InArray a)
#Eq Source
data Eq aConstructors
Eq a
Instances
ExtractWhereType (Eq a) a(FieldToPGValue a) => WhereFieldSQL (Eq a)
#Or Source
data Or a bConstructors
Or a b
Instances
(ExtractWhereType a c) => ExtractWhereType (Or a b) c(WhereFieldSQL a, WhereFieldSQL b) => WhereFieldSQL (Or a b)
#Not Source
data Not aConstructors
Not a
Instances
(ExtractWhereType a b) => ExtractWhereType (Not a) b(WhereFieldSQL a) => WhereFieldSQL (Not a)
#ExtractWhereType Source
class ExtractWhereType wrapped baseType | wrapped -> baseTypeInstances
ExtractWhereType (Gt a) aExtractWhereType (Gte a) aExtractWhereType (Lt a) aExtractWhereType (Lte a) aExtractWhereType (Ne a) aExtractWhereType (Like a) aExtractWhereType (ILike a) aExtractWhereType (InArray a) aExtractWhereType (Eq a) a(ExtractWhereType a b) => ExtractWhereType (Not a) bExtractWhereType IsNull (Maybe a)ExtractWhereType IsNotNull (Maybe a)(ExtractWhereType a c) => ExtractWhereType (Or a b) cExtractWhereType a a
#WhereFieldSQL Source
class WhereFieldSQL a whereMembers
whereFieldSQLFragment :: a -> String -> Int -> { nextIdx :: Int, sql :: String, values :: Array PGValue }
Instances
(FieldToPGValue a) => WhereFieldSQL (Gt a)(FieldToPGValue a) => WhereFieldSQL (Gte a)(FieldToPGValue a) => WhereFieldSQL (Lt a)(FieldToPGValue a) => WhereFieldSQL (Lte a)(FieldToPGValue a) => WhereFieldSQL (Ne a)(FieldToPGValue a) => WhereFieldSQL (Like a)(FieldToPGValue a) => WhereFieldSQL (ILike a)(FieldToPGValue a) => WhereFieldSQL (InArray a)WhereFieldSQL IsNullWhereFieldSQL IsNotNull(FieldToPGValue a) => WhereFieldSQL (Eq a)(WhereFieldSQL a, WhereFieldSQL b) => WhereFieldSQL (Or a b)(WhereFieldSQL a) => WhereFieldSQL (Not a)(FieldToPGValue a) => WhereFieldSQL a
#ValidateWhereColumnsRL Source
class ValidateWhereColumnsRL :: RowList Type -> Row Type -> Constraintclass ValidateWhereColumnsRL rl cols
Instances
ValidateWhereColumnsRL Nil cols(Cons name entry rest cols, ExtractType entry colType, ExtractWhereType whereType baseType, ValidateWhereColumnsRL tail cols) => ValidateWhereColumnsRL (Cons name whereType tail) cols
#WhereClauseRL Source
class WhereClauseRL :: RowList Type -> Row Type -> Constraintclass WhereClauseRL rl row where
Members
whereClauseFragments :: Proxy rl -> Record row -> Int -> { nextIdx :: Int, sql :: Array String, values :: Array PGValue }
Instances
WhereClauseRL Nil row(IsSymbol name, Cons name typ rest row, WhereFieldSQL typ, WhereClauseRL tail row) => WhereClauseRL (Cons name typ tail) row
#InsertableRow Source
class InsertableRow :: Type -> Row Type -> Constraintclass InsertableRow table row | table -> row
Instances
(RowToList cols rl, InsertableColumnsRL rl insertRL, ListToRow insertRL row) => InsertableRow (Table name cols) row
#HasPrimaryKeyConstraint Source
class HasPrimaryKeyConstraint :: Type -> Boolean -> Constraintclass HasPrimaryKeyConstraint a result | a -> result
Instances
HasPrimaryKeyConstraint (PrimaryKey a) True(HasPrimaryKeyConstraint a result) => HasPrimaryKeyConstraint (AutoIncrement a) result(HasPrimaryKeyConstraint a result) => HasPrimaryKeyConstraint (Unique a) result(HasPrimaryKeyConstraint a result) => HasPrimaryKeyConstraint (Default s a) result(HasPrimaryKeyConstraint a result) => HasPrimaryKeyConstraint (DefaultExpr s a) result(HasPrimaryKeyConstraint a result) => HasPrimaryKeyConstraint (ForeignKey t r c a) result(HasPrimaryKeyConstraint a result) => HasPrimaryKeyConstraint (Nullable a) resultHasPrimaryKeyConstraint a False
#FindPrimaryKeyRL Source
class FindPrimaryKeyRL :: RowList Type -> Symbol -> Type -> Constraintclass FindPrimaryKeyRL rl colName colType | rl -> colName colType
Instances
(Fail (Text "Table has no primary key column")) => FindPrimaryKeyRL Nil "" Unit(HasPrimaryKeyConstraint entry isPK, FindPrimaryKeyDecide isPK name entry tail colName colType) => FindPrimaryKeyRL (Cons name entry tail) colName colType
#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
(ExtractType entry colType) => FindPrimaryKeyDecide True name entry tail name colType(FindPrimaryKeyRL tail colName colType) => FindPrimaryKeyDecide False name entry tail colName colType
#FindPrimaryKey Source
class FindPrimaryKey :: Type -> Symbol -> Type -> Constraintclass FindPrimaryKey table colName colType | table -> colName colType
Instances
(RowToList cols rl, FindPrimaryKeyRL rl colName colType) => FindPrimaryKey (Table name cols) colName colType
#HasForeignKeyTo Source
class HasForeignKeyTo :: Type -> Symbol -> Boolean -> Constraintclass HasForeignKeyTo colType tableName result | colType tableName -> result
Instances
HasForeignKeyTo (ForeignKey table References col a) table True(HasForeignKeyTo a tn result) => HasForeignKeyTo (PrimaryKey a) tn result(HasForeignKeyTo a tn result) => HasForeignKeyTo (AutoIncrement a) tn result(HasForeignKeyTo a tn result) => HasForeignKeyTo (Unique a) tn result(HasForeignKeyTo a tn result) => HasForeignKeyTo (Default s a) tn result(HasForeignKeyTo a tn result) => HasForeignKeyTo (Nullable a) tn resultHasForeignKeyTo a tn False
#ExtractForeignKeyCol Source
class ExtractForeignKeyCol :: Type -> Symbol -> Symbol -> Constraintclass ExtractForeignKeyCol colType tableName refCol | colType tableName -> refCol
Instances
ExtractForeignKeyCol (ForeignKey table References col a) table col(ExtractForeignKeyCol a tn col) => ExtractForeignKeyCol (PrimaryKey a) tn col(ExtractForeignKeyCol a tn col) => ExtractForeignKeyCol (AutoIncrement a) tn col(ExtractForeignKeyCol a tn col) => ExtractForeignKeyCol (Unique a) tn col(ExtractForeignKeyCol a tn col) => ExtractForeignKeyCol (Default s a) tn col(ExtractForeignKeyCol a tn col) => ExtractForeignKeyCol (Nullable a) tn col
#FindForeignKeyToRL Source
class FindForeignKeyToRL :: RowList Type -> Symbol -> Symbol -> Symbol -> Constraintclass FindForeignKeyToRL childRL parentName localCol parentCol | childRL parentName -> localCol parentCol
Instances
(Fail (Text "No foreign key found referencing the target table")) => FindForeignKeyToRL Nil parentName "" ""(HasForeignKeyTo entry parentName hasFK, FindForeignKeyToDecide hasFK name entry tail parentName localCol parentCol) => FindForeignKeyToRL (Cons name entry tail) parentName localCol parentCol
#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
(ExtractForeignKeyCol entry parentName parentCol) => FindForeignKeyToDecide True name entry tail parentName name parentCol(FindForeignKeyToRL tail parentName localCol parentCol) => FindForeignKeyToDecide False name entry tail parentName localCol parentCol
#FindForeignKeyTo Source
class FindForeignKeyTo :: Type -> Symbol -> Symbol -> Symbol -> Constraintclass FindForeignKeyTo childTable parentTableName localCol parentCol | childTable parentTableName -> localCol parentCol
Instances
(RowToList cols rl, FindForeignKeyToRL rl parentName localCol parentCol) => FindForeignKeyTo (Table name cols) parentName localCol parentCol
#ParseColumnList Source
class ParseColumnList :: Symbol -> Row Type -> RowList Type -> Constraintclass ParseColumnList sym cols resultRL | sym cols -> resultRL
Instances
ParseColumnList "" cols Nil(ExtractWord sym word rest, IsSymbol word, Cons word entry restCols cols, ExtractType entry colType, ParseColumnListContinue rest cols tailRL) => ParseColumnList sym cols (Cons word colType tailRL)
#ParseColumnListContinue Source
class ParseColumnListContinue :: Symbol -> Row Type -> RowList Type -> Constraintclass ParseColumnListContinue rest cols resultRL | rest cols -> resultRL
Instances
ParseColumnListContinue "" cols Nil(Cons "," tail rest, SkipSpaces tail rest', ParseColumnList rest' cols resultRL) => ParseColumnListContinue rest cols resultRL
#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))#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))#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))#JoinSubqueries Source
class JoinSubqueries :: Type -> Symbol -> Constraintclass JoinSubqueries source rootName where
Members
joinSubqueries :: Proxy source -> Proxy rootName -> Array String
Instances
JoinSubqueries (Proxy (Table name cols)) rootName(JoinSubqueries left rootName, IsSymbol childName, IsSymbol localCol, IsSymbol parentCol, FindForeignKeyTo (Table childName childCols) rootName localCol parentCol) => JoinSubqueries (Tuple left (Proxy (Table childName childCols))) rootName
#JoinResult Source
class JoinResult :: Type -> Row Type -> Constraintclass JoinResult source result | source -> result
Instances
(TableRow (Table name cols) row) => JoinResult (Proxy (Table name cols)) row(JoinResult left innerResult, IsSymbol childName, TableRow (Table childName childCols) childRow, Cons childName (Array (Record childRow)) innerResult result, Lacks childName innerResult) => JoinResult (Tuple left (Proxy (Table childName childCols))) result
#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))#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)#orderDirSQL Source
orderDirSQL :: OrderDir -> String#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#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