Module

Yoga.Postgres.Schema

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

#Table Source

data Table :: Symbol -> Row Type -> Typedata Table name columns

Constructors

Instances

#Default Source

data Default :: forall k. k -> Type -> Typedata Default val a

Instances

#References Source

data References

Instances

#ForeignKey Source

data ForeignKey :: Symbol -> Type -> Symbol -> Type -> Typedata ForeignKey table references col a

Instances

#Nullable Source

data Nullable a

Instances

#Point Source

#IsNullable Source

class IsNullable :: forall k. k -> Constraintclass IsNullable a  where

Members

Instances

#ExtractType Source

class ExtractType wrapped typ | wrapped -> typ

Instances

#RenderDefaultValue Source

class RenderDefaultValue :: forall k1 k2. k1 -> k2 -> Constraintclass RenderDefaultValue val typ  where

Members

Instances

#joinConstraints Source

#CreateTableDDL Source

class CreateTableDDL :: forall k. k -> Constraintclass CreateTableDDL a  where

Members

Instances

#RenderColumnsRL Source

class RenderColumnsRL :: RowList Type -> Constraintclass RenderColumnsRL rl  where

Members

Instances

#InsertColumnsRL Source

#InsertSQLFor Source

class InsertSQLFor :: forall k. k -> Constraintclass InsertSQLFor a  where

Members

Instances

#SelectAllSQLFor Source

class SelectAllSQLFor :: forall k. k -> Constraintclass SelectAllSQLFor a  where

Members

Instances

#WhereClauseRL Source

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

Members

Instances

#SelectWhereSQLFor Source

class SelectWhereSQLFor :: forall k1 k2. k1 -> k2 -> Constraintclass SelectWhereSQLFor a whereRow  where

Members

Instances

#ColumnCountRL Source

class ColumnCountRL :: RowList Type -> Constraintclass ColumnCountRL rl  where

Members

Instances

#UpdateSQLFor Source

class UpdateSQLFor :: forall k1 k2 k3. k1 -> k2 -> k3 -> Constraintclass UpdateSQLFor table setRow whereRow  where

Members

Instances

#DeleteSQLFor Source

class DeleteSQLFor :: forall k1 k2. k1 -> k2 -> Constraintclass DeleteSQLFor table whereRow  where

Members

Instances

#UnwrapMaybe Source

class UnwrapMaybe a b | a -> b

Instances

#SkipSpaces Source

class SkipSpaces :: Symbol -> Symbol -> Constraintclass SkipSpaces sym result | sym -> result

Instances

#SkipSpacesGo Source

class SkipSpacesGo :: Symbol -> Symbol -> Symbol -> Constraintclass SkipSpacesGo head tail result | head tail -> result

Instances

#SkipStringLiteral Source

class SkipStringLiteral :: Symbol -> Symbol -> Constraintclass SkipStringLiteral sym rest | sym -> rest

Instances

#SkipStringLiteralGo Source

class SkipStringLiteralGo :: Symbol -> Symbol -> Symbol -> Constraintclass SkipStringLiteralGo head tail rest | head tail -> rest

Instances

#ExtractWord Source

class ExtractWord :: Symbol -> Symbol -> Symbol -> Constraintclass ExtractWord sym word rest | sym -> word rest

Instances

#ExtractWordGo Source

class ExtractWordGo :: Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Constraintclass ExtractWordGo head tail acc word rest | head tail acc -> word rest

Instances

#StripColumnsRL Source

class StripColumnsRL :: RowList Type -> RowList Type -> Constraintclass StripColumnsRL rl out | rl -> out

Instances

#StripColumns Source

class StripColumns :: Row Type -> Row Type -> Constraintclass StripColumns cols result | cols -> result

Instances

#SingleTable Source

class SingleTable :: Row (Row Type) -> Symbol -> Row Type -> Constraintclass SingleTable tables name cols | tables -> name cols

Instances

#SplitOnDot Source

class SplitOnDot :: Symbol -> Boolean -> Symbol -> Symbol -> Constraintclass SplitOnDot sym hasDot table col | sym -> hasDot table col

Instances

#SplitOnDotGo Source

class SplitOnDotGo :: Symbol -> Symbol -> Symbol -> Boolean -> Symbol -> Symbol -> Constraintclass SplitOnDotGo head tail acc hasDot table col | head tail acc -> hasDot table col

Instances

#ResolveColumn Source

class ResolveColumn :: Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveColumn word tables typ | word tables -> typ

Instances

#ResolveColumnBranch Source

class ResolveColumnBranch :: Boolean -> Symbol -> Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveColumnBranch hasDot table col tables typ | hasDot table col tables -> typ

Instances

#FindUnqualifiedColumn Source

class FindUnqualifiedColumn :: Symbol -> RowList (Row Type) -> Type -> Constraintclass FindUnqualifiedColumn col tablesRL typ | col tablesRL -> typ

Instances

#HasColumnRL Source

class HasColumnRL :: Symbol -> RowList Type -> Boolean -> Constraintclass HasColumnRL col rl found | col rl -> found

Instances

#FindUnqualifiedColumnDecide Source

class FindUnqualifiedColumnDecide :: Boolean -> Symbol -> Symbol -> Row Type -> RowList (Row Type) -> Type -> Constraintclass FindUnqualifiedColumnDecide found col tableName tableCols restTables typ | found col tableName tableCols restTables -> typ

Instances

#AssertNotInRemainingTables Source

class AssertNotInRemainingTables :: Symbol -> RowList (Row Type) -> Constraintclass AssertNotInRemainingTables col tablesRL 

Instances

#AssertNotAmbiguous Source

class AssertNotAmbiguous :: Boolean -> Symbol -> Symbol -> Constraintclass AssertNotAmbiguous found col tableName 

Instances

#ParseSelect Source

class ParseSelect :: Symbol -> Row (Row Type) -> Row Type -> Constraintclass ParseSelect sym tables result | sym tables -> result

Instances

#ParseSelectGo Source

class ParseSelectGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectGo head tail acc tables accRL outRL | head tail acc tables accRL -> outRL

Instances

#ParseSelectAfterCol Source

class ParseSelectAfterCol :: Symbol -> Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectAfterCol colRef rest tables accRL outRL | colRef rest tables accRL -> outRL

Instances

#ParseSelectAfterColByHead Source

class ParseSelectAfterColByHead :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectAfterColByHead head tail colRef tables accRL outRL | head tail colRef tables accRL -> outRL

Instances

#ParseSelectHandleAS Source

class ParseSelectHandleAS :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectHandleAS keyword afterKeyword colRef tables accRL outRL | keyword afterKeyword colRef tables accRL -> outRL

Instances

#ParseSelectExpectEnd Source

class ParseSelectExpectEnd :: Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectExpectEnd sym tables accRL outRL | sym tables accRL -> outRL

Instances

#ParseSelectExpectEndByHead Source

class ParseSelectExpectEndByHead :: Symbol -> Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectExpectEndByHead head tail tables accRL outRL | head tail tables accRL -> outRL

Instances

#ParseSelectContinue Source

class ParseSelectContinue :: Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectContinue sym tables accRL outRL | sym tables accRL -> outRL

Instances

#ExtractUntilParen Source

class ExtractUntilParen :: Symbol -> Symbol -> Symbol -> Constraintclass ExtractUntilParen tail args afterParen | tail -> args afterParen

Instances

#Z Source

data Z

Instances

#S Source

data S n

Instances

#ExtractUntilParenGo Source

class ExtractUntilParenGo :: Symbol -> Symbol -> Symbol -> Type -> Symbol -> Symbol -> Constraintclass ExtractUntilParenGo head tail acc depth args afterParen | head tail acc depth -> args afterParen

Instances

#ResolveAggregateArg Source

class ResolveAggregateArg :: Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveAggregateArg args tables argType | args tables -> argType

Instances

#ResolveAggregateArgCol Source

class ResolveAggregateArgCol :: Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveAggregateArgCol col tables argType | col tables -> argType

Instances

#ResolveAggregateArgColByHead Source

class ResolveAggregateArgColByHead :: Symbol -> Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveAggregateArgColByHead head col tables argType | head col tables -> argType

Instances

#AggregateReturnType Source

class AggregateReturnType :: Symbol -> Type -> Type -> Constraintclass AggregateReturnType funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeByHead Source

class AggregateReturnTypeByHead :: Symbol -> Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeByHead head funcName argType returnType | head funcName argType -> returnType

Instances

#AggregateReturnTypeA Source

class AggregateReturnTypeA :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeA funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeC Source

class AggregateReturnTypeC :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeC funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeD Source

class AggregateReturnTypeD :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeD funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeF Source

class AggregateReturnTypeF :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeF funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeL Source

class AggregateReturnTypeL :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeL funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeM Source

class AggregateReturnTypeM :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeM funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeN Source

class AggregateReturnTypeN :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeN funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeR Source

class AggregateReturnTypeR :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeR funcName argType returnType | funcName argType -> returnType

Instances

#AggregateReturnTypeS Source

class AggregateReturnTypeS :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeS funcName argType returnType | funcName argType -> returnType

Instances

#ParseAfterAggregate Source

class ParseAfterAggregate :: Symbol -> Row (Row Type) -> Type -> RowList Type -> RowList Type -> Constraintclass ParseAfterAggregate rest tables returnType accRL outRL | rest tables returnType accRL -> outRL

Instances

#ParseAfterAggregateByHead Source

class ParseAfterAggregateByHead :: Symbol -> Symbol -> Row (Row Type) -> Type -> RowList Type -> RowList Type -> Constraintclass ParseAfterAggregateByHead head tail tables returnType accRL outRL | head tail tables returnType accRL -> outRL

Instances

#ParseAfterAggregateKeyword Source

class ParseAfterAggregateKeyword :: Symbol -> Symbol -> Row (Row Type) -> Type -> RowList Type -> RowList Type -> Constraintclass ParseAfterAggregateKeyword keyword afterKeyword tables returnType accRL outRL | keyword afterKeyword tables returnType accRL -> outRL

Instances

#ParseOverClause Source

class ParseOverClause :: Symbol -> Row (Row Type) -> Type -> RowList Type -> RowList Type -> Constraintclass ParseOverClause rest tables returnType accRL outRL | rest tables returnType accRL -> outRL

Instances

#ParseOverClauseByHead Source

class ParseOverClauseByHead :: Symbol -> Symbol -> Row (Row Type) -> Type -> RowList Type -> RowList Type -> Constraintclass ParseOverClauseByHead head tail tables returnType accRL outRL | head tail tables returnType accRL -> outRL

Instances

#ValidateOverContent Source

class ValidateOverContent :: Symbol -> Row (Row Type) -> Constraintclass ValidateOverContent content tables 

Instances

#ValidateOverContentTrimmed Source

class ValidateOverContentTrimmed :: Symbol -> Row (Row Type) -> Constraintclass ValidateOverContentTrimmed content tables 

Instances

#ValidateOverKeyword Source

class ValidateOverKeyword :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateOverKeyword keyword rest tables 

Instances

#AssertIsBy Source

class AssertIsBy :: Symbol -> Constraintclass AssertIsBy sym 

Instances

#ValidatePartitionByColumns Source

#ValidatePartitionByColumnsTrimmed Source

#ValidatePartitionByColumnsGo Source

class ValidatePartitionByColumnsGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidatePartitionByColumnsGo head tail acc tables 

Instances

#FlushPartitionWord Source

class FlushPartitionWord :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass FlushPartitionWord word rest tables 

Instances

#NoType Source

data NoType

#ParseWhere Source

class ParseWhere :: Symbol -> Row (Row Type) -> Row Type -> Constraintclass ParseWhere sym tables params | sym tables -> params

Instances

#ParseWhereGo Source

class ParseWhereGo :: Symbol -> Symbol -> Symbol -> Type -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseWhereGo head tail acc currentType tables paramsIn paramsOut | head tail acc currentType tables paramsIn -> paramsOut

Instances

#ParseWhereContinue Source

class ParseWhereContinue :: Symbol -> Type -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseWhereContinue sym currentType tables paramsIn paramsOut | sym currentType tables paramsIn -> paramsOut

Instances

#FlushWhereWord Source

class FlushWhereWord :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWord word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordByHead Source

class FlushWhereWordByHead :: Symbol -> Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordByHead head word currentType tables paramsIn currentTypeOut paramsOut | head word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordA Source

class FlushWhereWordA :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordA word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordB Source

class FlushWhereWordB :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordB word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordC Source

class FlushWhereWordC :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordC word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordD Source

class FlushWhereWordD :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordD word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordE Source

class FlushWhereWordE :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordE word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordF Source

class FlushWhereWordF :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordF word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordI Source

class FlushWhereWordI :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordI word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordJ Source

class FlushWhereWordJ :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordJ word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordL Source

class FlushWhereWordL :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordL word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordM Source

class FlushWhereWordM :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordM word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordN Source

class FlushWhereWordN :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordN word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordS Source

class FlushWhereWordS :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordS word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordT Source

class FlushWhereWordT :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordT word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordU Source

class FlushWhereWordU :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordU word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordV Source

class FlushWhereWordV :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordV word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordP Source

class FlushWhereWordP :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordP word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#FlushWhereWordR Source

class FlushWhereWordR :: Symbol -> Type -> Row (Row Type) -> RowList Type -> Type -> RowList Type -> Constraintclass FlushWhereWordR word currentType tables paramsIn currentTypeOut paramsOut | word currentType tables paramsIn -> currentTypeOut paramsOut

Instances

#ValidateColumnList Source

class ValidateColumnList :: Symbol -> Row (Row Type) -> Constraintclass ValidateColumnList sym tables 

Instances

#ValidateColumnListContinue Source

#ValidateColumnListGo Source

class ValidateColumnListGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateColumnListGo head tail acc tables 

Instances

#ValidateOrderBy Source

class ValidateOrderBy :: Symbol -> Row (Row Type) -> Constraintclass ValidateOrderBy sym tables 

Instances

#ValidateOrderByGo Source

class ValidateOrderByGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateOrderByGo head tail acc tables 

Instances

#ValidateOrderByContinueNonEmpty Source

class ValidateOrderByContinueNonEmpty :: Symbol -> Row (Row Type) -> Constraintclass ValidateOrderByContinueNonEmpty sym tables 

Instances

#FlushOrderByFinalWord Source

class FlushOrderByFinalWord :: Symbol -> Row (Row Type) -> Constraintclass FlushOrderByFinalWord word tables 

Instances

#FlushOrderByWord Source

class FlushOrderByWord :: Symbol -> Row (Row Type) -> Constraintclass FlushOrderByWord word tables 

Instances

#FlushOrderByThenSkip Source

class FlushOrderByThenSkip :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass FlushOrderByThenSkip colName rest tables 

Instances

#FlushOrderByThenSkipByHead Source

class FlushOrderByThenSkipByHead :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass FlushOrderByThenSkipByHead head tail tables 

Instances

#ValidateOrderByContinue Source

#ValidateOrderByContinueByHead Source

class ValidateOrderByContinueByHead :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateOrderByContinueByHead head tail tables 

Instances

#RowListHas Source

class RowListHas :: Symbol -> RowList Type -> Boolean -> Constraintclass RowListHas label rl has | label rl -> has

Instances

#CheckDistinctOrderBy Source

class CheckDistinctOrderBy :: Row Type -> Symbol -> Row Type -> Constraintclass CheckDistinctOrderBy stage cols result 

Instances

#CheckDistinctOrderByBranch Source

#OrderByColumnsInResult Source

class OrderByColumnsInResult :: Symbol -> Row Type -> Constraintclass OrderByColumnsInResult sym result 

Instances

#OrderByColumnsInResultGo Source

class OrderByColumnsInResultGo :: Symbol -> Symbol -> Symbol -> Row Type -> Constraintclass OrderByColumnsInResultGo head tail acc result 

Instances

#FlushOrderByWordInResult Source

#CheckColumnInResult Source

class CheckColumnInResult :: Symbol -> Row Type -> Constraintclass CheckColumnInResult col result 

Instances

#CheckColumnInResultRL Source

class CheckColumnInResultRL :: Symbol -> RowList Type -> Constraintclass CheckColumnInResultRL col rl 

Instances

#FlushOrderByThenSkipInResult Source

class FlushOrderByThenSkipInResult :: Symbol -> Symbol -> Row Type -> Constraintclass FlushOrderByThenSkipInResult colName rest result 

Instances

#FlushOrderByThenSkipByHeadInResult Source

class FlushOrderByThenSkipByHeadInResult :: Symbol -> Symbol -> Row Type -> Constraintclass FlushOrderByThenSkipByHeadInResult head tail result 

Instances

#OrderByColumnsInResultContinueByHead Source

class OrderByColumnsInResultContinueByHead :: Symbol -> Symbol -> Row Type -> Constraintclass OrderByColumnsInResultContinueByHead head tail result 

Instances

#ValidateColumns Source

class ValidateColumns :: Symbol -> Row Type -> Constraintclass ValidateColumns sym cols 

Instances

#ValidateColumnsGo Source

class ValidateColumnsGo :: Symbol -> Symbol -> Symbol -> Row Type -> Constraintclass ValidateColumnsGo head tail acc cols 

Instances

#FlushColumnWord Source

