Skip to content
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

additional features for Sql[+A] #13

Open
yisraelU opened this issue Feb 9, 2022 · 3 comments
Open

additional features for Sql[+A] #13

yisraelU opened this issue Feb 9, 2022 · 3 comments

Comments

@yisraelU
Copy link
Contributor

yisraelU commented Feb 9, 2022

potentials

  • in
  • notIn
  • and
  • or
  • where
@jdegoes
Copy link
Member

jdegoes commented Feb 14, 2022

These methods can be added to Sql type and modelled after the existing Sql#values method.

Example:

class Sql[+A](...) { self =>
  def and(right: Sql[ZResultSet])(implicit ev: A <:< ZResultSet): Sql[ZResultSet] = 
    self ++ Sql(" AND ", identity(_)) ++ right
}

For improved performance, we can construct the syntax fragments as constant values which are private and stored in the Sql companion object, together with other existing constants such as values.

@zagyi
Copy link
Contributor

zagyi commented Feb 14, 2022

@jdegoes, I would like to work on this.

@yisraelU
Copy link
Contributor Author

#21 contains 'and' plus 'or' methods

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants