webda.io
webda.io copied to clipboard
Store add a find
We could have something to simplify querying with:
.find({
status: "open"
})
It would default to AND query and we could implement something like the mongodb syntax if needed.
You mean faster than Query.filter: Expression ?
https://github.com/loopingz/webda.io/blob/e912bfca379b9979f812680f82619e6b3be5784e/packages/core/src/stores/store.ts#L2476
type QueryMap = { [key: string]: string };
abstract find(query: WebdaQL.Query | QueryMap ): Promise<StoreFindResult<T>>;
Would it be possible to guess a better precision expected type instead of a standard object key/value QueryMap ? i mean considering we should be helped by the Sotre's Model?... i don't see how to use it correctly