ReviewOS

also looking at this

stacks/bun-query-builder

fix(client): write the cache-key delimiter as \0, not a raw NUL byte

#1102
Merged glennmichael123 wants to merge fix/nul-byte-cache-key-delimiter into main
2 files +83 -1
packages/bun-query-builder/src/client.tsmodified+1-1
Changes to packages/bun-query-builder/src/client.ts
@@ -5904,7 +5904,7 @@ export function createQueryBuilder<DB extends DatabaseSchema<any>>(state?: Parti
59045904 // `where id = $1` with [1] and with [2] would otherwise share one
59055905 // cache entry and the second query would return the first's rows.
59065906 const cacheKey = useCache
5907 ? `${String(finalQuery)}${JSON.stringify(whereParams)}`
5907 ? `${String(finalQuery)}\0${JSON.stringify(whereParams)}`
59085908 : ''
59095909 if (useCache) {
59105910 const cached = queryCache.get(cacheKey)