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
import{sql}from'kysely'// a plain promise for the example, but this could be a value determined inside a transaction// or as part of some other promise chainconstsomeTimestampValue=Promise.resolve(true).then((value)=>value
? sql<string>`'infinity'::timestamptz`
: sql<string>`'-infinity'::timestamptz`)
This results in a raised error:
Error: don't await RawBuilder instances directly. To execute the query you need to call `execute`
This is non-obvious behavior for a tag function, where I think the expected behavior here should be to act much more like a generic object (e.g. const a = b and const a = await b should have effectively the same behavior).
The text was updated successfully, but these errors were encountered:
Here's a simple example:
This results in a raised error:
This is non-obvious behavior for a tag function, where I think the expected behavior here should be to act much more like a generic object (e.g.
const a = b
andconst a = await b
should have effectively the same behavior).The text was updated successfully, but these errors were encountered: