refactor: simplify and add memory indexing

This commit is contained in:
2026-01-05 04:42:46 +01:00
parent 74d45cbe92
commit ed15a0eb27
37 changed files with 854 additions and 1328 deletions

View File

@@ -1,5 +1,11 @@
export function hashCodeQuery(filter: unknown, options: unknown): number {
const value = JSON.stringify({ filter, options });
/**
* Generate a number from the given condition and option combination.
*
* @param condition - Condition to hash.
* @param options - Options to hash.
*/
export function hashCodeQuery(condition: unknown, options: unknown): number {
const value = JSON.stringify({ condition, options });
let hash = 0;
if (value.length === 0) {
return hash;