Db-Postgres: optionally allow to store blocks / nested arrays as JSON #6212
r1tsuu
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
r1tsuu@54f922c quick implementation from these tests payload/test/fields/int.spec.ts Line 988 in 51149c7 changing to storeBlocksAsJSON: true don't pass only tests that are relying on rich text.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I really like Postgres adapter, and i didn't regret that I'm using it for an application project, i even have lots of custom SQL queries which i like more than MongoDB queries.
But i think i don't really need to have separated tables for blocks and maybe nested arrays (top level array is good though because i sometimes query on that and my
hasMany
relations are actually usually arrays with relation inside, because i nee)It only introduces more complicated schema which could lead to a long table name (yes we have for this fix now, but you still need to maintain that) and constraint keys. I'm still using MongoDB for websites exactly because of that, it doesn't play well for me with them because sometimes nesting is huge.
This would also remove needing of too many joins for blocks and as well improve performance where we don't really need joins i believe. Because i've never ever queried on a field nested to block, but if you have a different situation - it's optional and disabled by default.
What do you think guys? Any chance PR for this could be accepted?
Beta Was this translation helpful? Give feedback.
All reactions