You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say we have a command builder doList of type (xs: List[A]) => Command[xs.type] defined as an sql"INSERT INTO [...] VALUES ${enc.values.list(xs)}" where enc is of type Encoder[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 like SELECT 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:
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: