-
Notifications
You must be signed in to change notification settings - Fork 219
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ADP-2565] Implement SQL expressions for WHERE
clauses
#4696
[ADP-2565] Implement SQL expressions for WHERE
clauses
#4696
Conversation
e1c15ad
to
04310ba
Compare
selectWhere
WHERE
clauses
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
text :: Text -> Var.Lets Text | ||
text = pure | ||
|
||
-- | Render a variable name | ||
var :: Var.VarName -> Var.Lets Text | ||
var = pure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Worth making VarName
a newtype
to distinguish var
from text
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 Yes. Making the type VarName
abstract is a good idea, because the only sensible way to create variable names should be newVarName
anyway.
04310ba
to
8e40026
Compare
8e40026
to
2e5deca
Compare
This pull request
VarName
, a typeBindings
, and aLets
monad.Expr a
that represents expression in the SQL language. Specifically,Expr Bool
can be used in aWHERE
clause.selectWhere
that works with theTable
type and computes aSELECT … WHERE
clause.deleteWhere
that works with theTable
typeComments
Demo.Database
provides a basic functionality check.Issue Number
ADP-2565