Adding support for LTREE operators
#3356
ibarakaiev
started this conversation in
Feature requests
Replies: 1 comment 2 replies
-
|
It seems like we could support LTREE though it's not come up before so wouldn't be our first priority. cc @icehaunter is there alternative approaches here? And could we support LTREE reasonably well? I'm not sure if we've talked about the implications of supporting extensions e.g. different extensions could add conflicting syntax? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
First, let me say that Electric is an impressive piece of engineering—thanks for building it.
I've been working on setting up hierarchical authorization system to protected resources. Consider a documents table where documents can be shared across multiple departments via a join table:
departments:documents:document_department_access:User Authorization:
company.sales→ should seedoc1,doc2(documents shared with sales or any sub-department)company.sales.enterprise→ should only seedoc2(documents shared with enterprise, but NOT parent departments)With native
ltreesupport (and recentallow_subqueriesexperimental feature flag), setting up a shape to get live docs is straightforward:Without it, I either need to:
a) fetch all departments and documents to the client and do client-side filtering, which becomes a potential security issue, or
b) construct an explicit list of departments first in the backend proxy, e.g. something like:
and then pass into a dynamic list of
IN (...), which becomes complex and requires caching, shape invalidation etc.Perhaps this is beyond Electric's scope to begin with—if so, I'd be curious if anyone has any ideas on what's a better way to make reactive client-side sync for complex hierarchical authorization patterns like these.
Beta Was this translation helpful? Give feedback.
All reactions