class FlushColumnWord :: Symbol -> Row Type -> Constraintclass FlushColumnWord word cols 

Instances

#FlushColumnWordByHead Source

class FlushColumnWordByHead :: Symbol -> Symbol -> Row Type -> Constraintclass FlushColumnWordByHead head word cols 

Instances

#ValidateAfterName Source

class ValidateAfterName :: Symbol -> Symbol -> Row Type -> Constraintclass ValidateAfterName acc rest cols 

Instances

#ValidateAfterNameByHead Source

class ValidateAfterNameByHead :: Symbol -> Symbol -> Row Type -> Constraintclass ValidateAfterNameByHead head tail cols 

Instances

#HandleAfterColumnWord Source

class HandleAfterColumnWord :: Symbol -> Symbol -> Row Type -> Constraintclass HandleAfterColumnWord word rest cols 

Instances

#SkipAlias Source

class SkipAlias :: Symbol -> Row Type -> Constraintclass SkipAlias sym cols 

Instances

#ExpectCommaOrEnd Source

class ExpectCommaOrEnd :: Symbol -> Row Type -> Constraintclass ExpectCommaOrEnd sym cols 

Instances

#ExpectCommaOrEndByHead Source

class ExpectCommaOrEndByHead :: Symbol -> Symbol -> Row Type -> Constraintclass ExpectCommaOrEndByHead head tail cols 

Instances

#ValidateJoinCondition Source

class ValidateJoinCondition :: Symbol -> Row (Row Type) -> Constraintclass ValidateJoinCondition sym tables 

Instances

#ValidateJoinCondGo Source

class ValidateJoinCondGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateJoinCondGo head tail acc tables 

Instances

#FlushJoinWord Source

class FlushJoinWord :: Symbol -> Row (Row Type) -> Constraintclass FlushJoinWord word tables 

Instances

#FlushJoinWordByHead Source

class FlushJoinWordByHead :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass FlushJoinWordByHead head word tables 

Instances

#ParseConflictAction Source

class ParseConflictAction :: Symbol -> Row Type -> Constraintclass ParseConflictAction sym cols 

Instances

#ExpectKeyword Source

class ExpectKeyword :: Symbol -> Symbol -> Constraintclass ExpectKeyword actual expected 

Instances

#ParseAssignments Source

class ParseAssignments :: Symbol -> Row Type -> Constraintclass ParseAssignments sym cols 

Instances

#ParseAssignmentsContinue Source

#ParseAssignmentsContinueByHead Source

#ExpectChar Source

class ExpectChar :: Symbol -> Symbol -> Symbol -> Constraintclass ExpectChar sym char rest | sym char -> rest

Instances

#ExpectCharMatch Source

class ExpectCharMatch :: Symbol -> Symbol -> Symbol -> Symbol -> Constraintclass ExpectCharMatch head tail expected rest | head tail expected -> rest

Instances

#ValidateExcludedRef Source

class ValidateExcludedRef :: Symbol -> Symbol -> Constraintclass ValidateExcludedRef ref colName 

Instances

#MatchSymbol Source

class MatchSymbol :: Symbol -> Symbol -> Constraintclass MatchSymbol a b 

Instances

#IsAutoGeneratedTC Source

#InsertableColumnsRL Source

class InsertableColumnsRL :: RowList Type -> RowList Type -> Constraintclass InsertableColumnsRL tableRL outRL | tableRL -> outRL

Instances

#InsertableColumnDecide Source

class InsertableColumnDecide :: Boolean -> Symbol -> Type -> RowList Type -> RowList Type -> Constraintclass InsertableColumnDecide isAuto name typ tail outRL | isAuto name typ tail -> outRL

Instances

#RequiredColumnsRL Source

class RequiredColumnsRL :: RowList Type -> RowList Type -> Constraintclass RequiredColumnsRL rl out | rl -> out

Instances

#ColumnNamesRL Source

class ColumnNamesRL :: RowList Type -> Constraintclass ColumnNamesRL rl  where

Members

Instances

#RecordValuesRL Source

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

Members

Instances

#MakeNullableRL Source

class MakeNullableRL :: RowList Type -> RowList Type -> Constraintclass MakeNullableRL rl out | rl -> out

Instances

#MakeNullableDecide Source

class MakeNullableDecide :: Type -> Symbol -> Type -> RowList Type -> RowList Type -> Constraintclass MakeNullableDecide typ name entry tail out | typ name entry tail -> out

Instances

#Q Source

