Skip to content

Commit

Permalink
Added formatting of object as JSON in SQL template literal
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Oct 9, 2024
1 parent 2cb105a commit ee87841
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 2 additions & 0 deletions src/packages/dumbo/src/core/sql/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ const defaultFormat = (value: unknown) => {
return format('%L', value);
} else if (Array.isArray(value)) {
return format('(%L)', value);
} else if (typeof value === 'object') {
return format('%s', JSON.stringify(value));
} else {
return format('%L', value);
}
Expand Down
4 changes: 1 addition & 3 deletions src/packages/pongo/src/e2e/postgres.e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ void describe('MongoDB Compatibility Tests', () => {
before(async () => {
postgres = await new PostgreSqlContainer().start();
postgresConnectionString = postgres.getConnectionUri();
client = pongoClient(postgresConnectionString, {
schema: { autoMigration: 'None' },
});
client = pongoClient(postgresConnectionString);
shim = new MongoClient(postgresConnectionString);
await client.connect();
await shim.connect();
Expand Down

0 comments on commit ee87841

Please sign in to comment.