You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to post a reproduction, but I am unable to setup @nuxt/content3 in StackBlitz: getting this error:
Restarting Nuxt due to error: `Error: Could not locate the bindings file. Tried: nuxi:nuxi 18:08:53
→ /home/project/node_modules/better-sqlite3/build/better_sqlite3.node
...
Is there a workaround or a starter template that I am not seeing?
Description
Coming from v2, I am unable to reproduce the same JSON sorting and filtering behaviour.
Namely item three discarded because status = null, but only status = hidden should be discarded.
Also in v2 it was possible to have a complex sorting query using multiple criteria, i.e. sort items with status first and then sort those based on priority.
I am missing something? 😅
Thanks!
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered:
I'm confused about the issue, for me it's more like filtering than ordering.
Content v3 uses Sqlite for filtering and Sqlite deals with null values a bit differently than v2. If you use <> operator in the query it will ignore null values.
You can use orWhere to resolve it, you can check the internal usage
It’s unfortunate that one has to do these mental gymnastics in a compound filtering in order to filter a very simple use case: omit a particular value.
You quoted the source code with .where('navigation', '<>', 'false'), but it turns out queryCollection schema already unwraps the values and returns the parsed boolean, so it must be false boolean in query.where, not a string 😢
I know it’s absolutely pointless to be nagging about an open source project that you do in your free time. The reality is the migration is very painful and there are quite a few undocumented foot guns along the way. Nevertheless thank you for your effort – just hoping to provide some feedback.
Environment
Version
v3
Reproduction
I would like to post a reproduction, but I am unable to setup @nuxt/content3 in StackBlitz: getting this error:
Is there a workaround or a starter template that I am not seeing?
Description
Coming from v2, I am unable to reproduce the same JSON sorting and filtering behaviour.
Before (v2):
Expected result:
After (v3):
Actual result:
Namely item
three
discarded becausestatus = null
, but onlystatus = hidden
should be discarded.Also in v2 it was possible to have a complex sorting query using multiple criteria, i.e. sort items with status first and then sort those based on priority.
I am missing something? 😅
Thanks!
Additional context
No response
Logs
The text was updated successfully, but these errors were encountered: