3 ms·
Thanks for sharing - author here. I've been working on this library for 2-3 months now, if somebody gives it a try let me know how it goes :) I'd be happy to
by lfittl 10y ago
Thanks for sharing - author here.
I've been working on this library for 2-3 months now, if somebody gives it a try let me know how it goes :)
I'd be happy to answer any questions as well.
- jaxn 10y agoDoes this have easy support for some kind of sub-tenant setup? Following your example, let's say that most customers have multiple departments and that most tables have both a customer_id and a department_id. Oh, and this looks solid. Nice work :)
- lfittl 10y agoThats a good question - there is nothing explicit for it, yet. You could probably do it nonetheless with Rails' own has_many/belongs_to relationships for that sub-tenant, but the automatic adding of department_id into queries wouldn't happen. Depending on what storage you end up using, that might matter or not. For example with Citus, you'd typically take the top-level tenant (customer_id) as a shard key, and just have all the departments of that tenant on the same node - so it would work fine.