Value token can be any primitive that is shared between pg and JavaScript (string, integer, float, boolean, null).
If you have a requirement for automatic coalescing of other object types (such as Date), I suggest raising an issue. I cannot think of other types that would be relatively safe to cast, though.
Value token can be any primitive that is shared between pg and JavaScript (string, integer, float, boolean, null).
If you have a requirement for automatic coalescing of other object types (such as Date), I suggest raising an issue. I cannot think of other types that would be relatively safe to cast, though.
JS Object with
JSON.stringify
?Too many edges cases where an object could be passed accidentally inserting potentially sensitive data to the database.
There is
sql.json()
for that, though.