@uttori/storage-provider-json-memory
Version:
Uttori storage provider using JavaScript objects in memory.
14 lines • 707 B
TypeScript
export default processQuery;
/**
* Processes a query string.
* @param {string} query - The SQL-like query to parse.
* @param {import('./storage-provider.js').UttoriDocument[]} objects - An array of object to search within.
* @returns {import('./storage-provider.js').UttoriDocument[]|number} Returns an array of all matched documents, or a count.
* @example
* ```js
* processQuery('SELECT name FROM table WHERE age > 1 ORDER BY RANDOM LIMIT 3', [{ ... }, ...]);
* ➜ [{ ... }, ...]
* ```
*/
declare function processQuery(query: string, objects: import('./storage-provider.js').UttoriDocument[]): import('./storage-provider.js').UttoriDocument[] | number;
//# sourceMappingURL=query-tools.d.ts.map