refactor: dry RPC param parsing
This commit is contained in:
committed by
Steve Chavez
parent
8f80cd1469
commit
be6c30a0fb
@@ -278,6 +278,7 @@ pgFmtOrderTerm qi ot =
|
||||
|
||||
pgFmtFilter :: QualifiedIdentifier -> Filter -> SQL.Snippet
|
||||
pgFmtFilter _ (FilterNullEmbed hasNot fld) = SQL.sql (pgFmtIdent fld) <> " IS " <> (if hasNot then "NOT" else mempty) <> " NULL"
|
||||
pgFmtFilter _ (Filter _ (NoOpExpr _)) = mempty -- TODO unreachable because NoOpExpr is filtered on QueryParams
|
||||
pgFmtFilter table (Filter fld (OpExpr hasNot oper)) = notOp <> " " <> case oper of
|
||||
Op op val -> pgFmtFieldOp op <> " " <> case op of
|
||||
OpLike -> unknownLiteral (T.map star val)
|
||||
|
||||
Reference in New Issue
Block a user