Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Pg] Fix jsonb field escaping data before insert #666

Closed
wants to merge 15 commits into from
4 changes: 2 additions & 2 deletions drizzle-orm/src/pg-core/columns/jsonb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ export class PgJsonb<T extends ColumnBaseConfig> extends PgColumn<PgJsonbHKT, T>
return 'jsonb';
}

override mapToDriverValue(value: T['data']): string {
return JSON.stringify(value);
override mapToDriverValue(value: T['data']): T['data'] {
return value;
}

override mapFromDriverValue(value: T['data'] | string): T['data'] {
Expand Down