newtype Q :: Row (Row Type) -> Row Type -> Row Type -> Row Type -> Typenewtype Q tables result params stage

Constructors

#HasClause Source

class HasClause :: Symbol -> Row Type -> Constraintclass HasClause label row 

Instances

#HasAnyDML Source

class HasAnyDML :: Row Type -> Constraintclass HasAnyDML stage 

Instances

#HasAnyDMLRL Source

class HasAnyDMLRL :: RowList Type -> Constraintclass HasAnyDMLRL rl 

Instances

#toSQL Source

toSQL :: forall tables result params stage. Q tables result params stage -> String

#from Source

from :: forall name cols tables. IsSymbol name => Cons name cols () tables => Proxy (Table name cols) -> Q tables () () ()

#fromAs Source

fromAs :: forall @alias name cols tables. IsSymbol name => IsSymbol alias => Cons alias cols () tables => Proxy (Table name cols) -> Q tables () () ()

#selectAll Source

selectAll :: forall tables name cols result r p stage stage'. SingleTable tables name cols => IsSymbol name => StripColumns cols result => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Lacks "where" stage => Lacks "orderBy" stage => Lacks "limit" stage => Lacks "offset" stage => Cons "select" Unit stage stage' => Q tables r p stage -> Q tables result p stage'

#select Source

select :: forall @sel tables result r p stage stage'. IsSymbol sel => ParseSelect sel tables result => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Lacks "where" stage => Lacks "orderBy" stage => Lacks "limit" stage => Lacks "offset" stage => Cons "select" Unit stage stage' => Q tables r p stage -> Q tables result p stage'

#selectDistinct Source

selectDistinct :: forall @sel tables result r p stage stage' stage''. IsSymbol sel => ParseSelect sel tables result => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Lacks "where" stage => Lacks "orderBy" stage => Lacks "limit" stage => Lacks "offset" stage => Cons "select" Unit stage stage' => Cons "distinct" Unit stage' stage'' => Q tables r p stage -> Q tables result p stage''

#selectDistinctOn Source

selectDistinctOn :: forall @on @sel tables result r p stage stage'. IsSymbol on => IsSymbol sel => ValidateColumnList on tables => ParseSelect sel tables result => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Lacks "where" stage => Lacks "orderBy" stage => Lacks "limit" stage => Lacks "offset" stage => Cons "select" Unit stage stage' => Q tables r p stage -> Q tables result p stage'

#where_ Source

where_ :: forall @whr tables result params p stage stage'. IsSymbol whr => ParseWhere whr tables params => HasAnyDML stage => Lacks "where" stage => Lacks "insert" stage => Lacks "groupBy" stage => Lacks "having" stage => Lacks "orderBy" stage => Lacks "limit" stage => Lacks "offset" stage => Cons "where" Unit stage stage' => Q tables result p stage -> Q tables result params stage'

#orderBy Source

orderBy :: forall @cols tables result params stage stage'. IsSymbol cols => ValidateOrderBy cols tables => CheckDistinctOrderBy stage cols result => HasClause "select" stage => Lacks "orderBy" stage => Lacks "limit" stage => Lacks "offset" stage => Cons "orderBy" Unit stage stage' => Q tables result params stage -> Q tables result params stage'

#groupBy Source

groupBy :: forall @cols tables result params stage stage'. IsSymbol cols => ValidateColumnList cols tables => HasClause "select" stage => Lacks "groupBy" stage => Lacks "having" stage => Lacks "orderBy" stage => Lacks "limit" stage => Lacks "offset" stage => Cons "groupBy" Unit stage stage' => Q tables result params stage -> Q tables result params stage'

#having Source

having :: forall @cond tables result params havingParams allParams stage stage'. IsSymbol cond => ParseWhere cond tables havingParams => Union params havingParams allParams => Nub allParams allParams => HasClause "groupBy" stage => Lacks "having" stage => Lacks "orderBy" stage => Lacks "limit" stage => Lacks "offset" stage => Cons "having" Unit stage stage' => Q tables result params stage -> Q tables result allParams stage'

#IsLimitParam Source

class IsLimitParam :: Symbol -> Symbol -> Boolean -> Constraintclass IsLimitParam head tail isParam | head tail -> isParam

Instances

#ParseLimitOffsetParams Source

class ParseLimitOffsetParams :: Boolean -> Symbol -> Row Type -> Row Type -> Constraintclass ParseLimitOffsetParams isParam name params params' | isParam name params -> params'

Instances

#ValidateNumericLiteral Source

#ValidateAllDigits Source

class ValidateAllDigits :: Symbol -> Symbol -> Constraintclass ValidateAllDigits head tail 

Instances

#ParseLimitOffset Source

class ParseLimitOffset :: Symbol -> Row Type -> Row Type -> Constraintclass ParseLimitOffset sym params params' | sym params -> params'

Instances

#ParseLimitOffsetBranch Source

class ParseLimitOffsetBranch :: Boolean -> Symbol -> Symbol -> Row Type -> Row Type -> Constraintclass ParseLimitOffsetBranch isParam sym paramName params params' | isParam sym paramName params -> params'

Instances

#limit Source

limit :: forall @sym tables result params params' stage stage'. ParseLimitOffset sym params params' => IsSymbol sym => HasClause "select" stage => Lacks "limit" stage => Cons "limit" Unit stage stage' => Q tables result params stage -> Q tables result params' stage'

#offset Source

offset :: forall @sym tables result params params' stage stage'. ParseLimitOffset sym params params' => IsSymbol sym => HasClause "select" stage => Lacks "offset" stage => Cons "offset" Unit stage stage' => Q tables result params stage -> Q tables result params' stage'

#insert Source

insert :: forall tables name cols colsRL insertableRL insertable requiredRL required optionalProvided missing userRow userRowRL stage stage'. SingleTable tables name cols => 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 => IsSymbol name => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Cons "insert" Unit stage stage' => Record userRow -> Q tables () () stage -> Q tables () () stage'

#returning Source

returning :: forall @sel tables name cols result p stage stage'. SingleTable tables name cols => IsSymbol sel => ParseSelect sel tables result => Lacks "returning" stage => Lacks "select" stage => Cons "returning" Unit stage stage' => Q tables () p stage -> Q tables result p stage'

#returningAll Source

returningAll :: forall tables name cols result p stage stage'. SingleTable tables name cols => StripColumns cols result => Lacks "returning" stage => Lacks "select" stage => Cons "returning" Unit stage stage' => Q tables () p stage -> Q tables result p stage'

#ValidateSetColumnsRL Source

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

Instances

#SetClauseRL Source

class SetClauseRL :: RowList Type -> Constraintclass SetClauseRL rl  where

Members

Instances

#set Source

set :: forall tables name cols setRow setRL stage stage'. SingleTable tables name cols => RowToList setRow setRL => IsSymbol name => ValidateSetColumnsRL setRL cols => SetClauseRL setRL => RecordValuesRL setRL setRow => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Cons "set" Unit stage stage' => Record setRow -> Q tables () () stage -> Q tables () () stage'

#delete Source

delete :: forall tables name cols r p stage stage'. SingleTable tables name cols => IsSymbol name => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Cons "delete" Unit stage stage' => Q tables r p stage -> Q tables () () stage'

#onConflict Source

onConflict :: forall @target @action tables name cols result params stage stage'. SingleTable tables name cols => IsSymbol target => IsSymbol action => ValidateColumns target cols => ParseConflictAction action cols => HasClause "insert" stage => Lacks "conflict" stage => Cons "conflict" Unit stage stage' => Q tables result params stage -> Q tables result params stage'

#onConflictDoNothing Source

onConflictDoNothing :: forall @target tables name cols result params stage stage'. SingleTable tables name cols => IsSymbol target => ValidateColumns target cols => HasClause "insert" stage => Lacks "conflict" stage => Cons "conflict" Unit stage stage' => Q tables result params stage -> Q tables result params stage'

#innerJoin Source

innerJoin :: forall @cond name cols tables tables' r p stage. IsSymbol name => IsSymbol cond => Lacks name tables => Cons name cols tables tables' => ValidateJoinCondition cond tables' => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Proxy (Table name cols) -> Q tables r p stage -> Q tables' () () (join :: Unit)

#leftJoin Source

leftJoin :: forall @cond name cols colsRL nullableColsRL nullableCols tables tables' r p stage. IsSymbol name => IsSymbol cond => RowToList cols colsRL => MakeNullableRL colsRL nullableColsRL => ListToRow nullableColsRL nullableCols => Lacks name tables => Cons name nullableCols tables tables' => ValidateJoinCondition cond tables' => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Proxy (Table name cols) -> Q tables r p stage -> Q tables' () () (join :: Unit)

#innerJoinAs Source

innerJoinAs :: forall @alias @cond name cols tables tables' r p stage. IsSymbol name => IsSymbol alias => IsSymbol cond => Lacks alias tables => Cons alias cols tables tables' => ValidateJoinCondition cond tables' => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Proxy (Table name cols) -> Q tables r p stage -> Q tables' () () (join :: Unit)

#leftJoinAs Source

leftJoinAs :: forall @alias @cond name cols colsRL nullableColsRL nullableCols tables tables' r p stage. IsSymbol name => IsSymbol alias => IsSymbol cond => RowToList cols colsRL => MakeNullableRL colsRL nullableColsRL => ListToRow nullableColsRL nullableCols => Lacks alias tables => Cons alias nullableCols tables tables' => ValidateJoinCondition cond tables' => Lacks "select" stage => Lacks "insert" stage => Lacks "set" stage => Lacks "delete" stage => Proxy (Table name cols) -> Q tables r p stage -> Q tables' () () (join :: Unit)

#SetOpStage Source

type SetOpStage :: Row Typetype SetOpStage = (delete :: Unit, groupBy :: Unit, having :: Unit, insert :: Unit, select :: Unit, set :: Unit, where :: Unit)

#union Source

union :: forall tables1 tables2 result params1 params2 params stage1 stage2. HasClause "select" stage1 => HasClause "select" stage2 => Union params1 params2 params => Nub params params => Q tables1 result params1 stage1 -> Q tables2 result params2 stage2 -> Q tables1 result params SetOpStage

#unionAll Source

unionAll :: forall tables1 tables2 result params1 params2 params stage1 stage2. HasClause "select" stage1 => HasClause "select" stage2 => Union params1 params2 params => Nub params params => Q tables1 result params1 stage1 -> Q tables2 result params2 stage2 -> Q tables1 result params SetOpStage

#intersect Source

intersect :: forall tables1 tables2 result params1 params2 params stage1 stage2. HasClause "select" stage1 => HasClause "select" stage2 => Union params1 params2 params => Nub params params => Q tables1 result params1 stage1 -> Q tables2 result params2 stage2 -> Q tables1 result params SetOpStage

#intersectAll Source

intersectAll :: forall tables1 tables2 result params1 params2 params stage1 stage2. HasClause "select" stage1 => HasClause "select" stage2 => Union params1 params2 params => Nub params params => Q tables1 result params1 stage1 -> Q tables2 result params2 stage2 -> Q tables1 result params SetOpStage

#except_ Source

except_ :: forall tables1 tables2 result params1 params2 params stage1 stage2. HasClause "select" stage1 => HasClause "select" stage2 => Union params1 params2 params => Nub params params => Q tables1 result params1 stage1 -> Q tables2 result params2 stage2 -> Q tables1 result params SetOpStage

#exceptAll Source

exceptAll :: forall tables1 tables2 result params1 params2 params stage1 stage2. HasClause "select" stage1 => HasClause "select" stage2 => Union params1 params2 params => Nub params params => Q tables1 result params1 stage1 -> Q tables2 result params2 stage2 -> Q tables1 result params SetOpStage

#ParamsToArray Source

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

Members

Instances

#namedParamRegex Source

#replaceNamedParams Source

replaceNamedParams :: Int -> Array { name :: String, value :: Foreign } -> String -> { sql :: String, values :: Array PGValue }

#runQuery Source

runQuery :: forall tables result params paramsRL stage. RowToList params paramsRL => ParamsToArray paramsRL params => ReadForeign (Record result) => Connection -> Record params -> Q tables result params stage -> Aff (Array (Record result))

#runQueryOne Source

runQueryOne :: forall tables result params paramsRL stage. RowToList params paramsRL => ParamsToArray paramsRL params => ReadForeign (Record result) => Connection -> Record params -> Q tables result params stage -> Aff (Maybe (Record result))

#runExecute Source

runExecute :: forall tables params paramsRL stage. RowToList params paramsRL => ParamsToArray paramsRL params => Connection -> Record params -> Q tables () params stage -> Aff Int

#runQueryTx Source

runQueryTx :: forall tables result params paramsRL stage. RowToList params paramsRL => ParamsToArray paramsRL params => ReadForeign (Record result) => Transaction -> Record params -> Q tables result params stage -> Aff (Array (Record result))

#runExecuteTx Source

runExecuteTx :: forall tables params paramsRL stage. RowToList params paramsRL => ParamsToArray paramsRL params => Transaction -> Record params -> Q tables () params stage -> Aff Int