@palmares/databases
Version:
Add support for working with databases with palmares framework
18 lines • 879 B
TypeScript
import type { DatabaseAdapter } from '../engine';
import type { model } from '../models';
import type { FieldWithOperationType } from '../models/types';
/**
* What this will do is parse the search FIELD, for every field we see if it is
* of type object, if it is we parse it for the query.
*
* Parse means we send the value, the type of operation, if it's a negative and
* an object to append the result of the parse.
*
* We return either the value of the field or the object with the parsed data.
*/
export declare function parseSearchField(engine: DatabaseAdapter, key: string, fieldData: FieldWithOperationType<unknown>, inputFieldParser: (value: any) => Promise<any>, translatedModelInstance: InstanceType<ReturnType<typeof model>>, result: any): Promise<undefined | {
isValid: false;
code: string;
reason: string;
}>;
//# sourceMappingURL=search.d.ts.map