| ▲ | 3eb7988a1663 a day ago |
| I have never done it, but I believe you could setup multiple schemas under the same database -by faking it as different databases and then use a custom router to flip between them as you like. That sounds like the path to madness, but I do believe it would work out of the box. |
|
| ▲ | dnautics a day ago | parent [-] |
| sounds inconvenient and error-prone |
| |
| ▲ | 3eb7988a1663 a day ago | parent [-] | | It is not much code to setup the router. Now, why you would want to bounce between schemas, I do not have a good rationale, but whatever floats your boat. | | |
| ▲ | dnautics 12 hours ago | parent [-] | | yeah some frameworks call these "lenses". There's even crazy people who write lenses on top of elixir schemas because they dont realize you can just have multiple schemas. maybe more concretely: if you have a table with a kajillion columns and you want performant views onto some column (e.g. "give me the metadata only and dont show me blobs columns") without pulling down the entire jungle in the sql request, There's that. |
|
|