Skip to content

Commit

Permalink
feat(driver-adapters-executor): fix benchmark action, add comment
Browse files Browse the repository at this point in the history
Co-authored-by: Miguel Fernandez <miguel@mff.io>
  • Loading branch information
jkomyno committed Jan 23, 2024
1 parent 94e4600 commit 6cb33c0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion query-engine/driver-adapters/executor/src/recording.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ function createInMemoryRecordings() {
const queryResults: Map<string, Result<ResultSet>> = new Map();
const commandResults: Map<string, Result<number>> = new Map();

// Recording is currently only used in benchmarks. Before we used to serialize the whole query
// (sql + args) but since bigints are not serialized by JSON.stringify, and we didn’t really need
// args for benchmarks, we just serialize the sql part.
//
// If this ever changes (we reuse query recording in tests) we need to make sure to serialize the
// args as well.
const queryToKey = (params: Query) => {
return JSON.stringify(params);
return JSON.stringify(params.sql);
};

return {
Expand Down

0 comments on commit 6cb33c0

Please sign in to comment.