jsonb inserted incorrectly when used with slonik
Open
- Dominant language
- TypeScript
- Stars
- 28
- Forks
- 3
- PR merge metrics
- No merged PRs in 30d
Description
The following query inserts a JSON object to a table with a JSONB column.
```
UPDATE public.property_history
SET attributes = ${sql.jsonb(attributes ?? null)}, status = ${status}
WHERE id = ${id}
```
When utilizing slonik using
```
await createPool(pgConnString!, {typeParsers});
```
it inserts correctly as an object.
However the same query inserts the object as a stringified string when using:
```
const PgPool = createPostgresBridge(postgres);
await createPool(pgConnString!, {PgPool, typeParsers});
```
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.