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
(IsSymbol name, RowToList cols rl, RenderColumnsRL rl) => CreateTableDDL (Table name cols)(IsSymbol name, RowToList cols rl, InsertColumnsRL rl) => InsertSQLFor (Table name cols)(IsSymbol name) => SelectAllSQLFor (Table name cols)(IsSymbol name, RowToList whereRow whereRL, WhereClauseRL whereRL) => SelectWhereSQLFor (Table name cols) whereRow(IsSymbol name, RowToList setRow setRL, RowToList whereRow whereRL, WhereClauseRL setRL, WhereClauseRL whereRL, ColumnCountRL setRL) => UpdateSQLFor (Table name cols) setRow whereRow(IsSymbol name, RowToList whereRow whereRL, WhereClauseRL whereRL) => DeleteSQLFor (Table name cols) whereRow
#PrimaryKey Source
data PrimaryKey aInstances
(ExtractType a typ) => ExtractType (PrimaryKey a) typ(RenderConstraint a) => RenderConstraint (PrimaryKey a)(IsAutoGenerated a) => IsAutoGenerated (PrimaryKey a)(IsAutoGeneratedTC a result) => IsAutoGeneratedTC (PrimaryKey a) result
#AutoIncrement Source
data AutoIncrement aInstances
(ExtractType a typ) => ExtractType (AutoIncrement a) typ(RenderConstraint a) => RenderConstraint (AutoIncrement a)IsAutoGenerated (AutoIncrement a)IsAutoGeneratedTC (AutoIncrement a) True
#Unique Source
data Unique aInstances
(ExtractType a typ) => ExtractType (Unique a) typ(RenderConstraint a) => RenderConstraint (Unique a)(IsAutoGenerated a) => IsAutoGenerated (Unique a)(IsAutoGeneratedTC a result) => IsAutoGeneratedTC (Unique a) result
#Default Source
data Default :: forall k. k -> Type -> Typedata Default val a
Instances
(ExtractType a typ) => ExtractType (Default val a) typ(RenderDefaultValue val a, RenderConstraint a) => RenderConstraint (Default val a)IsAutoGenerated (Default v a)IsAutoGeneratedTC (Default s a) True
#References Source
data ReferencesInstances
(IsSymbol table, IsSymbol col, RenderConstraint a) => RenderConstraint (ForeignKey table References col a)
#ForeignKey Source
data ForeignKey :: Symbol -> Type -> Symbol -> Type -> Typedata ForeignKey table references col a
Instances
(ExtractType a typ) => ExtractType (ForeignKey t r c a) typ(IsSymbol table, IsSymbol col, RenderConstraint a) => RenderConstraint (ForeignKey table References col a)(IsAutoGenerated a) => IsAutoGenerated (ForeignKey t r c a)(IsAutoGeneratedTC a result) => IsAutoGeneratedTC (ForeignKey t r c a) result
#DefaultExpr Source
data DefaultExpr :: Symbol -> Type -> Typedata DefaultExpr expr a
Instances
(ExtractType a typ) => ExtractType (DefaultExpr expr a) typ(IsSymbol expr, RenderConstraint a) => RenderConstraint (DefaultExpr expr a)IsAutoGenerated (DefaultExpr expr a)IsAutoGeneratedTC (DefaultExpr expr a) True
#Nullable Source
data Nullable aInstances
(ExtractType a typ) => ExtractType (Nullable a) (Maybe typ)(RenderConstraint a) => RenderConstraint (Nullable a)(IsAutoGenerated a) => IsAutoGenerated (Nullable a)(IsAutoGeneratedTC a result) => IsAutoGeneratedTC (Nullable a) result(MakeNullableRL tail out') => MakeNullableDecide typ name entry tail (Cons name (Nullable entry) out')
#IsNullable Source
class IsNullable :: forall k. k -> Constraintclass IsNullable a where
Members
isNullable :: Proxy a -> Boolean
Instances
IsNullable (Maybe a)IsNullable a
#ExtractType Source
class ExtractType wrapped typ | wrapped -> typInstances
(ExtractType a typ) => ExtractType (PrimaryKey a) typ(ExtractType a typ) => ExtractType (AutoIncrement a) typ(ExtractType a typ) => ExtractType (Unique a) typ(ExtractType a typ) => ExtractType (Default val a) typ(ExtractType a typ) => ExtractType (DefaultExpr expr a) typ(ExtractType a typ) => ExtractType (ForeignKey t r c a) typ(ExtractType a typ) => ExtractType (Nullable a) (Maybe typ)ExtractType a a
#PGTypeName Source
class PGTypeName :: forall k. k -> Constraintclass PGTypeName a where
Members
pgTypeName :: Proxy a -> String
Instances
#RenderDefaultValue Source
class RenderDefaultValue :: forall k1 k2. k1 -> k2 -> Constraintclass RenderDefaultValue val typ where
Members
renderDefaultValue :: Proxy val -> Proxy typ -> String
Instances
(Reflectable sym String) => RenderDefaultValue sym String(Reflectable val Int) => RenderDefaultValue val Int(Reflectable val Boolean) => RenderDefaultValue val Boolean
#RenderConstraint Source
class RenderConstraint :: forall k. k -> Constraintclass RenderConstraint a where
Members
renderConstraint :: Proxy a -> String
Instances
(RenderConstraint a) => RenderConstraint (PrimaryKey a)(RenderConstraint a) => RenderConstraint (AutoIncrement a)(RenderConstraint a) => RenderConstraint (Unique a)(RenderDefaultValue val a, RenderConstraint a) => RenderConstraint (Default val a)(IsSymbol expr, RenderConstraint a) => RenderConstraint (DefaultExpr expr a)(IsSymbol table, IsSymbol col, RenderConstraint a) => RenderConstraint (ForeignKey table References col a)(RenderConstraint a) => RenderConstraint (Nullable a)RenderConstraint a
#CreateTableDDL Source
class CreateTableDDL :: forall k. k -> Constraintclass CreateTableDDL a where
Members
Instances
(IsSymbol name, RowToList cols rl, RenderColumnsRL rl) => CreateTableDDL (Table name cols)
#RenderColumnsRL Source
class RenderColumnsRL :: RowList Type -> Constraintclass RenderColumnsRL rl where
Members
renderColumnsRL :: Proxy rl -> Array String
Instances
RenderColumnsRL Nil(IsSymbol name, ExtractType entry typ, PGTypeName typ, IsNullable typ, RenderConstraint entry, RenderColumnsRL tail) => RenderColumnsRL (Cons name entry tail)
#IsAutoGenerated Source
class IsAutoGenerated :: forall k. k -> Constraintclass IsAutoGenerated a where
Members
isAutoGenerated :: Proxy a -> Boolean
Instances
IsAutoGenerated (AutoIncrement a)IsAutoGenerated (Default v a)IsAutoGenerated (DefaultExpr expr a)(IsAutoGenerated a) => IsAutoGenerated (PrimaryKey a)(IsAutoGenerated a) => IsAutoGenerated (Unique a)(IsAutoGenerated a) => IsAutoGenerated (ForeignKey t r c a)(IsAutoGenerated a) => IsAutoGenerated (Nullable a)IsAutoGenerated a
#InsertColumnsRL Source
class InsertColumnsRL :: RowList Type -> Constraintclass InsertColumnsRL rl where
Members
insertColumnsRL :: Proxy rl -> Array String
Instances
InsertColumnsRL Nil(IsSymbol name, IsAutoGenerated entry, InsertColumnsRL tail) => InsertColumnsRL (Cons name entry tail)
#InsertSQLFor Source
class InsertSQLFor :: forall k. k -> Constraintclass InsertSQLFor a where
Members
Instances
(IsSymbol name, RowToList cols rl, InsertColumnsRL rl) => InsertSQLFor (Table name cols)
#SelectAllSQLFor Source
class SelectAllSQLFor :: forall k. k -> Constraintclass SelectAllSQLFor a where
Members
Instances
(IsSymbol name) => SelectAllSQLFor (Table name cols)
#WhereClauseRL Source
class WhereClauseRL :: RowList Type -> Constraintclass WhereClauseRL rl where
Members
whereClauseRL :: Proxy rl -> Int -> Array String
Instances
WhereClauseRL Nil(IsSymbol name, WhereClauseRL tail) => WhereClauseRL (Cons name typ tail)
#SelectWhereSQLFor Source
class SelectWhereSQLFor :: forall k1 k2. k1 -> k2 -> Constraintclass SelectWhereSQLFor a whereRow where
Members
Instances
(IsSymbol name, RowToList whereRow whereRL, WhereClauseRL whereRL) => SelectWhereSQLFor (Table name cols) whereRow
#ColumnCountRL Source
class ColumnCountRL :: RowList Type -> Constraintclass ColumnCountRL rl where
Members
columnCountRL :: Proxy rl -> Int
Instances
ColumnCountRL Nil(ColumnCountRL tail) => ColumnCountRL (Cons name typ tail)
#UpdateSQLFor Source
class UpdateSQLFor :: forall k1 k2 k3. k1 -> k2 -> k3 -> Constraintclass UpdateSQLFor table setRow whereRow where
Members
Instances
(IsSymbol name, RowToList setRow setRL, RowToList whereRow whereRL, WhereClauseRL setRL, WhereClauseRL whereRL, ColumnCountRL setRL) => UpdateSQLFor (Table name cols) setRow whereRow
#DeleteSQLFor Source
class DeleteSQLFor :: forall k1 k2. k1 -> k2 -> Constraintclass DeleteSQLFor table whereRow where
Members
Instances
(IsSymbol name, RowToList whereRow whereRL, WhereClauseRL whereRL) => DeleteSQLFor (Table name cols) whereRow
#SkipSpaces Source
class SkipSpaces :: Symbol -> Symbol -> Constraintclass SkipSpaces sym result | sym -> result
Instances
SkipSpaces "" ""(Cons head tail sym, SkipSpacesGo head tail result) => SkipSpaces sym result
#SkipSpacesGo Source
class SkipSpacesGo :: Symbol -> Symbol -> Symbol -> Constraintclass SkipSpacesGo head tail result | head tail -> result
Instances
(SkipSpaces tail result) => SkipSpacesGo " " tail result(Cons head tail result) => SkipSpacesGo head tail result
#SkipStringLiteral Source
class SkipStringLiteral :: Symbol -> Symbol -> Constraintclass SkipStringLiteral sym rest | sym -> rest
Instances
(Fail (Text "Unclosed string literal")) => SkipStringLiteral "" rest(Cons h t sym, SkipStringLiteralGo h t rest) => SkipStringLiteral sym rest
#SkipStringLiteralGo Source
class SkipStringLiteralGo :: Symbol -> Symbol -> Symbol -> Constraintclass SkipStringLiteralGo head tail rest | head tail -> rest
Instances
SkipStringLiteralGo "\'" tail tail(Fail (Text "Unclosed string literal")) => SkipStringLiteralGo h "" rest(Cons nextH nextT tail, SkipStringLiteralGo nextH nextT rest) => SkipStringLiteralGo h tail rest
#ExtractWord Source
class ExtractWord :: Symbol -> Symbol -> Symbol -> Constraintclass ExtractWord sym word rest | sym -> word rest
Instances
ExtractWord "" "" ""(Cons h t sym, ExtractWordGo h t "" word rest) => ExtractWord sym word rest
#ExtractWordGo Source
class ExtractWordGo :: Symbol -> Symbol -> Symbol -> Symbol -> Symbol -> Constraintclass ExtractWordGo head tail acc word rest | head tail acc -> word rest
Instances
(SkipSpaces tail rest) => ExtractWordGo " " tail acc acc rest(Cons "," tail rest) => ExtractWordGo "," tail acc acc rest(Append acc h word) => ExtractWordGo h "" acc word ""(Append acc h acc', Cons nextH nextT tail, ExtractWordGo nextH nextT acc' word rest) => ExtractWordGo h tail acc word rest
#StripColumnsRL Source
class StripColumnsRL :: RowList Type -> RowList Type -> Constraintclass StripColumnsRL rl out | rl -> out
Instances
StripColumnsRL Nil Nil(ExtractType entry typ, StripColumnsRL tail out') => StripColumnsRL (Cons name entry tail) (Cons name typ out')
#StripColumns Source
class StripColumns :: Row Type -> Row Type -> Constraintclass StripColumns cols result | cols -> result
Instances
(RowToList cols rl, StripColumnsRL rl outRL, ListToRow outRL result) => StripColumns cols result
#SingleTable Source
class SingleTable :: Row (Row Type) -> Symbol -> Row Type -> Constraintclass SingleTable tables name cols | tables -> name cols
Instances
(RowToList tables (Cons name cols Nil), IsSymbol name) => SingleTable tables name cols
#SplitOnDot Source
class SplitOnDot :: Symbol -> Boolean -> Symbol -> Symbol -> Constraintclass SplitOnDot sym hasDot table col | sym -> hasDot table col
Instances
(Cons h t sym, SplitOnDotGo h t "" hasDot table col) => SplitOnDot sym hasDot table col
#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
SplitOnDotGo "." tail acc True acc tail(Append acc h col) => SplitOnDotGo h "" acc False "" col(Append acc h acc', Cons nextH nextT tail, SplitOnDotGo nextH nextT acc' hasDot table col) => SplitOnDotGo h tail acc hasDot table col
#ResolveColumn Source
class ResolveColumn :: Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveColumn word tables typ | word tables -> typ
Instances
(SplitOnDot word hasDot table col, ResolveColumnBranch hasDot table col tables typ) => ResolveColumn word tables typ
#ResolveColumnBranch Source
class ResolveColumnBranch :: Boolean -> Symbol -> Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveColumnBranch hasDot table col tables typ | hasDot table col tables -> typ
Instances
(Cons table tableCols restTables tables, Cons col typ restCols tableCols) => ResolveColumnBranch True table col tables typ(RowToList tables tablesRL, FindUnqualifiedColumn col tablesRL typ) => ResolveColumnBranch False table col tables typ
#FindUnqualifiedColumn Source
class FindUnqualifiedColumn :: Symbol -> RowList (Row Type) -> Type -> Constraintclass FindUnqualifiedColumn col tablesRL typ | col tablesRL -> typ
Instances
(Fail (Beside (Text "Column ") (Beside (Quote col) (Text " not found in any table")))) => FindUnqualifiedColumn col Nil typ(RowToList tableCols colsRL, HasColumnRL col colsRL found, FindUnqualifiedColumnDecide found col tableName tableCols tailTables typ) => FindUnqualifiedColumn col (Cons tableName tableCols tailTables) typ
#HasColumnRL Source
class HasColumnRL :: Symbol -> RowList Type -> Boolean -> Constraintclass HasColumnRL col rl found | col rl -> found
Instances
HasColumnRL col Nil FalseHasColumnRL col (Cons col typ tail) True(HasColumnRL col tail found) => HasColumnRL col (Cons name typ tail) found
#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
(Cons col typ restCols tableCols, AssertNotInRemainingTables col restTables) => FindUnqualifiedColumnDecide True col tableName tableCols restTables typ(FindUnqualifiedColumn col restTables typ) => FindUnqualifiedColumnDecide False col tableName tableCols restTables typ
#AssertNotInRemainingTables Source
class AssertNotInRemainingTables :: Symbol -> RowList (Row Type) -> Constraintclass AssertNotInRemainingTables col tablesRL
Instances
AssertNotInRemainingTables col Nil(RowToList tableCols colsRL, HasColumnRL col colsRL found, AssertNotAmbiguous found col tableName, AssertNotInRemainingTables col tail) => AssertNotInRemainingTables col (Cons tableName tableCols tail)
#AssertNotAmbiguous Source
class AssertNotAmbiguous :: Boolean -> Symbol -> Symbol -> Constraintclass AssertNotAmbiguous found col tableName
Instances
AssertNotAmbiguous False col tableName(Fail (Beside (Text "Column ") (Beside (Quote col) (Text " is ambiguous - qualify with table name")))) => AssertNotAmbiguous True col tableName
#ParseSelect Source
class ParseSelect :: Symbol -> Row (Row Type) -> Row Type -> Constraintclass ParseSelect sym tables result | sym tables -> result
Instances
ParseSelect "" tables ()(Cons h t sym, ParseSelectGo h t "" tables Nil outRL, ListToRow outRL result) => ParseSelect sym tables result
#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
(Fail (Text "Unexpected comma in SELECT clause (missing column name)")) => ParseSelectGo "," tail "" tables accRL outRL(ResolveColumn acc tables entry, ExtractType entry typ, SplitOnDot acc _hasDot _table colName, SkipSpaces tail rest, ParseSelectContinue rest tables (Cons colName typ accRL) outRL) => ParseSelectGo "," tail acc tables accRL outRL(SkipSpaces tail rest, ParseSelectAfterCol acc rest tables accRL outRL) => ParseSelectGo " " tail acc tables accRL outRL(ExtractUntilParen tail args afterParen, ResolveAggregateArg args tables argType, AggregateReturnType acc argType returnType, SkipSpaces afterParen rest, ParseAfterAggregate rest tables returnType accRL outRL) => ParseSelectGo "(" tail acc tables accRL outRL(Append acc h acc', ResolveColumn acc' tables entry, ExtractType entry typ, SplitOnDot acc' _hasDot _table colName) => ParseSelectGo h "" acc tables accRL (Cons colName typ accRL)(Append acc h acc', Cons nextH nextT tail, ParseSelectGo nextH nextT acc' tables accRL outRL) => ParseSelectGo h tail acc tables accRL outRL
#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
(ResolveColumn colRef tables entry, ExtractType entry typ, SplitOnDot colRef _hasDot _table colName) => ParseSelectAfterCol colRef "" tables accRL (Cons colName typ accRL)(Cons h t rest, ParseSelectAfterColByHead h t colRef tables accRL outRL) => ParseSelectAfterCol colRef rest tables accRL outRL
#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
(ResolveColumn colRef tables entry, ExtractType entry typ, SplitOnDot colRef _hasDot _table colName, SkipSpaces tail rest, ParseSelectContinue rest tables (Cons colName typ accRL) outRL) => ParseSelectAfterColByHead "," tail colRef tables accRL outRL(Append h t rest, ExtractWord rest keyword afterKeyword, ParseSelectHandleAS keyword afterKeyword colRef tables accRL outRL) => ParseSelectAfterColByHead h t colRef tables accRL outRL
#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
(ExtractWord afterKeyword alias afterAlias, ResolveColumn colRef tables entry, ExtractType entry typ, SkipSpaces afterAlias rest, ParseSelectExpectEnd rest tables (Cons alias typ accRL) outRL) => ParseSelectHandleAS "AS" afterKeyword colRef tables accRL outRL(ExtractWord afterKeyword alias afterAlias, ResolveColumn colRef tables entry, ExtractType entry typ, SkipSpaces afterAlias rest, ParseSelectExpectEnd rest tables (Cons alias typ accRL) outRL) => ParseSelectHandleAS "as" afterKeyword colRef tables accRL outRL
#ParseSelectExpectEnd Source
class ParseSelectExpectEnd :: Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectExpectEnd sym tables accRL outRL | sym tables accRL -> outRL
Instances
ParseSelectExpectEnd "" tables accRL accRL(Cons h t sym, ParseSelectExpectEndByHead h t tables accRL outRL) => ParseSelectExpectEnd sym tables accRL outRL
#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
(SkipSpaces tail rest, ParseSelectContinue rest tables accRL outRL) => ParseSelectExpectEndByHead "," tail tables accRL outRL
#ParseSelectContinue Source
class ParseSelectContinue :: Symbol -> Row (Row Type) -> RowList Type -> RowList Type -> Constraintclass ParseSelectContinue sym tables accRL outRL | sym tables accRL -> outRL
Instances
(Fail (Text "Trailing comma in SELECT clause")) => ParseSelectContinue "" tables accRL outRL(Cons h t sym, ParseSelectGo h t "" tables accRL outRL) => ParseSelectContinue sym tables accRL outRL
#ExtractUntilParen Source
class ExtractUntilParen :: Symbol -> Symbol -> Symbol -> Constraintclass ExtractUntilParen tail args afterParen | tail -> args afterParen
Instances
(Fail (Text "Unclosed parenthesis in SELECT clause")) => ExtractUntilParen "" args afterParen(Cons h t tail, ExtractUntilParenGo h t "" Z args afterParen) => ExtractUntilParen tail args afterParen
#S Source
data S nInstances
(Append acc ")" acc', Cons nextH nextT tail, ExtractUntilParenGo nextH nextT acc' n args afterParen) => ExtractUntilParenGo ")" tail acc (S n) args afterParen
#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
ExtractUntilParenGo ")" tail acc Z acc tail(Append acc ")" acc', Cons nextH nextT tail, ExtractUntilParenGo nextH nextT acc' n args afterParen) => ExtractUntilParenGo ")" tail acc (S n) args afterParen(Append acc "(" acc', Cons nextH nextT tail, ExtractUntilParenGo nextH nextT acc' (S depth) args afterParen) => ExtractUntilParenGo "(" tail acc depth args afterParen(Fail (Text "Unclosed parenthesis in SELECT clause")) => ExtractUntilParenGo h "" acc depth args afterParen(Append acc h acc', Cons nextH nextT tail, ExtractUntilParenGo nextH nextT acc' depth args afterParen) => ExtractUntilParenGo h tail acc depth args afterParen
#Star Source
data StarInstances
ResolveAggregateArg "*" tables StarResolveAggregateArg "" tables StarResolveAggregateArgCol "*" tables StarResolveAggregateArgColByHead "0" col tables StarResolveAggregateArgColByHead "1" col tables StarResolveAggregateArgColByHead "2" col tables StarResolveAggregateArgColByHead "3" col tables StarResolveAggregateArgColByHead "4" col tables StarResolveAggregateArgColByHead "5" col tables StarResolveAggregateArgColByHead "6" col tables StarResolveAggregateArgColByHead "7" col tables StarResolveAggregateArgColByHead "8" col tables StarResolveAggregateArgColByHead "9" col tables Star
#ResolveAggregateArg Source
class ResolveAggregateArg :: Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveAggregateArg args tables argType | args tables -> argType
Instances
ResolveAggregateArg "*" tables StarResolveAggregateArg "" tables Star(SkipSpaces args trimmedFront, ExtractWord trimmedFront col _rest, ResolveAggregateArgCol col tables argType) => ResolveAggregateArg args tables argType
#ResolveAggregateArgCol Source
class ResolveAggregateArgCol :: Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveAggregateArgCol col tables argType | col tables -> argType
Instances
ResolveAggregateArgCol "*" tables Star(Cons h _t col, ResolveAggregateArgColByHead h col tables argType) => ResolveAggregateArgCol col tables argType
#ResolveAggregateArgColByHead Source
class ResolveAggregateArgColByHead :: Symbol -> Symbol -> Row (Row Type) -> Type -> Constraintclass ResolveAggregateArgColByHead head col tables argType | head col tables -> argType
Instances
ResolveAggregateArgColByHead "0" col tables StarResolveAggregateArgColByHead "1" col tables StarResolveAggregateArgColByHead "2" col tables StarResolveAggregateArgColByHead "3" col tables StarResolveAggregateArgColByHead "4" col tables StarResolveAggregateArgColByHead "5" col tables StarResolveAggregateArgColByHead "6" col tables StarResolveAggregateArgColByHead "7" col tables StarResolveAggregateArgColByHead "8" col tables StarResolveAggregateArgColByHead "9" col tables Star(ResolveColumn col tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => ResolveAggregateArgColByHead head col tables unwrapped
#AggregateReturnType Source
class AggregateReturnType :: Symbol -> Type -> Type -> Constraintclass AggregateReturnType funcName argType returnType | funcName argType -> returnType
Instances
(Cons head rest funcName, AggregateReturnTypeByHead head funcName argType returnType) => AggregateReturnType funcName argType returnType
#AggregateReturnTypeByHead Source
class AggregateReturnTypeByHead :: Symbol -> Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeByHead head funcName argType returnType | head funcName argType -> returnType
Instances
(AggregateReturnTypeA funcName argType returnType) => AggregateReturnTypeByHead "A" funcName argType returnType(AggregateReturnTypeA funcName argType returnType) => AggregateReturnTypeByHead "a" funcName argType returnType(AggregateReturnTypeC funcName argType returnType) => AggregateReturnTypeByHead "C" funcName argType returnType(AggregateReturnTypeC funcName argType returnType) => AggregateReturnTypeByHead "c" funcName argType returnType(AggregateReturnTypeD funcName argType returnType) => AggregateReturnTypeByHead "D" funcName argType returnType(AggregateReturnTypeD funcName argType returnType) => AggregateReturnTypeByHead "d" funcName argType returnType(AggregateReturnTypeF funcName argType returnType) => AggregateReturnTypeByHead "F" funcName argType returnType(AggregateReturnTypeF funcName argType returnType) => AggregateReturnTypeByHead "f" funcName argType returnType(AggregateReturnTypeL funcName argType returnType) => AggregateReturnTypeByHead "L" funcName argType returnType(AggregateReturnTypeL funcName argType returnType) => AggregateReturnTypeByHead "l" funcName argType returnType(AggregateReturnTypeM funcName argType returnType) => AggregateReturnTypeByHead "M" funcName argType returnType(AggregateReturnTypeM funcName argType returnType) => AggregateReturnTypeByHead "m" funcName argType returnType(AggregateReturnTypeN funcName argType returnType) => AggregateReturnTypeByHead "N" funcName argType returnType(AggregateReturnTypeN funcName argType returnType) => AggregateReturnTypeByHead "n" funcName argType returnType(AggregateReturnTypeR funcName argType returnType) => AggregateReturnTypeByHead "R" funcName argType returnType(AggregateReturnTypeR funcName argType returnType) => AggregateReturnTypeByHead "r" funcName argType returnType(AggregateReturnTypeS funcName argType returnType) => AggregateReturnTypeByHead "S" funcName argType returnType(AggregateReturnTypeS funcName argType returnType) => AggregateReturnTypeByHead "s" funcName argType returnType(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeByHead head funcName argType returnType
#AggregateReturnTypeA Source
class AggregateReturnTypeA :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeA funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeA "AVG" argType NumberAggregateReturnTypeA "avg" argType NumberAggregateReturnTypeA "ARRAY_AGG" argType (Array argType)AggregateReturnTypeA "array_agg" argType (Array argType)(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeA funcName argType returnType
#AggregateReturnTypeC Source
class AggregateReturnTypeC :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeC funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeC "COUNT" argType BigIntAggregateReturnTypeC "count" argType BigIntAggregateReturnTypeC "COALESCE" argType argTypeAggregateReturnTypeC "coalesce" argType argType(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeC funcName argType returnType
#AggregateReturnTypeD Source
class AggregateReturnTypeD :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeD funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeD "DENSE_RANK" argType IntAggregateReturnTypeD "dense_rank" argType Int(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeD funcName argType returnType
#AggregateReturnTypeF Source
class AggregateReturnTypeF :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeF funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeF "FIRST_VALUE" argType argTypeAggregateReturnTypeF "first_value" argType argType(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeF funcName argType returnType
#AggregateReturnTypeL Source
class AggregateReturnTypeL :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeL funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeL "LAG" argType argTypeAggregateReturnTypeL "lag" argType argTypeAggregateReturnTypeL "LEAD" argType argTypeAggregateReturnTypeL "lead" argType argTypeAggregateReturnTypeL "LAST_VALUE" argType argTypeAggregateReturnTypeL "last_value" argType argType(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeL funcName argType returnType
#AggregateReturnTypeM Source
class AggregateReturnTypeM :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeM funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeM "MIN" argType argTypeAggregateReturnTypeM "min" argType argTypeAggregateReturnTypeM "MAX" argType argTypeAggregateReturnTypeM "max" argType argType(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeM funcName argType returnType
#AggregateReturnTypeN Source
class AggregateReturnTypeN :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeN funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeN "NTILE" argType IntAggregateReturnTypeN "ntile" argType IntAggregateReturnTypeN "NTH_VALUE" argType argTypeAggregateReturnTypeN "nth_value" argType argType(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeN funcName argType returnType
#AggregateReturnTypeR Source
class AggregateReturnTypeR :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeR funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeR "ROW_NUMBER" argType IntAggregateReturnTypeR "row_number" argType IntAggregateReturnTypeR "RANK" argType IntAggregateReturnTypeR "rank" argType Int(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeR funcName argType returnType
#AggregateReturnTypeS Source
class AggregateReturnTypeS :: Symbol -> Type -> Type -> Constraintclass AggregateReturnTypeS funcName argType returnType | funcName argType -> returnType
Instances
AggregateReturnTypeS "SUM" argType argTypeAggregateReturnTypeS "sum" argType argTypeAggregateReturnTypeS "STRING_AGG" argType StringAggregateReturnTypeS "string_agg" argType String(Fail (Beside (Text "Unknown function: ") (Quote funcName))) => AggregateReturnTypeS funcName argType returnType
#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
(Fail (Text "Aggregate function requires AS alias (e.g. COUNT(*) AS cnt)")) => ParseAfterAggregate "" tables returnType accRL outRL(Cons h t rest, ParseAfterAggregateByHead h t tables returnType accRL outRL) => ParseAfterAggregate rest tables returnType accRL outRL
#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
(Fail (Text "Aggregate function requires AS alias (e.g. COUNT(*) AS cnt)")) => ParseAfterAggregateByHead "," tail tables returnType accRL outRL(Append h t rest, ExtractWord rest keyword afterKeyword, ParseAfterAggregateKeyword keyword afterKeyword tables returnType accRL outRL) => ParseAfterAggregateByHead h t tables returnType accRL outRL
#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
(SkipSpaces afterKeyword rest, ParseOverClause rest tables returnType accRL outRL) => ParseAfterAggregateKeyword "OVER" afterKeyword tables returnType accRL outRL(SkipSpaces afterKeyword rest, ParseOverClause rest tables returnType accRL outRL) => ParseAfterAggregateKeyword "over" afterKeyword tables returnType accRL outRL(ExtractWord afterKeyword alias afterAlias, SkipSpaces afterAlias rest, ParseSelectExpectEnd rest tables (Cons alias returnType accRL) outRL) => ParseAfterAggregateKeyword "AS" afterKeyword tables returnType accRL outRL(ExtractWord afterKeyword alias afterAlias, SkipSpaces afterAlias rest, ParseSelectExpectEnd rest tables (Cons alias returnType accRL) outRL) => ParseAfterAggregateKeyword "as" afterKeyword tables returnType accRL outRL(Fail (Text "Aggregate function requires AS alias (e.g. COUNT(*) AS cnt)")) => ParseAfterAggregateKeyword keyword afterKeyword tables returnType accRL outRL
#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
(Fail (Text "Expected ( after OVER")) => ParseOverClause "" tables returnType accRL outRL(Cons h t rest, ParseOverClauseByHead h t tables returnType accRL outRL) => ParseOverClause rest tables returnType accRL outRL
#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
(ExtractUntilParen tail overContent afterParen, ValidateOverContent overContent tables, SkipSpaces afterParen rest, ParseAfterAggregate rest tables returnType accRL outRL) => ParseOverClauseByHead "(" tail tables returnType accRL outRL(Fail (Text "Expected ( after OVER")) => ParseOverClauseByHead h t tables returnType accRL outRL
#ValidateOverContent Source
class ValidateOverContent :: Symbol -> Row (Row Type) -> Constraintclass ValidateOverContent content tables
Instances
ValidateOverContent "" tables(SkipSpaces content content', ValidateOverContentTrimmed content' tables) => ValidateOverContent content tables
#ValidateOverContentTrimmed Source
class ValidateOverContentTrimmed :: Symbol -> Row (Row Type) -> Constraintclass ValidateOverContentTrimmed content tables
Instances
ValidateOverContentTrimmed "" tables(ExtractWord content keyword rest, ValidateOverKeyword keyword rest tables) => ValidateOverContentTrimmed content tables
#ValidateOverKeyword Source
class ValidateOverKeyword :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateOverKeyword keyword rest tables
Instances
(ExtractWord rest byWord afterBy, AssertIsBy byWord, ValidatePartitionByColumns afterBy tables) => ValidateOverKeyword "PARTITION" rest tables(ExtractWord rest byWord afterBy, AssertIsBy byWord, ValidatePartitionByColumns afterBy tables) => ValidateOverKeyword "partition" rest tables(ExtractWord rest byWord afterBy, AssertIsBy byWord, ValidateOrderBy afterBy tables) => ValidateOverKeyword "ORDER" rest tables(ExtractWord rest byWord afterBy, AssertIsBy byWord, ValidateOrderBy afterBy tables) => ValidateOverKeyword "order" rest tables(Fail (Text "Expected PARTITION BY or ORDER BY inside OVER clause")) => ValidateOverKeyword keyword rest tables
#AssertIsBy Source
class AssertIsBy :: Symbol -> Constraintclass AssertIsBy sym
Instances
AssertIsBy "BY"AssertIsBy "by"(Fail (Text "Expected BY after PARTITION or ORDER")) => AssertIsBy sym
#ValidatePartitionByColumns Source
class ValidatePartitionByColumns :: Symbol -> Row (Row Type) -> Constraintclass ValidatePartitionByColumns sym tables
Instances
ValidatePartitionByColumns "" tables(SkipSpaces sym sym', ValidatePartitionByColumnsTrimmed sym' tables) => ValidatePartitionByColumns sym tables
#ValidatePartitionByColumnsTrimmed Source
class ValidatePartitionByColumnsTrimmed :: Symbol -> Row (Row Type) -> Constraintclass ValidatePartitionByColumnsTrimmed sym tables
Instances
ValidatePartitionByColumnsTrimmed "" tables(Cons h t sym, ValidatePartitionByColumnsGo h t "" tables) => ValidatePartitionByColumnsTrimmed sym tables
#ValidatePartitionByColumnsGo Source
class ValidatePartitionByColumnsGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidatePartitionByColumnsGo head tail acc tables
Instances
(ResolveColumn acc tables typ, SkipSpaces tail rest, ValidatePartitionByColumnsTrimmed rest tables) => ValidatePartitionByColumnsGo "," tail acc tables(SkipSpaces tail rest, FlushPartitionWord acc rest tables) => ValidatePartitionByColumnsGo " " tail acc tables(Append acc h acc', ResolveColumn acc' tables typ) => ValidatePartitionByColumnsGo h "" acc tables(Append acc h acc', Cons nextH nextT tail, ValidatePartitionByColumnsGo nextH nextT acc' tables) => ValidatePartitionByColumnsGo h tail acc tables
#FlushPartitionWord Source
class FlushPartitionWord :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass FlushPartitionWord word rest tables
Instances
(ExtractWord rest byWord afterBy, AssertIsBy byWord, ValidateOrderBy afterBy tables) => FlushPartitionWord "ORDER" rest tables(ExtractWord rest byWord afterBy, AssertIsBy byWord, ValidateOrderBy afterBy tables) => FlushPartitionWord "order" rest tables(ResolveColumn word tables typ, ValidatePartitionByColumnsTrimmed rest tables) => FlushPartitionWord word rest tables
#ParseWhere Source
class ParseWhere :: Symbol -> Row (Row Type) -> Row Type -> Constraintclass ParseWhere sym tables params | sym tables -> params
Instances
(Fail (Text "Empty WHERE clause")) => ParseWhere "" tables params(Cons h t sym, ParseWhereGo h t "" NoType tables Nil outRL, ListToRow outRL params) => ParseWhere sym tables params
#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
(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', SkipSpaces tail rest, ParseWhereContinue rest currentType' tables paramsOut' paramsOut) => ParseWhereGo " " tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "=" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo ">" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "<" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "!" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "(" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo ")" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', SkipStringLiteral tail rest, ParseWhereContinue rest currentType' tables paramsOut' paramsOut) => ParseWhereGo "\'" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "@" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "?" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo ":" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "~" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "#" tail acc currentType tables paramsIn paramsOut(FlushWhereWord acc currentType tables paramsIn currentType' paramsOut', ParseWhereContinue tail currentType' tables paramsOut' paramsOut) => ParseWhereGo "," tail acc currentType tables paramsIn paramsOut(Append acc h acc', FlushWhereWord acc' currentType tables paramsIn _ct paramsOut) => ParseWhereGo h "" acc currentType tables paramsIn paramsOut(Append acc h acc', Cons nextH nextT tail, ParseWhereGo nextH nextT acc' currentType tables paramsIn paramsOut) => ParseWhereGo h tail acc currentType tables paramsIn paramsOut
#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
ParseWhereContinue "" currentType tables paramsIn paramsIn(Cons h t sym, ParseWhereGo h t "" currentType tables paramsIn paramsOut) => ParseWhereContinue sym currentType tables paramsIn paramsOut
#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
FlushWhereWord "" currentType tables paramsIn currentType paramsInFlushWhereWord "AND" currentType tables paramsIn currentType paramsInFlushWhereWord "and" currentType tables paramsIn currentType paramsInFlushWhereWord "OR" currentType tables paramsIn currentType paramsInFlushWhereWord "or" currentType tables paramsIn currentType paramsInFlushWhereWord "NOT" currentType tables paramsIn currentType paramsInFlushWhereWord "not" currentType tables paramsIn currentType paramsInFlushWhereWord "IS" currentType tables paramsIn currentType paramsInFlushWhereWord "is" currentType tables paramsIn currentType paramsInFlushWhereWord "NULL" currentType tables paramsIn currentType paramsInFlushWhereWord "null" currentType tables paramsIn currentType paramsIn(Cons head rest word, FlushWhereWordByHead head word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWord word currentType tables paramsIn currentTypeOut paramsOut
#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
(Cons "$" paramName word) => FlushWhereWordByHead "$" word currentType tables paramsIn currentType (Cons paramName currentType paramsIn)FlushWhereWordByHead "0" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "1" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "2" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "3" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "4" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "5" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "6" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "7" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "8" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "9" word currentType tables paramsIn currentType paramsInFlushWhereWordByHead "*" word currentType tables paramsIn currentType paramsIn(FlushWhereWordA word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "A" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordA word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "a" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordB word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "B" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordB word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "b" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordC word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "C" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordC word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "c" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordD word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "D" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordD word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "d" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordE word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "E" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordE word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "e" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordF word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "F" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordF word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "f" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordI word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "I" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordI word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "i" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordJ word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "J" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordJ word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "j" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordL word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "L" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordL word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "l" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordM word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "M" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordM word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "m" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordN word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "N" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordN word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "n" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordS word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "S" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordS word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "s" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordT word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "T" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordT word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "t" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordU word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "U" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordU word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "u" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordV word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "V" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordV word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "v" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordP word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "P" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordP word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "p" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordR word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "R" word currentType tables paramsIn currentTypeOut paramsOut(FlushWhereWordR word currentType tables paramsIn currentTypeOut paramsOut) => FlushWhereWordByHead "r" word currentType tables paramsIn currentTypeOut paramsOut(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordByHead head word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordA "ABS" currentType tables paramsIn currentType paramsInFlushWhereWordA "abs" currentType tables paramsIn currentType paramsInFlushWhereWordA "ANY" currentType tables paramsIn (Array currentType) paramsInFlushWhereWordA "any" currentType tables paramsIn (Array currentType) paramsInFlushWhereWordA "ALL" currentType tables paramsIn (Array currentType) paramsInFlushWhereWordA "all" currentType tables paramsIn (Array currentType) paramsInFlushWhereWordA "AS" currentType tables paramsIn currentType paramsInFlushWhereWordA "as" currentType tables paramsIn currentType paramsInFlushWhereWordA "AVG" currentType tables paramsIn Number paramsInFlushWhereWordA "avg" currentType tables paramsIn Number paramsInFlushWhereWordA "ARRAY_AGG" currentType tables paramsIn currentType paramsInFlushWhereWordA "array_agg" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordA word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordB "BETWEEN" currentType tables paramsIn currentType paramsInFlushWhereWordB "between" currentType tables paramsIn currentType paramsInFlushWhereWordB "bigint" currentType tables paramsIn currentType paramsInFlushWhereWordB "boolean" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordB word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordC "CAST" currentType tables paramsIn currentType paramsInFlushWhereWordC "cast" currentType tables paramsIn currentType paramsInFlushWhereWordC "CEIL" currentType tables paramsIn currentType paramsInFlushWhereWordC "ceil" currentType tables paramsIn currentType paramsInFlushWhereWordC "COALESCE" currentType tables paramsIn currentType paramsInFlushWhereWordC "coalesce" currentType tables paramsIn currentType paramsInFlushWhereWordC "CONCAT" currentType tables paramsIn currentType paramsInFlushWhereWordC "concat" currentType tables paramsIn currentType paramsInFlushWhereWordC "COUNT" currentType tables paramsIn Int paramsInFlushWhereWordC "count" currentType tables paramsIn Int paramsInFlushWhereWordC "CURRENT_DATE" currentType tables paramsIn currentType paramsInFlushWhereWordC "current_date" currentType tables paramsIn currentType paramsInFlushWhereWordC "CURRENT_TIMESTAMP" currentType tables paramsIn currentType paramsInFlushWhereWordC "current_timestamp" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordC word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordD "DATE" currentType tables paramsIn currentType paramsInFlushWhereWordD "date" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordD word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordE "EXISTS" currentType tables paramsIn currentType paramsInFlushWhereWordE "exists" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordE word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordF "FALSE" currentType tables paramsIn currentType paramsInFlushWhereWordF "false" currentType tables paramsIn currentType paramsInFlushWhereWordF "FLOOR" currentType tables paramsIn currentType paramsInFlushWhereWordF "floor" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordF word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordI "IN" currentType tables paramsIn (Array currentType) paramsInFlushWhereWordI "in" currentType tables paramsIn (Array currentType) paramsInFlushWhereWordI "ILIKE" currentType tables paramsIn currentType paramsInFlushWhereWordI "ilike" currentType tables paramsIn currentType paramsInFlushWhereWordI "integer" currentType tables paramsIn currentType paramsInFlushWhereWordI "int" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordI word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordJ "jsonb" currentType tables paramsIn currentType paramsInFlushWhereWordJ "json" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordJ word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordL "LEAST" currentType tables paramsIn currentType paramsInFlushWhereWordL "least" currentType tables paramsIn currentType paramsInFlushWhereWordL "LENGTH" currentType tables paramsIn Int paramsInFlushWhereWordL "length" currentType tables paramsIn Int paramsInFlushWhereWordL "LIKE" currentType tables paramsIn currentType paramsInFlushWhereWordL "like" currentType tables paramsIn currentType paramsInFlushWhereWordL "LOWER" currentType tables paramsIn String paramsInFlushWhereWordL "lower" currentType tables paramsIn String paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordL word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordM "MIN" currentType tables paramsIn currentType paramsInFlushWhereWordM "min" currentType tables paramsIn currentType paramsInFlushWhereWordM "MAX" currentType tables paramsIn currentType paramsInFlushWhereWordM "max" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordM word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordN "NOT" currentType tables paramsIn currentType paramsInFlushWhereWordN "not" currentType tables paramsIn currentType paramsInFlushWhereWordN "NOW" currentType tables paramsIn currentType paramsInFlushWhereWordN "now" currentType tables paramsIn currentType paramsInFlushWhereWordN "NULL" currentType tables paramsIn currentType paramsInFlushWhereWordN "null" currentType tables paramsIn currentType paramsInFlushWhereWordN "NULLIF" currentType tables paramsIn currentType paramsInFlushWhereWordN "nullif" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordN word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordS "SMALLINT" currentType tables paramsIn currentType paramsInFlushWhereWordS "smallint" currentType tables paramsIn currentType paramsInFlushWhereWordS "SUM" currentType tables paramsIn currentType paramsInFlushWhereWordS "sum" currentType tables paramsIn currentType paramsInFlushWhereWordS "STRING_AGG" currentType tables paramsIn String paramsInFlushWhereWordS "string_agg" currentType tables paramsIn String paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordS word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordT "TRIM" currentType tables paramsIn String paramsInFlushWhereWordT "trim" currentType tables paramsIn String paramsInFlushWhereWordT "TRUE" currentType tables paramsIn currentType paramsInFlushWhereWordT "true" currentType tables paramsIn currentType paramsInFlushWhereWordT "text" currentType tables paramsIn currentType paramsInFlushWhereWordT "timestamptz" currentType tables paramsIn currentType paramsInFlushWhereWordT "timestamp" currentType tables paramsIn currentType paramsInFlushWhereWordT "TIME" currentType tables paramsIn currentType paramsInFlushWhereWordT "time" currentType tables paramsIn currentType paramsInFlushWhereWordT "tsvector" currentType tables paramsIn currentType paramsInFlushWhereWordT "TSVECTOR" currentType tables paramsIn currentType paramsInFlushWhereWordT "tsquery" currentType tables paramsIn currentType paramsInFlushWhereWordT "TSQUERY" currentType tables paramsIn currentType paramsInFlushWhereWordT "to_tsvector" currentType tables paramsIn String paramsInFlushWhereWordT "TO_TSVECTOR" currentType tables paramsIn String paramsInFlushWhereWordT "to_tsquery" currentType tables paramsIn String paramsInFlushWhereWordT "TO_TSQUERY" currentType tables paramsIn String paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordT word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordU "UPPER" currentType tables paramsIn String paramsInFlushWhereWordU "upper" currentType tables paramsIn String paramsInFlushWhereWordU "uuid" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordU word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordV "varchar" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordV word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordP "point" currentType tables paramsIn currentType paramsInFlushWhereWordP "POINT" currentType tables paramsIn currentType paramsInFlushWhereWordP "plainto_tsquery" currentType tables paramsIn currentType paramsInFlushWhereWordP "PLAINTO_TSQUERY" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordP word currentType tables paramsIn unwrapped paramsIn
#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
FlushWhereWordR "real" currentType tables paramsIn currentType paramsInFlushWhereWordR "REAL" currentType tables paramsIn currentType paramsIn(ResolveColumn word tables entry, ExtractType entry typ, UnwrapMaybe typ unwrapped) => FlushWhereWordR word currentType tables paramsIn unwrapped paramsIn
#ValidateColumnList Source
class ValidateColumnList :: Symbol -> Row (Row Type) -> Constraintclass ValidateColumnList sym tables
Instances
(Fail (Text "Empty column list")) => ValidateColumnList "" tables(Cons h t sym, ValidateColumnListGo h t "" tables) => ValidateColumnList sym tables
#ValidateColumnListContinue Source
class ValidateColumnListContinue :: Symbol -> Row (Row Type) -> Constraintclass ValidateColumnListContinue sym tables
Instances
ValidateColumnListContinue "" tables(Cons h t sym, ValidateColumnListGo h t "" tables) => ValidateColumnListContinue sym tables
#ValidateColumnListGo Source
class ValidateColumnListGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateColumnListGo head tail acc tables
Instances
(ResolveColumn acc tables typ, SkipSpaces tail rest, ValidateColumnListContinue rest tables) => ValidateColumnListGo "," tail acc tables(SkipSpaces tail rest, ResolveColumn acc tables typ, ValidateColumnListContinue rest tables) => ValidateColumnListGo " " tail acc tables(Append acc h acc', ResolveColumn acc' tables typ) => ValidateColumnListGo h "" acc tables(Append acc h acc', Cons nextH nextT tail, ValidateColumnListGo nextH nextT acc' tables) => ValidateColumnListGo h tail acc tables
#ValidateOrderBy Source
class ValidateOrderBy :: Symbol -> Row (Row Type) -> Constraintclass ValidateOrderBy sym tables
Instances
ValidateOrderBy "" tables(Cons h t sym, ValidateOrderByGo h t "" tables) => ValidateOrderBy sym tables
#ValidateOrderByGo Source
class ValidateOrderByGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateOrderByGo head tail acc tables
Instances
(Fail (Text "Unexpected comma in ORDER BY clause (missing column name)")) => ValidateOrderByGo "," tail "" tables(FlushOrderByWord acc tables, SkipSpaces tail rest, ValidateOrderByContinueNonEmpty rest tables) => ValidateOrderByGo "," tail acc tables(SkipSpaces tail rest, FlushOrderByThenSkip acc rest tables) => ValidateOrderByGo " " tail acc tables(Append acc h acc', FlushOrderByFinalWord acc' tables) => ValidateOrderByGo h "" acc tables(Append acc h acc', Cons nextH nextT tail, ValidateOrderByGo nextH nextT acc' tables) => ValidateOrderByGo h tail acc tables
#ValidateOrderByContinueNonEmpty Source
class ValidateOrderByContinueNonEmpty :: Symbol -> Row (Row Type) -> Constraintclass ValidateOrderByContinueNonEmpty sym tables
Instances
(Fail (Text "Trailing comma in ORDER BY clause")) => ValidateOrderByContinueNonEmpty "" tables(Cons h t sym, ValidateOrderByGo h t "" tables) => ValidateOrderByContinueNonEmpty sym tables
#FlushOrderByFinalWord Source
class FlushOrderByFinalWord :: Symbol -> Row (Row Type) -> Constraintclass FlushOrderByFinalWord word tables
Instances
(Fail (Text "ORDER BY requires at least one column")) => FlushOrderByFinalWord "" tables(Fail (Text "ORDER BY requires a column name before ASC/DESC")) => FlushOrderByFinalWord "ASC" tables(Fail (Text "ORDER BY requires a column name before ASC/DESC")) => FlushOrderByFinalWord "asc" tables(Fail (Text "ORDER BY requires a column name before ASC/DESC")) => FlushOrderByFinalWord "DESC" tables(Fail (Text "ORDER BY requires a column name before ASC/DESC")) => FlushOrderByFinalWord "desc" tables(Fail (Text "ORDER BY requires a column name before ASC/DESC")) => FlushOrderByFinalWord "NULLS" tables(Fail (Text "ORDER BY requires a column name before ASC/DESC")) => FlushOrderByFinalWord "FIRST" tables(Fail (Text "ORDER BY requires a column name before ASC/DESC")) => FlushOrderByFinalWord "LAST" tables(ResolveColumn word tables typ) => FlushOrderByFinalWord word tables
#FlushOrderByWord Source
class FlushOrderByWord :: Symbol -> Row (Row Type) -> Constraintclass FlushOrderByWord word tables
Instances
FlushOrderByWord "" tablesFlushOrderByWord "ASC" tablesFlushOrderByWord "asc" tablesFlushOrderByWord "DESC" tablesFlushOrderByWord "desc" tablesFlushOrderByWord "NULLS" tablesFlushOrderByWord "FIRST" tablesFlushOrderByWord "LAST" tables(ResolveColumn word tables typ) => FlushOrderByWord word tables
#FlushOrderByThenSkip Source
class FlushOrderByThenSkip :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass FlushOrderByThenSkip colName rest tables
Instances
(FlushOrderByWord colName tables) => FlushOrderByThenSkip colName "" tables(FlushOrderByWord colName tables, Cons h t rest, FlushOrderByThenSkipByHead h t tables) => FlushOrderByThenSkip colName rest tables
#FlushOrderByThenSkipByHead Source
class FlushOrderByThenSkipByHead :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass FlushOrderByThenSkipByHead head tail tables
Instances
(SkipSpaces tail rest, ValidateOrderBy rest tables) => FlushOrderByThenSkipByHead "," tail tables(Append h t rest, ExtractWord rest word afterWord, FlushOrderByWord word tables, SkipSpaces afterWord rest', ValidateOrderByContinue rest' tables) => FlushOrderByThenSkipByHead h t tables
#ValidateOrderByContinue Source
class ValidateOrderByContinue :: Symbol -> Row (Row Type) -> Constraintclass ValidateOrderByContinue sym tables
Instances
ValidateOrderByContinue "" tables(Cons h t sym, ValidateOrderByContinueByHead h t tables) => ValidateOrderByContinue sym tables
#ValidateOrderByContinueByHead Source
class ValidateOrderByContinueByHead :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateOrderByContinueByHead head tail tables
Instances
(SkipSpaces tail rest, ValidateOrderBy rest tables) => ValidateOrderByContinueByHead "," tail tables(Append h t rest, ExtractWord rest word afterWord, FlushOrderByWord word tables, SkipSpaces afterWord rest', ValidateOrderByContinue rest' tables) => ValidateOrderByContinueByHead h t tables
#RowListHas Source
class RowListHas :: Symbol -> RowList Type -> Boolean -> Constraintclass RowListHas label rl has | label rl -> has
Instances
RowListHas label Nil FalseRowListHas label (Cons label typ rest) True(RowListHas label rest has) => RowListHas label (Cons other typ rest) has
#CheckDistinctOrderBy Source
class CheckDistinctOrderBy :: Row Type -> Symbol -> Row Type -> Constraintclass CheckDistinctOrderBy stage cols result
Instances
(RowToList stage stageRL, RowListHas "distinct" stageRL isDistinct, CheckDistinctOrderByBranch isDistinct cols result) => CheckDistinctOrderBy stage cols result
#CheckDistinctOrderByBranch Source
class CheckDistinctOrderByBranch :: Boolean -> Symbol -> Row Type -> Constraintclass CheckDistinctOrderByBranch isDistinct cols result
Instances
(OrderByColumnsInResult cols result) => CheckDistinctOrderByBranch True cols resultCheckDistinctOrderByBranch False cols result
#OrderByColumnsInResult Source
class OrderByColumnsInResult :: Symbol -> Row Type -> Constraintclass OrderByColumnsInResult sym result
Instances
OrderByColumnsInResult "" result(Cons h t sym, OrderByColumnsInResultGo h t "" result) => OrderByColumnsInResult sym result
#OrderByColumnsInResultGo Source
class OrderByColumnsInResultGo :: Symbol -> Symbol -> Symbol -> Row Type -> Constraintclass OrderByColumnsInResultGo head tail acc result
Instances
(FlushOrderByWordInResult acc result, SkipSpaces tail rest, OrderByColumnsInResult rest result) => OrderByColumnsInResultGo "," tail acc result(SkipSpaces tail rest, FlushOrderByThenSkipInResult acc rest result) => OrderByColumnsInResultGo " " tail acc result(Append acc h acc', FlushOrderByWordInResult acc' result) => OrderByColumnsInResultGo h "" acc result(Append acc h acc', Cons nextH nextT tail, OrderByColumnsInResultGo nextH nextT acc' result) => OrderByColumnsInResultGo h tail acc result
#FlushOrderByWordInResult Source
class FlushOrderByWordInResult :: Symbol -> Row Type -> Constraintclass FlushOrderByWordInResult word result
Instances
FlushOrderByWordInResult "" resultFlushOrderByWordInResult "ASC" resultFlushOrderByWordInResult "asc" resultFlushOrderByWordInResult "DESC" resultFlushOrderByWordInResult "desc" resultFlushOrderByWordInResult "NULLS" resultFlushOrderByWordInResult "FIRST" resultFlushOrderByWordInResult "LAST" result(CheckColumnInResult word result) => FlushOrderByWordInResult word result
#CheckColumnInResult Source
class CheckColumnInResult :: Symbol -> Row Type -> Constraintclass CheckColumnInResult col result
Instances
(RowToList result rl, CheckColumnInResultRL col rl) => CheckColumnInResult col result
#CheckColumnInResultRL Source
class CheckColumnInResultRL :: Symbol -> RowList Type -> Constraintclass CheckColumnInResultRL col rl
Instances
(Fail (Beside (Text "ORDER BY column ") (Beside (Quote col) (Text " must appear in the SELECT list when using DISTINCT")))) => CheckColumnInResultRL col NilCheckColumnInResultRL col (Cons col typ tail)(CheckColumnInResultRL col tail) => CheckColumnInResultRL col (Cons name typ tail)
#FlushOrderByThenSkipInResult Source
class FlushOrderByThenSkipInResult :: Symbol -> Symbol -> Row Type -> Constraintclass FlushOrderByThenSkipInResult colName rest result
Instances
(FlushOrderByWordInResult colName result) => FlushOrderByThenSkipInResult colName "" result(FlushOrderByWordInResult colName result, Cons h t rest, FlushOrderByThenSkipByHeadInResult h t result) => FlushOrderByThenSkipInResult colName rest result
#FlushOrderByThenSkipByHeadInResult Source
class FlushOrderByThenSkipByHeadInResult :: Symbol -> Symbol -> Row Type -> Constraintclass FlushOrderByThenSkipByHeadInResult head tail result
Instances
(SkipSpaces tail rest, OrderByColumnsInResult rest result) => FlushOrderByThenSkipByHeadInResult "," tail result(Append h t rest, ExtractWord rest word afterWord, FlushOrderByWordInResult word result, SkipSpaces afterWord rest', OrderByColumnsInResultContinue rest' result) => FlushOrderByThenSkipByHeadInResult h t result
#OrderByColumnsInResultContinue Source
class OrderByColumnsInResultContinue :: Symbol -> Row Type -> Constraintclass OrderByColumnsInResultContinue sym result
Instances
OrderByColumnsInResultContinue "" result(Cons h t sym, OrderByColumnsInResultContinueByHead h t result) => OrderByColumnsInResultContinue sym result
#OrderByColumnsInResultContinueByHead Source
class OrderByColumnsInResultContinueByHead :: Symbol -> Symbol -> Row Type -> Constraintclass OrderByColumnsInResultContinueByHead head tail result
Instances
(SkipSpaces tail rest, OrderByColumnsInResult rest result) => OrderByColumnsInResultContinueByHead "," tail result(Append h t rest, ExtractWord rest word afterWord, FlushOrderByWordInResult word result, SkipSpaces afterWord rest', OrderByColumnsInResultContinue rest' result) => OrderByColumnsInResultContinueByHead h t result
#ValidateColumns Source
class ValidateColumns :: Symbol -> Row Type -> Constraintclass ValidateColumns sym cols
Instances
ValidateColumns "" cols(Cons h t sym, ValidateColumnsGo h t "" cols) => ValidateColumns sym cols
#ValidateColumnsGo Source
class ValidateColumnsGo :: Symbol -> Symbol -> Symbol -> Row Type -> Constraintclass ValidateColumnsGo head tail acc cols
Instances
(FlushColumnWord acc cols, SkipSpaces tail rest, ValidateColumns rest cols) => ValidateColumnsGo "," tail acc cols(SkipSpaces tail rest, ValidateAfterName acc rest cols) => ValidateColumnsGo " " tail acc cols(Append acc h acc', FlushColumnWord acc' cols) => ValidateColumnsGo h "" acc cols(Append acc h acc', Cons nextH nextT tail, ValidateColumnsGo nextH nextT acc' cols) => ValidateColumnsGo h tail acc cols
#FlushColumnWord Source
class FlushColumnWord :: Symbol -> Row Type -> Constraintclass FlushColumnWord word cols
Instances
FlushColumnWord "" colsFlushColumnWord "$" colsFlushColumnWord "AND" colsFlushColumnWord "OR" colsFlushColumnWord "NOT" colsFlushColumnWord "IS" colsFlushColumnWord "NULL" colsFlushColumnWord "LIKE" colsFlushColumnWord "ILIKE" colsFlushColumnWord "IN" colsFlushColumnWord "TRUE" colsFlushColumnWord "FALSE" colsFlushColumnWord "BETWEEN" colsFlushColumnWord "ANY" colsFlushColumnWord "ALL" cols(Cons head rest word, FlushColumnWordByHead head word cols) => FlushColumnWord word cols
#FlushColumnWordByHead Source
class FlushColumnWordByHead :: Symbol -> Symbol -> Row Type -> Constraintclass FlushColumnWordByHead head word cols
Instances
FlushColumnWordByHead "$" word colsFlushColumnWordByHead "0" word colsFlushColumnWordByHead "1" word colsFlushColumnWordByHead "2" word colsFlushColumnWordByHead "3" word colsFlushColumnWordByHead "4" word colsFlushColumnWordByHead "5" word colsFlushColumnWordByHead "6" word colsFlushColumnWordByHead "7" word colsFlushColumnWordByHead "8" word colsFlushColumnWordByHead "9" word cols(Cons word typ rest cols) => FlushColumnWordByHead head word cols(Fail (Beside (Beside (Text "Column ") (Quote word)) (Text " does not exist in the table"))) => FlushColumnWordByHead head word cols
#ValidateAfterName Source
class ValidateAfterName :: Symbol -> Symbol -> Row Type -> Constraintclass ValidateAfterName acc rest cols
Instances
(FlushColumnWord acc cols) => ValidateAfterName acc "" cols(FlushColumnWord acc cols, Cons h t rest, ValidateAfterNameByHead h t cols) => ValidateAfterName acc rest cols
#ValidateAfterNameByHead Source
class ValidateAfterNameByHead :: Symbol -> Symbol -> Row Type -> Constraintclass ValidateAfterNameByHead head tail cols
Instances
(SkipSpaces tail rest, ValidateColumns rest cols) => ValidateAfterNameByHead "," tail cols(Append h t rest, ExtractWord rest word afterWord, HandleAfterColumnWord word afterWord cols) => ValidateAfterNameByHead h t cols
#HandleAfterColumnWord Source
class HandleAfterColumnWord :: Symbol -> Symbol -> Row Type -> Constraintclass HandleAfterColumnWord word rest cols
Instances
(SkipAlias rest cols) => HandleAfterColumnWord "AS" rest cols(SkipAlias rest cols) => HandleAfterColumnWord "as" rest cols
#SkipAlias Source
class SkipAlias :: Symbol -> Row Type -> Constraintclass SkipAlias sym cols
Instances
SkipAlias "" cols(ExtractWord sym _alias afterAlias, SkipSpaces afterAlias rest, ExpectCommaOrEnd rest cols) => SkipAlias sym cols
#ExpectCommaOrEnd Source
class ExpectCommaOrEnd :: Symbol -> Row Type -> Constraintclass ExpectCommaOrEnd sym cols
Instances
ExpectCommaOrEnd "" cols(Cons h t sym, ExpectCommaOrEndByHead h t cols) => ExpectCommaOrEnd sym cols
#ExpectCommaOrEndByHead Source
class ExpectCommaOrEndByHead :: Symbol -> Symbol -> Row Type -> Constraintclass ExpectCommaOrEndByHead head tail cols
Instances
(SkipSpaces tail rest, ValidateColumns rest cols) => ExpectCommaOrEndByHead "," tail cols
#ValidateJoinCondition Source
class ValidateJoinCondition :: Symbol -> Row (Row Type) -> Constraintclass ValidateJoinCondition sym tables
Instances
ValidateJoinCondition "" tables(Cons h t sym, ValidateJoinCondGo h t "" tables) => ValidateJoinCondition sym tables
#ValidateJoinCondGo Source
class ValidateJoinCondGo :: Symbol -> Symbol -> Symbol -> Row (Row Type) -> Constraintclass ValidateJoinCondGo head tail acc tables
Instances
(FlushJoinWord acc tables, SkipSpaces tail rest, ValidateJoinCondition rest tables) => ValidateJoinCondGo " " tail acc tables(FlushJoinWord acc tables, ValidateJoinCondition tail tables) => ValidateJoinCondGo "=" tail acc tables(FlushJoinWord acc tables, ValidateJoinCondition tail tables) => ValidateJoinCondGo ">" tail acc tables(FlushJoinWord acc tables, ValidateJoinCondition tail tables) => ValidateJoinCondGo "<" tail acc tables(FlushJoinWord acc tables, ValidateJoinCondition tail tables) => ValidateJoinCondGo "!" tail acc tables(FlushJoinWord acc tables, ValidateJoinCondition tail tables) => ValidateJoinCondGo "(" tail acc tables(FlushJoinWord acc tables, ValidateJoinCondition tail tables) => ValidateJoinCondGo ")" tail acc tables(FlushJoinWord acc tables, SkipStringLiteral tail rest, ValidateJoinCondition rest tables) => ValidateJoinCondGo "\'" tail acc tables(Append acc h acc', FlushJoinWord acc' tables) => ValidateJoinCondGo h "" acc tables(Append acc h acc', Cons nextH nextT tail, ValidateJoinCondGo nextH nextT acc' tables) => ValidateJoinCondGo h tail acc tables
#FlushJoinWord Source
class FlushJoinWord :: Symbol -> Row (Row Type) -> Constraintclass FlushJoinWord word tables
Instances
FlushJoinWord "" tablesFlushJoinWord "AND" tablesFlushJoinWord "OR" tablesFlushJoinWord "NOT" tablesFlushJoinWord "IS" tablesFlushJoinWord "NULL" tablesFlushJoinWord "TRUE" tablesFlushJoinWord "FALSE" tables(Cons head rest word, FlushJoinWordByHead head word tables) => FlushJoinWord word tables
#FlushJoinWordByHead Source
class FlushJoinWordByHead :: Symbol -> Symbol -> Row (Row Type) -> Constraintclass FlushJoinWordByHead head word tables
Instances
FlushJoinWordByHead "$" word tablesFlushJoinWordByHead "0" word tablesFlushJoinWordByHead "1" word tablesFlushJoinWordByHead "2" word tablesFlushJoinWordByHead "3" word tablesFlushJoinWordByHead "4" word tablesFlushJoinWordByHead "5" word tablesFlushJoinWordByHead "6" word tablesFlushJoinWordByHead "7" word tablesFlushJoinWordByHead "8" word tablesFlushJoinWordByHead "9" word tables(ResolveColumn word tables typ) => FlushJoinWordByHead head word tables
#ParseConflictAction Source
class ParseConflictAction :: Symbol -> Row Type -> Constraintclass ParseConflictAction sym cols
Instances
(ExtractWord sym w1 rest1, ExpectKeyword w1 "DO", ExtractWord rest1 w2 rest2, ExpectKeyword w2 "UPDATE", ExtractWord rest2 w3 rest3, ExpectKeyword w3 "SET", ParseAssignments rest3 cols) => ParseConflictAction sym cols
#ExpectKeyword Source
class ExpectKeyword :: Symbol -> Symbol -> Constraintclass ExpectKeyword actual expected
Instances
ExpectKeyword a a(Fail (Beside (Beside (Text "Expected keyword ") (Quote expected)) (Beside (Text " but got ") (Quote actual)))) => ExpectKeyword actual expected
#ParseAssignments Source
class ParseAssignments :: Symbol -> Row Type -> Constraintclass ParseAssignments sym cols
Instances
ParseAssignments "" cols(ExtractWord sym colName rest1, Cons colName colType colRest cols, SkipSpaces rest1 rest2, ExpectChar rest2 "=" rest3, SkipSpaces rest3 rest4, ExtractWord rest4 excRef rest5, ValidateExcludedRef excRef colName, SkipSpaces rest5 rest6, ParseAssignmentsContinue rest6 cols) => ParseAssignments sym cols
#ParseAssignmentsContinue Source
class ParseAssignmentsContinue :: Symbol -> Row Type -> Constraintclass ParseAssignmentsContinue sym cols
Instances
ParseAssignmentsContinue "" cols(Cons h t sym, ParseAssignmentsContinueByHead h t cols) => ParseAssignmentsContinue sym cols
#ParseAssignmentsContinueByHead Source
class ParseAssignmentsContinueByHead :: Symbol -> Symbol -> Row Type -> Constraintclass ParseAssignmentsContinueByHead head tail cols
Instances
(SkipSpaces tail rest, ParseAssignments rest cols) => ParseAssignmentsContinueByHead "," tail cols
#ExpectChar Source
class ExpectChar :: Symbol -> Symbol -> Symbol -> Constraintclass ExpectChar sym char rest | sym char -> rest
Instances
(Cons h t sym, ExpectCharMatch h t char rest) => ExpectChar sym char rest
#ExpectCharMatch Source
class ExpectCharMatch :: Symbol -> Symbol -> Symbol -> Symbol -> Constraintclass ExpectCharMatch head tail expected rest | head tail expected -> rest
Instances
ExpectCharMatch c tail c tail(Fail (Beside (Beside (Text "Expected \'") (Quote expected)) (Beside (Text "\' but got \'") (Quote head)))) => ExpectCharMatch head tail expected rest
#ValidateExcludedRef Source
class ValidateExcludedRef :: Symbol -> Symbol -> Constraintclass ValidateExcludedRef ref colName
Instances
(Append "EXCLUDED." colName expected, MatchSymbol ref expected) => ValidateExcludedRef ref colName
#MatchSymbol Source
class MatchSymbol :: Symbol -> Symbol -> Constraintclass MatchSymbol a b
Instances
MatchSymbol a a(Fail (Beside (Beside (Text "Expected ") (Quote expected)) (Beside (Text " but got ") (Quote actual)))) => MatchSymbol actual expected
#IsAutoGeneratedTC Source
class IsAutoGeneratedTC :: Type -> Boolean -> Constraintclass IsAutoGeneratedTC constraints result | constraints -> result
Instances
IsAutoGeneratedTC (AutoIncrement a) TrueIsAutoGeneratedTC (Default s a) TrueIsAutoGeneratedTC (DefaultExpr expr a) True(IsAutoGeneratedTC a result) => IsAutoGeneratedTC (PrimaryKey a) result(IsAutoGeneratedTC a result) => IsAutoGeneratedTC (Unique a) result(IsAutoGeneratedTC a result) => IsAutoGeneratedTC (ForeignKey t r c a) result(IsAutoGeneratedTC a result) => IsAutoGeneratedTC (Nullable a) resultIsAutoGeneratedTC a False
#InsertableColumnsRL Source
class InsertableColumnsRL :: RowList Type -> RowList Type -> Constraintclass InsertableColumnsRL tableRL outRL | tableRL -> outRL
Instances
InsertableColumnsRL Nil Nil(IsAutoGeneratedTC entry isAuto, ExtractType entry typ, InsertableColumnDecide isAuto name typ tail outRL) => InsertableColumnsRL (Cons name entry tail) outRL
#InsertableColumnDecide Source
class InsertableColumnDecide :: Boolean -> Symbol -> Type -> RowList Type -> RowList Type -> Constraintclass InsertableColumnDecide isAuto name typ tail outRL | isAuto name typ tail -> outRL
Instances
(InsertableColumnsRL tail outRL) => InsertableColumnDecide True name typ tail outRL(InsertableColumnsRL tail outRL) => InsertableColumnDecide False name typ tail (Cons name typ outRL)
#RequiredColumnsRL Source
class RequiredColumnsRL :: RowList Type -> RowList Type -> Constraintclass RequiredColumnsRL rl out | rl -> out
Instances
RequiredColumnsRL Nil Nil(RequiredColumnsRL tail out) => RequiredColumnsRL (Cons name (Maybe a) tail) out(RequiredColumnsRL tail out) => RequiredColumnsRL (Cons name typ tail) (Cons name typ out)
#ColumnNamesRL Source
class ColumnNamesRL :: RowList Type -> Constraintclass ColumnNamesRL rl where
Members
columnNamesRL :: Proxy rl -> Array String
Instances
ColumnNamesRL Nil(IsSymbol name, ColumnNamesRL tail) => ColumnNamesRL (Cons name typ tail)
#FieldToPGValue Source
#RecordValuesRL Source
class RecordValuesRL :: RowList Type -> Row Type -> Constraintclass RecordValuesRL rl row where
Members
recordValuesRL :: Proxy rl -> Record row -> Array PGValue
Instances
RecordValuesRL Nil row(IsSymbol name, Cons name typ rest row, FieldToPGValue typ, RecordValuesRL tail row) => RecordValuesRL (Cons name typ tail) row
#MakeNullableRL Source
class MakeNullableRL :: RowList Type -> RowList Type -> Constraintclass MakeNullableRL rl out | rl -> out
Instances
MakeNullableRL Nil Nil(ExtractType entry typ, MakeNullableDecide typ name entry tail out) => MakeNullableRL (Cons name entry tail) out
#MakeNullableDecide Source
class MakeNullableDecide :: Type -> Symbol -> Type -> RowList Type -> RowList Type -> Constraintclass MakeNullableDecide typ name entry tail out | typ name entry tail -> out
Instances
(MakeNullableRL tail out') => MakeNullableDecide (Maybe a) name entry tail (Cons name entry out')(MakeNullableRL tail out') => MakeNullableDecide typ name entry tail (Cons name (Nullable entry) out')
#HasAnyDML Source
class HasAnyDML :: Row Type -> Constraintclass HasAnyDML stage
Instances
(RowToList stage rl, HasAnyDMLRL rl) => HasAnyDML stage
#HasAnyDMLRL Source
class HasAnyDMLRL :: RowList Type -> Constraintclass HasAnyDMLRL rl
Instances
HasAnyDMLRL (Cons "select" Unit rest)HasAnyDMLRL (Cons "set" Unit rest)HasAnyDMLRL (Cons "delete" Unit rest)(HasAnyDMLRL rest) => HasAnyDMLRL (Cons label typ rest)(Fail (Text "WHERE requires a preceding SELECT, UPDATE (set), or DELETE")) => HasAnyDMLRL Nil
#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
IsLimitParam "$" tail TrueIsLimitParam head tail False
#ParseLimitOffsetParams Source
class ParseLimitOffsetParams :: Boolean -> Symbol -> Row Type -> Row Type -> Constraintclass ParseLimitOffsetParams isParam name params params' | isParam name params -> params'
Instances
(Lacks name params, Cons name Int params params') => ParseLimitOffsetParams True name params params'ParseLimitOffsetParams False name params params
#ValidateNumericLiteral Source
class ValidateNumericLiteral :: Symbol -> Constraintclass ValidateNumericLiteral sym
Instances
(Cons h t sym, ValidateAllDigits h t) => ValidateNumericLiteral sym
#ValidateAllDigits Source
class ValidateAllDigits :: Symbol -> Symbol -> Constraintclass ValidateAllDigits head tail
Instances
ValidateAllDigits "0" ""ValidateAllDigits "1" ""ValidateAllDigits "2" ""ValidateAllDigits "3" ""ValidateAllDigits "4" ""ValidateAllDigits "5" ""ValidateAllDigits "6" ""ValidateAllDigits "7" ""ValidateAllDigits "8" ""ValidateAllDigits "9" ""(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "0" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "1" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "2" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "3" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "4" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "5" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "6" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "7" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "8" tail(Cons h2 t2 tail, ValidateAllDigits h2 t2) => ValidateAllDigits "9" tail(Fail (Beside (Text "LIMIT/OFFSET must be a non-negative integer or $parameter, got: ") (Quote sym))) => ValidateAllDigits head tail
#ParseLimitOffset Source
class ParseLimitOffset :: Symbol -> Row Type -> Row Type -> Constraintclass ParseLimitOffset sym params params' | sym params -> params'
Instances
(Cons head tail sym, IsLimitParam head tail isParam, ParseLimitOffsetBranch isParam sym tail params params') => ParseLimitOffset sym params params'
#ParseLimitOffsetBranch Source
class ParseLimitOffsetBranch :: Boolean -> Symbol -> Symbol -> Row Type -> Row Type -> Constraintclass ParseLimitOffsetBranch isParam sym paramName params params' | isParam sym paramName params -> params'
Instances
(Lacks paramName params, Cons paramName Int params params') => ParseLimitOffsetBranch True sym paramName params params'(ValidateNumericLiteral sym) => ParseLimitOffsetBranch False sym paramName params params
#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
ValidateSetColumnsRL Nil cols(Cons name entry rest cols, ExtractType entry typ, ValidateSetColumnsRL tail cols) => ValidateSetColumnsRL (Cons name typ tail) cols
#SetClauseRL Source
class SetClauseRL :: RowList Type -> Constraintclass SetClauseRL rl where
Members
setClauseRL :: Proxy rl -> Int -> Array String
Instances
SetClauseRL Nil(IsSymbol name, SetClauseRL tail) => SetClauseRL (Cons name typ tail)
#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'#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)#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#ParamsToArray Source
class ParamsToArray :: RowList Type -> Row Type -> Constraintclass ParamsToArray rl row where
Members
Instances
ParamsToArray Nil row(IsSymbol name, Cons name typ rest row, Lacks name rest, ParamsToArray tail row) => ParamsToArray (Cons name typ tail) row
#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#decodeRows Source
decodeRows :: forall a. ReadForeign a => Array Foreign -> Either (NonEmptyList ForeignError) (Array a)#decodeRow Source
decodeRow :: forall a. ReadForeign a => Foreign -> Either (NonEmptyList ForeignError) a