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
So that's a way to reduce rowsvalues to just (name, domain) pairs that I wanted, omitting DEFAULT columns 🤔
Unfortunately, doing this precludes both the IODKU & RETURNING clauses (because last_seen & id columns are no longer "in scope"). Thus if I need them, I must abandon the projection & say clientId = unsafeDefault.
@ocharles do you think it's a good idea to extend the Selects names exprs existential on Insert constructor to also contain a projection allowing to skip defaulted columns in rows Query only?.. I mean, maybe this:
Because conceivably, the common use-case for RETURNING asks to fetch a defaulted column (id, timestamp) immediately as part of a data-writing query... so, that column must be in names and therefore in exprs. However, by allowing exprsNonDefault to be "smaller than" exprs, the API might elegantly allow omitting those nextval and unsafeDefault calls.
Hi! 👋 Gr8 lib 😂
The facilities around column defaulting though... come across a bit underwhelming.
For sake of example, suppose a table like so:
Pretty bland & by-the-book, right?..
But then, it seems
Insert
can't be written withoutunsafeDefault
:Ideally, as a user I'd love to skip writing out columns with
DEFAULT
altogether, in the spirit of raw SQL:— but it seems this may require something like #216.
Or am I missing a more advanced use of
values
?The text was updated successfully, but these errors were encountered: