data icon indicating copy to clipboard operation
data copied to clipboard

Can `findFirst()` support the `where` parameter as function?

Open cp3hnu opened this issue 2 years ago • 1 comments

This API like that

model.findFirst({
  where: (item) => return true
});

It will be more flexible.

cp3hnu avatar Dec 12 '22 03:12 cp3hnu

Hey, @cp3hnu. Thanks for proposing this!

If I remember the context correctly, the intention was to have all the queries serializable to string so that we could synchronize occurring operations between different tabs. That's still relevant for the current version of the library but may not be as relevant for the future releases.

The proposal itself makes sense. Let's keep it in mind, I shall revisit this when I'm working on this library again.

kettanaito avatar Dec 12 '22 11:12 kettanaito