We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e551ef8 commit 6dfbcbcCopy full SHA for 6dfbcbc
1 file changed
drizzle-orm/src/cache/core/cache.ts
@@ -103,7 +103,7 @@ export const strategyFor = async (
103
export type MutationOption = { tags?: string | string[]; tables?: Table<any> | Table<any>[] | string | string[] };
104
105
export async function hashQuery(sql: string, params?: any[]) {
106
- const dataToHash = `${sql}-${JSON.stringify(params, (_, v) => typeof v === 'bigint' ? v.toString() : v)}`;
+ const dataToHash = `${sql}-${JSON.stringify(params, (_, v) => typeof v === 'bigint' ? `${v}n` : v)}`;
107
const encoder = new TextEncoder();
108
const data = encoder.encode(dataToHash);
109
const hashBuffer = await crypto.subtle.digest('SHA-256', data);
0 commit comments