-
Notifications
You must be signed in to change notification settings - Fork 157
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
Support for noop commands #735
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Let's say we have a command builder
doList
of type(xs: List[A]) => Command[xs.type]
defined as ansql"INSERT INTO [...] VALUES ${enc.values.list(xs)}"
whereenc
is of typeEncoder[A]
. This command will succeed so long the input list is non-empty. If it's empty it will fail with a syntax error on the empty list of tuples()
.I am trying to handle the empty case within the definition of
doList
, so that we don't have to bother to check for it on the caller's side. As far as I am aware, there seems to be no no-op command in postgresql. Using dummy selector commands likeSELECT NULL
doesn't work with Skunk since these return results and are therefore understood as queries.Would it be advisable to add some sort of singleton type no-op command of type
Command[Void]
to Skunk and interpret it as sending nothing down the wire to postgresql?The text was updated successfully, but these errors were encountered: