MCPcopy Create free account
hub / github.com/clientdb/clientdb / getQueryKeyBase

Function getQueryKeyBase

core/query.ts:112–132  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

110 const sortConfig = resolveSortInput(sort);
111
112 function getQueryKeyBase() {
113 const parts: string[] = [definition.config.name];
114
115 if (queryName) {
116 parts.push(queryName);
117 }
118
119 if (filter) {
120 if (typeof filter === "function") {
121 parts.push(`filter()`);
122 } else {
123 parts.push(`filter({${Object.keys(filter).join(",")}})`);
124 }
125 }
126
127 if (sortConfig) {
128 parts.push(`sort()[${sortConfig.direction}]`);
129 }
130
131 return parts.join("__");
132 }
133
134 const queryKeyBase = getQueryKeyBase();
135

Callers 1

createEntityQueryFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected