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
I imagine savepoint will often be used for a single query. Would it make sense to offer sql.savepoint as both a callback and a tagged template function?
E.g.
letunavailable;sql.savepoint`insert into users(username) ${username}`.catch(()=>unavailable=true)
vs
letunavailable;sql.savepoint(sql=>sql`insert into users(username) ${username}`).catch(()=>unavailable=true)
It might not be worth the sugar, but I thought I'd mention the idea because all my savepoint usages so far had been for a single query.
The text was updated successfully, but these errors were encountered:
Yeah, that makes sense, but it breaks a bit with trying to keep queries inside a sql named tagged function.
The reason for keeping SQL syntax only in sql named tagged functions is to help eg. syntax highlighters, and also (my own usage), searching for sql` will show me all SQL queries.
I imagine
savepoint
will often be used for a single query. Would it make sense to offer sql.savepoint as both a callback and a tagged template function?E.g.
vs
It might not be worth the sugar, but I thought I'd mention the idea because all my savepoint usages so far had been for a single query.
The text was updated successfully, but these errors were encountered: