mirror of
https://github.com/ash-project/ash_postgres.git
synced 2024-09-19 21:13:19 +12:00
A postgresql datalayer for the Ash Framework
.github | ||
config | ||
lib | ||
test | ||
.check.exs | ||
.credo.exs | ||
.formatter.exs | ||
.gitignore | ||
CHANGELOG.md | ||
LICENSE | ||
mix.exs | ||
mix.lock | ||
README.md |
AshPostgres
TODO
Configuration
- Need to figure out how to only fetch config one time in the configuration of the repo.
Right now, we are calling the
installed_extensions()
function in bothsupervisor
andruntime
but that could mean checking the system environment variables every time (is that bad?) - Figure out heuristics for when to left join/right join (alternatively, make it configurable via the query language)
For instance, if a relationship has a non-nil predicate applied to it in all
ors
or a singleand
then we should be able to inner join. I have learned from experience that no single approach here will be a one-size-fits-all. We need to either use complexity metrics, hints from the interface, or some other heuristic to do our best to make queries perform well. For now, I'm just choosing the most naive approach possible: left join to relationships that appear inor
conditions, inner join to conditions that are constant the query (dont do this yet, but it will be a good optimization) Realistically, in my experience, joins don't actually scale very well, especially when calculated attributes are added.