Commit graph

754 commits

Author SHA1 Message Date
Zach Daniel
b93b1d722b improvement: support all_tenants? option for identities
improvement: support `all_tenants?` option for custom indexes
2024-01-12 10:11:16 -05:00
Zach Daniel
40c1a13652 fix: unset sort/distinct on related queries 2024-01-11 23:17:05 -05:00
Zach Daniel
f3ccb78f86 improvement: support join_filters on aggregates
fix: subquery relationships that have filters
2024-01-11 22:30:35 -05:00
Zach Daniel
9b5acd98f7 chore: credo, dialyzer, format 2024-01-10 08:34:23 -05:00
Zach Daniel
8bfa3ffa08 fix: don't overwrite manually set schema on lateral join query 2024-01-10 08:19:21 -05:00
Zach Daniel
8976ab6722 improvement: use the target action when generating related queries 2024-01-09 08:31:06 -05:00
Zach Daniel
a60dbf1725 fix: properly configure polymorphic_name option 2024-01-08 08:39:13 -05:00
Zach Daniel
65180ec3ac fix: honor configured schema on bulk create 2024-01-05 10:01:40 -05:00
Zach Daniel
f1d5d483a6 fix: properly gather types for operator & function overloads 2024-01-04 14:08:05 -05:00
Zach Daniel
3cb33723fe improvement: support latest ash version & operator overrides 2024-01-04 01:09:16 -05:00
Zach Daniel
c0c9621534 improvement: support new bulk operations
fix: support encoding errors with expressions in them
2023-12-31 08:40:30 -05:00
Zach Daniel
2a2fd30e33 improvement: support new return_query/2 callback
improvement: support new `:no_rollback` error signal
2023-12-29 21:49:34 -05:00
Zach Daniel
9d6c17f2c2 chore: remove inspect 2023-12-27 10:21:57 -05:00
Zach Daniel
6ff25bf342 improvement: require name when generating migrations 2023-12-27 10:08:13 -05:00
Zach Daniel
89a4363c1f improvement: support directly referencing aggregates from aggregates 2023-12-23 10:39:54 -05:00
Zach Daniel
46118a77ca improvement: support aggregates as get_path subject 2023-12-22 22:23:49 -05:00
Zach Daniel
32ef8e6834 chore: remove commented out code 2023-12-22 21:16:13 -05:00
Zach Daniel
68e2f74fe0 improvement: support aggregates using other aggregates
fix: various fixes for unnecessary aggregate additions
test: added a test to confirm context based multitenancy behavior
2023-12-22 21:14:40 -05:00
Zach Daniel
5d246cc23b chore: take proper args from codegen args 2023-12-22 15:11:49 -05:00
Zach Daniel
9bc5b2af9f improvement: support string_length and string_trim 2023-12-21 19:52:29 -05:00
Zach Daniel
9ca9272426 improvement: only start savepoints when necessary 2023-12-21 16:56:57 -05:00
Zach Daniel
8192d1eb3b improvement: clean up nested if statements to single case statements 2023-12-19 22:00:40 -05:00
Zach Daniel
61d229c685 fix: use lateral joins when joining to subquery w/ parent reference 2023-12-19 18:15:00 -05:00
Barnabas Jovanovics
c916034931
fix: replace upsert field with source in EXCLUDED fragment (#187) 2023-12-19 15:05:05 +01:00
Zach Daniel
5e0f3c4657 fix: handle strings in get_path 2023-12-15 18:11:18 -05:00
Zach Daniel
ac980a2163 chore: fix error expression 2023-12-15 08:48:20 -05:00
Zach Daniel
407a7163ed improvement: support for error/2 expression 2023-12-14 17:10:11 -05:00
Zach Daniel
54908395eb fix: reenable mix tasks that need calling 2023-12-06 18:53:37 -05:00
Zach Daniel
51f51d92d2 fix: properly cast lazy update defaults to target type 2023-12-04 14:55:40 -05:00
Zach Daniel
07499b6ec0 fix: use maps for composite_type instead of tuples 2023-11-29 10:27:10 -05:00
Zach Daniel
74ef0aa6c3 improvement: support composite_type/2 expression 2023-11-29 09:57:10 -05:00
Zach Daniel
47e378e196 chore: fix dialyzer 2023-11-29 09:22:51 -05:00
Zach Daniel
592e79a2f9 improvement: support composite types 2023-11-27 17:47:54 -05:00
Zach Daniel
dc984e83c7 fix: avoid empty error on upserts with :nothing
docs: add some small docs for custom extensions
2023-11-27 11:12:22 -05:00
Barnabas Jovanovics
9c5dd0304e
chore: remove IO.inspect (#185) 2023-11-22 14:43:44 -05:00
Zach Daniel
5cf9affff4 fix: simplify aggregate bindings & calculation reference building 2023-11-22 14:07:18 -05:00
Zach Daniel
8e8da855b2 chore: fix dialyzer error 2023-11-21 09:44:10 -05:00
Zach Daniel
28f2861036 improvement: optimize relationships with identity on other end 2023-11-21 09:25:24 -05:00
Riccardo Binetti
021b7e4233
improvement: allow specifying multi-column foreign keys (#180)
* improvement: add match_with option on references
* improvement: add match_type option on references
2023-11-20 16:52:50 -05:00
Zach Daniel
fcda627050 fix: hydrate aggregate refs when adding for calculations 2023-11-20 07:05:47 -05:00
Zach Daniel
48e8a414da chore: add error context to hydrate references 2023-11-20 06:38:43 -05:00
Zach Daniel
944a4e128e chore: format and fix matrix 2023-11-17 09:17:11 -05:00
Zach Daniel
bdcbd647f3 fix: apply limit to from_many? relationship joins 2023-11-17 09:03:25 -05:00
Zach Daniel
33bd0a7061 fix: properly add filters for exists aggregates
closes: #173
2023-11-17 07:46:43 -05:00
Zach Daniel
c6e6633a9a fix: properly expand calculation values across aggregate invocations 2023-11-17 04:01:35 -05:00
Zach Daniel
abbbddf726 fix: don't add filter for no_attributes? relationships 2023-11-16 18:08:12 -05:00
Zach Daniel
ae90b66056 chore: credo/dialyzer 2023-11-16 17:55:27 -05:00
Zach Daniel
39754d1f38 fix: handle no_attributes? flag on aggregates better
fix: properly handle sorted relationships in aggregates
2023-11-16 17:48:39 -05:00
Zach Daniel
f62eef176a chore: remove testing variable 2023-11-16 11:15:11 -05:00
Zach Daniel
ef96cd541e fix: use synonymous_relationship_path when looking up ref bindings 2023-11-16 11:02:24 -05:00
Zach Daniel
4f5312a089 fix: add calculation context to calculation expressions 2023-11-16 08:31:50 -05:00
Zach Daniel
4d672ba088 fix: don't append update_defaults automatically if upsert_fields was set 2023-11-15 16:08:44 -05:00
Zach Daniel
ce628384d2 fix: don't ensure repo compiled at compile time 2023-11-14 13:59:30 -05:00
Zach Daniel
2b29f728e2 fix: handle additional case for new functional repo callback 2023-11-14 12:59:42 -05:00
Zach Daniel
db8255e5b1 improvement: support a 2 argument function for the repo option 2023-11-14 10:56:22 -05:00
Zach Daniel
cae89d856e fix: get resource from proper bindings on exists query 2023-11-13 17:42:37 -05:00
Zach Daniel
082210933f improvement: spport CURRENT_DATE default 2023-10-27 10:33:03 -04:00
Zach Daniel
bc4b69a568 chore: ensure type is compiled 2023-10-27 00:06:55 -04:00
Zach Daniel
342920a3c4 improvement: support parent in sort expressions 2023-10-26 09:47:56 -04:00
Zach Daniel
ad9d18aecb improvement: join relationships for aggregate filters 2023-10-25 12:59:03 -04:00
Zach Daniel
9769d995b3 chore: fix unused variable 2023-10-25 08:44:32 -04:00
Zach Daniel
53bb5941e8 fix: don't traverse new types for storage type 2023-10-24 12:54:31 -04:00
Zach Daniel
52302046e1 fix: properly join to related references in relationship filters 2023-10-24 12:25:23 -04:00
Zach Daniel
0325196a20 improvement: allow for combining AshPostgres.Repo with other repos
fixes #172
2023-10-13 22:47:11 -04:00
Zach Daniel
cd6a7cae69 fix: don't raise all errors 2023-10-11 16:26:48 -04:00
Zach Daniel
1a6e469e57 improvement: support atomics on upserts 2023-10-11 15:17:50 -04:00
Zach Daniel
c6d71d74bf fix: fix type specification for foreign_key_names 2023-10-10 15:47:53 -04:00
Zach Daniel
f67db5ee6d chore: handle ci_string type as storage type 2023-10-10 14:16:25 -04:00
Zach Daniel
9f62d65215 improvement: support :ci_string as a storage_type 2023-10-10 14:12:25 -04:00
Zach Daniel
772c12b5a3 fix: don't run main query if only exists aggs are specified
fixes: #170
2023-10-10 09:43:09 -04:00
Zach Daniel
270d8685e7 improvement: support to-one references in calculations 2023-10-09 18:57:06 -04:00
Zach Daniel
5fdc81bf06 fix: subquery aggregate if limit is applied 2023-10-03 12:56:44 -04:00
Alessio Montagnani
0adec1d163
* improvement: in multitenant resources migration's generation, check if the relationship points at the primary key of the target then not adding the multitenancy attribute (#144 and #157) 2023-09-25 15:33:28 -04:00
Zach Daniel
99e8029499 improvement: fix upsert_fields behavior for upserts 2023-09-25 15:32:20 -04:00
Zach Daniel
b00dcf20c9 chore: format & fix docs 2023-09-22 17:16:47 -04:00
Zach Daniel
cca5f0244b chore: fix type names I just broke 2023-09-22 17:04:39 -04:00
Zach Daniel
a56f4ef52f docs: overhaul hexdocs 2023-09-22 16:14:25 -04:00
Zach Daniel
49490e6fb4 improvement: support data_layer_context option on transactions
chore: refactor create/upsert to use bulk create
2023-09-22 15:43:17 -04:00
Dmitry Maganov
b03fb51c36
fix: use :wrap_list type instead of custom validaitons (#167) 2023-09-21 15:44:02 -04:00
Zach Daniel
81ce903e61 improvement: add AshPostgres.Tsvector 2023-09-20 17:28:24 -04:00
Zach Daniel
b35f8c715b improvement: add AshPostgres.Tsquery 2023-09-20 16:41:32 -04:00
Zach Daniel
e8a4b41758 improvement: support vector types and vector_cosine_distance 2023-09-11 22:34:51 -04:00
James Harton
6cc88c82b4
improvement: Allow resources to opt out of the primary key requirement. (#166) 2023-09-06 01:18:57 -04:00
Zach Daniel
5182a1c6d0 improvement: implement ash lifecycle tasks 2023-09-04 13:08:14 -04:00
Zach Daniel
33eb4f9fb7 improvement: better error message for missing table config 2023-09-04 11:25:03 -04:00
Zach Daniel
3f4f8c1d32 fix: ensure we always select at least one field, and change one field 2023-08-31 16:11:29 -04:00
Zach Daniel
1359068a69 fix: use provided values for updates 2023-08-31 16:03:23 -04:00
Zach Daniel
9f77304b22 fix: don't clobber loaded data on update 2023-08-31 13:04:08 -04:00
Zach Daniel
5a4a52854b
improvement: support atomics (#165) 2023-08-28 16:18:56 -04:00
Zach Daniel
cbde3958f3 fix: properly handle ensure nsted calls to get_path are jsonb 2023-08-23 12:54:25 -04:00
Zach Daniel
8fc0f8149c fix: properly provide constraints on all type casting 2023-08-22 15:29:33 -04:00
Zach Daniel
99b2a5631c improvement: support in-line aggregates
fix: support non-atom named aggregates
2023-08-22 14:51:31 -04:00
Zach Daniel
8a6f51efb5 improvement: specify @behaviour in AshPostgres.Type 2023-08-21 11:14:33 -04:00
Zach Daniel
c8aa2a8dd8 improvement: add value_to_postgres_default/3 and AshPostgres.Type 2023-08-18 11:22:01 -04:00
Zach Daniel
d36457336b fix: handle case where multiple grouped aggregates depend on further aggregates 2023-08-16 23:02:56 -04:00
Zach Daniel
c570d5f60e improvement: handle non-cast-in-type queries 2023-08-14 12:42:01 -07:00
Alessio Montagnani
4a02d8c6ad
improvement: custom-extension implementation (#162)
* improvement: custom-extension implementation

* improvement: allow adding custom-extension by module's reference and fixes formatting

* ci: fixes formatter
2023-08-08 10:20:26 -07:00
Zach Daniel
7ce33cac2c fix: handle interaction between distinct, join filters and sort 2023-08-04 22:52:56 -04:00
Zach Daniel
d568ac18a8 improvement: support new from_many? option
improvement: subquery after distinct to handle distinct
2023-08-04 18:53:23 -04:00
Zach Daniel
3d8c4c7687 fix: properly detect optimizable first aggregates 2023-07-31 23:50:50 -04:00
Zach Daniel
83e78ad786 fix: properly alter deferrability on attribute alter 2023-07-27 13:57:42 -04:00
Zach Daniel
4724e9b878 improvement: handle empty maps in migration defaults automatically 2023-07-27 11:22:41 -04:00
Zach Daniel
e37b04c170 improvement: handle empty lists in migraiton defaults automatically 2023-07-27 11:22:06 -04:00
Zach Daniel
4146e6c25a improvement: apply sort in subqueries properly 2023-07-26 19:20:19 -04:00
Zach Daniel
b4ec957651 improvement: handle no_attributes? better in more places 2023-07-26 18:50:58 -04:00
Zach Daniel
d2e309c126 improvement: support the new parent/1 expr in relationships 2023-07-26 17:32:09 -04:00
Zach Daniel
9396a9dd2d improvement: explicitly lock the source row 2023-07-25 23:08:56 -04:00
Zach Daniel
97a9ca5872 improvement: properly handle context for referenced calculations 2023-07-20 21:57:44 -04:00
Zach Daniel
c7866c6c16 improvement: support new distinct_sort option 2023-07-19 12:50:05 -04:00
Zach Daniel
442191799e fix: type casting improvements, handle manual relationships in exists 2023-07-19 10:20:37 -04:00
Michael St Clair
33c1fd4cd9
fix: protected names in conflict_target (#158) 2023-07-18 19:21:45 -04:00
Zach Daniel
c920b09277 improvement: support new distinct features from ash core 2023-07-18 14:48:35 -04:00
Zach Daniel
ed62006b3f improvement: support unary -/1 operator 2023-07-17 22:35:46 -04:00
Zach Daniel
b4879beb86 improvement: support deferrable option in migration generator 2023-07-14 16:24:57 -04:00
Zach Daniel
062e67392a fix: convert Ash.Resource.Aggregate to Ash.Query.Aggregate when adding 2023-07-13 23:27:08 -04:00
Zach Daniel
d2e071773e improvement: support exists aggregates 2023-07-13 00:13:50 -04:00
Zach Daniel
11ad5f4d1b improvement: support at/2 expression 2023-07-12 17:05:33 -04:00
Zach Daniel
1827e8f656 improvement: better ash_functions message 2023-07-12 15:32:18 -04:00
Zach Daniel
c1a630ee16 improvement: support string_split 2023-07-12 15:16:28 -04:00
Zach Daniel
a09dae4d26 fix: raise better error on invalid filter values
closes #154

We still want to build something better directly into `Ash.Filter`
that determines field types and casts them up front
2023-06-28 11:29:54 -04:00
Eduardo B. A
4171ef851d
fix: Fixes multiple schema identities migrations (#156)
Co-authored-by: Eduardo <sezdocs@dev-distrobox.fedora.local>
2023-06-25 17:26:31 -04:00
Alan Heywood
7ab8ede626
fix: fix Logger deprecations for elixir 1.15 (#155)
Use Logger.warning instead of Logger.warn, which is deprecated
2023-06-22 17:37:57 -04:00
Zach Daniel
0e6bcd047e improvement: add simple_join_first_aggregates option 2023-06-11 20:33:20 -04:00
Dmitry Maganov
29815eb6ec
fix: interpolate table names with inspect in generated migrations (#152) 2023-06-07 10:37:10 -04:00
Zach Daniel
34cc3196f4 fix: handle changing custom index names better
fix: validate custom index names
2023-06-06 01:33:50 -04:00
Zach Daniel
d8e4801c8d chore: remove bad typespec 2023-06-05 18:43:03 -04:00
Zach Daniel
6712943e74 fix: properly handle nested aggregate references 2023-06-05 18:35:22 -04:00
Zach Daniel
4a57a300da fix: handle raised errors in bulk actions 2023-05-22 21:17:30 -04:00
Zach Daniel
f59bbee443 improvement: raise better errors on conflicting locks 2023-05-17 13:17:37 -04:00
Zach Daniel
ec61c3f000 fix: use proper lock list again 2023-05-16 15:20:27 -04:00
Zach Daniel
7fc590d632 fix: use proper list of row level locks 2023-05-16 15:19:47 -04:00
Zach Daniel
0db9d0d03f improvement: support more lock types 2023-05-16 15:14:45 -04:00
Zach Daniel
41a2e4f1d1 fix: check changeset.action_type not changeset.action.type 2023-05-15 15:59:21 -04:00
Zach Daniel
b457c3052e test: fix tests using filter option on aggregates 2023-05-10 23:14:55 -04:00
Zach Daniel
333c3ad95d improvement: support changeset.filters (for optimistic locking) 2023-05-08 15:54:43 -04:00
Zach Daniel
2bf6725fcb chore: fix bulk upserts 2023-05-02 22:19:01 -04:00
Zach Daniel
08a0a926e5 improvement: support bulk upserts 2023-05-02 22:16:21 -04:00
Zach Daniel
d969b2eef9 fix: don't incorrectly mark references as primary key references 2023-05-01 18:03:55 -04:00
Zach Daniel
ab18c85bd4 chore: remove commented out code 2023-05-01 14:03:39 -04:00
Zach Daniel
cd821cc153 fix: go back to old migration sorting algorithm
closes: #139
2023-05-01 10:51:09 -04:00
Zach Daniel
805de0f2f1 improvement: support locking 2023-04-27 21:49:13 -04:00
Zach Daniel
5d50b98298 improvement: handle new spark versions better, more explicit snapshots 2023-04-26 22:23:43 -04:00
Zach Daniel
d417361012 fix: subquery aggregates when a distinct is being added 2023-04-22 01:17:38 -06:00
Zach Daniel
aec9e1578e improvement: don't call .table on nil snapshot 2023-04-19 17:32:37 -06:00
Zach Daniel
86e02d2fe9 fix: don't call .table on nil 2023-04-18 22:44:19 -04:00
Zach Daniel
3be85c477a fix: wrap datetime_add in parenthesis 2023-04-16 15:38:25 -04:00
Zach Daniel
d954825b7e chore: update ecto in lock & fix warnings
fixes: #138
2023-04-12 10:44:43 -04:00
Zach Daniel
525dcc9f91 improvement: use digraph for operation ordering
fix: handle primary key changes properly

Doing this involves dropping all foreign keys using it, and dropping the existing
primary key before creating the new one.
2023-04-11 17:41:53 -04:00
Zach Daniel
7952a515fe fix: properly handle newtypes, add test 2023-04-07 10:56:06 -04:00
Zach Daniel
c72210adff chore: keep constraints on attribute in migration generator 2023-04-07 10:29:45 -04:00
Zach Daniel
bb2e3a3b9b fix: honor newtypes when determining migration type 2023-04-07 10:12:32 -04:00
Zach Daniel
a9cbf9b7c7 fix: handle nil ash_functions_version in another place 2023-04-06 12:13:26 -04:00
Zach Daniel
f19426789a fix: handle nil ash_functions_version 2023-04-06 12:10:13 -04:00
Zach Daniel
a2e4ee4704 chore: fix dialyzer 2023-04-05 12:32:28 -04:00
Zach Daniel
9faf783c54 chore: unlock spark dependency 2023-03-23 17:19:45 -04:00
Zach Daniel
54150b20ca chore: small improvement inspect/errors on ecto changeset 2023-03-20 16:11:05 -04:00
Zach Daniel
5046273ed0 fix: properly map parent bindings in exists 2023-03-17 17:06:06 -04:00
Zach Daniel
3ff49c4fcb improvement: support new date expressions 2023-03-03 12:11:29 -05:00
Zach Daniel
d07083e642 improvement: add aggregates used by sorts 2023-02-21 19:45:07 -05:00
Zach Daniel
b4fa4d0d9d chore: update ash_postgres and fix credo 2023-02-21 10:26:36 -05:00
Darren Black
587182998e
improvement: Implement string_join expr (#132) 2023-02-21 10:21:53 -05:00
Zach Daniel
49b94fd183 fix: don't use :distinct when uniq? is not true 2023-02-17 15:21:50 -05:00
Zach Daniel
03f8fee3d1 fix: exclude order_by when building aggregates 2023-02-16 16:12:28 -05:00
Zach Daniel
67132c41bd fix: properly find migration directories in umbrella apps 2023-02-16 15:23:50 -05:00
Zach Daniel
48488c7bad fix: don't double-cast to array for list aggregates 2023-02-13 13:30:47 -05:00
Zach Daniel
128d8a2be8 improvement: significantly optimize aggregate queries 2023-02-12 23:18:08 -05:00
Zach Daniel
589fb4d620 improvement: better type casting for concat operator 2023-02-12 19:09:25 -05:00
Zach Daniel
bbb45f3622 fix: sorting on optimized first aggregates 2023-02-09 17:49:37 -05:00
Zach Daniel
8e8a308cd2 improvement: support new uniq? option on count/list aggregates 2023-02-09 16:09:44 -05:00
Zach Daniel
b76289f39f docs: add AshPostgres module to the documentation 2023-02-08 22:56:00 -05:00
Zach Daniel
80cd06818d improvement: optimized first aggregates where possible 2023-02-08 14:46:29 -05:00
Zach Daniel
8d45e92fc2 fix: do limit/offset outside of query if distinct is required 2023-02-07 19:15:44 -05:00
Zach Daniel
b41d383b47 fix: load by __order__ ascending 2023-02-07 17:43:53 -05:00
zimt28
d0bc394e36
fix: Actually use AshPostgres.Repo behaviour (#129) 2023-02-05 12:46:44 -05:00
Zach Daniel
93e2a786f4 improvement: authorization filters are now attached by ash core 2023-02-04 01:56:06 -05:00
Zach Daniel
dc74dd534c fix: properly set next migration name 2023-02-03 11:44:34 -05:00
Zach Daniel
cc643393d9 improvement: add migration_ignore_attributes
chore: update ash, fix ci
2023-02-01 02:05:04 -05:00
Zach Daniel
42ec9cf46a fix: override insert function for proper ecto interop 2023-01-29 20:27:43 -05:00
Zach Daniel
b52da94b32 fix: properly convert to/from ecto, only when necessary 2023-01-29 18:20:59 -05:00
Zach Daniel
ce3cb0f2df fix: support latest ecto interop changes in ash core 2023-01-27 20:54:40 -05:00
Zach Daniel
49c55eaac4 improvement: properly cast division to floats for elixir-y behavior 2023-01-26 23:48:19 -05:00
Zach Daniel
a9d46e0163 improvement: support for dynamically set repo 2023-01-19 09:33:19 -05:00
Zach Daniel
c9abef6e2c chore: remove doc index 2023-01-18 01:00:23 -05:00
Zach Daniel
ee97fde9dc fix: nest subqueries when required for distinct
fix: replace `{:in, ...}` type with `{:array, ...}`
2023-01-17 09:57:05 -05:00
Zach Daniel
91f9d9b9b2 fix: allow for non attribute aggregate references for first/list 2023-01-11 07:51:12 -05:00
Zach Daniel
79f84041ae fix: properly join to all required relationships 2023-01-09 13:56:05 -05:00
Zach Daniel
1aab3dd7e3 fix: properly type cast in fragments (and elsewhere) 2023-01-09 09:48:25 -05:00
Zach Daniel
c15a6e4613 fix: undo changes that caused type casting bugs 2023-01-06 17:45:10 -05:00
Zach Daniel
3c496512e2 fix: use parent_expr instead of this
fix: various expression & type building fixes
2023-01-06 17:05:23 -05:00
Zach Daniel
475ec0f1ca feat: support latest ash 2023-01-04 12:36:18 -05:00
Zach Daniel
7f3f02fc44 chore: optimize binding calculation 2022-12-31 09:22:12 -05:00
Zach Daniel
5a7f42fac1 improvement: support calc constraints 2022-12-28 23:11:55 -05:00
Zach Daniel
301962cbb1 fix: honor calculation constraints 2022-12-28 23:01:19 -05:00
Zach Daniel
87617f8d97 improvement: support new cast_in_query?/2 2022-12-28 22:41:32 -05:00
Zach Daniel
301466e1b5 improvement: support calculations as aggregate targets
fix: handle lists with expressions inside
2022-12-28 22:08:07 -05:00
Zach Daniel
4f91e65d51 fix: properly set migrations_path default in umbrellas 2022-12-27 18:19:18 -05:00
Zach Daniel
eac649e5fb fix: don't subquery unless we have to 2022-12-21 23:59:27 -05:00
Zach Daniel
e81e77840a fix: don't group aggregates that reference relationships in their filters 2022-12-21 16:58:12 -05:00
Zach Daniel
09b19c8bfd improvement: add like and ilike 2022-12-21 16:12:49 -05:00
Zach Daniel
5a9abdc69c fix: properly skip unique indexes when configured 2022-12-21 02:16:30 -05:00
Zach Daniel
a5b1bc8a3f fix: properly add aggregates to query when referenced from calculations
fixes: #127
2022-12-18 02:23:39 -05:00
Zach Daniel
bfefef7fd5 improvement: distinct on source of query, not relationship destination 2022-12-15 17:16:53 -05:00
Zach Daniel
5987515b8d fix: properly combine sort + to many join filter 2022-12-14 22:37:10 -05:00
Zach Daniel
46f3676e9a improvement: udpate to latest ash, fix array issues 2022-12-14 21:47:50 -05:00
Zach Daniel
10fe4541d5 fix: pattern match error in lazy_non_matching_defaults/1 2022-12-13 17:17:57 -05:00
Zach Daniel
87bada531f fix: use attribute name not attribute for default funs 2022-12-13 17:14:12 -05:00
Zach Daniel
891974caf3 fix: *actually* fix default_fun upserts 2022-12-13 17:12:06 -05:00
Zach Daniel
cdca33a5ff fix: fix upserting update_defaults 2022-12-13 17:06:39 -05:00
Zach Daniel
98418599f9 chore: release version v1.2.0 2022-12-13 14:55:26 -05:00
Zach Daniel
9d6996be25 fix: make migration generator work better for umbrellas 2022-12-13 13:31:57 -05:00
Zach Daniel
70645af88f fix: don't make migration generation recursive 2022-12-10 18:54:09 -05:00
Zach Daniel
48cfadc1fc fix: nevermind, can't make migrate recursive 2022-12-10 16:20:41 -05:00
Zach Daniel
eebd40459a improvement: make migrate task recursive as well 2022-12-10 16:17:10 -05:00
Zach Daniel
9a7626ab46 improvement: mark generate_migrations as recursive for umbrellas 2022-12-10 16:13:25 -05:00
Zach Daniel
68c6d7aaf8 improvement: better error messages from mix tasks
fix: various broken behavior from new aggregate work
improvement: validate that references refer to relationships

closes #99
2022-12-10 15:59:50 -05:00
Zach Daniel
d832e9a4ef fix: forgot a 2022-12-07 21:44:19 -05:00
Zach Daniel
e271a27d3c improvement: avg/min/max/custom aggregate support
fix: fix various problems with the model behind aggregates
2022-12-07 20:32:38 -05:00
Zach Daniel
ee8e77dca4 fix: properly set binding names for many to many join filters 2022-12-04 15:01:24 -05:00
Zach Daniel
3e3740c6f9 improvement: fix lateral many to many joins 2022-12-04 13:16:45 -05:00
Zach Daniel
52fcba79ac improvement: inform users about postgres incompatibility with multidimensional arrays 2022-12-01 20:24:49 -05:00
Zach Daniel
2b986863ff docs: document on_transaction_begin 2022-11-30 20:52:36 -05:00
Zach Daniel
c035eed21a fix: properly turn custom index keys into atoms
improvement: support new transaction info with hooks
2022-11-30 19:06:51 -05:00
Zach Daniel
059837651d improvement: add unique constraints to changeset for custom unique indexes
improvement: separate out concurrent index creations and do them in a separate transaction
2022-11-25 14:06:22 -05:00
Zach Daniel
061a1993e3 chore: format/lint 2022-11-21 03:08:04 -05:00
Zach Daniel
db3166ff88 Revert "improvement: use uuid_generate_v4() to eliminate need for uuid-ossp just for uuid defaults"
This reverts commit e0d7f0d0c0.
2022-11-21 02:42:26 -05:00
Zach Daniel
8f064db2f0 chore: work on tests for migration_defaults 2022-11-21 02:39:57 -05:00
Zach Daniel
26668df73d improvement: add migration_defaults for customizing default values 2022-11-21 02:38:00 -05:00
Zach Daniel
e0d7f0d0c0 improvement: use uuid_generate_v4() to eliminate need for uuid-ossp just for uuid defaults
Thanks to @sevenseacat for pointing this out!
2022-11-21 02:14:47 -05:00
Zach Daniel
9b97556335 wip 2022-11-21 02:14:47 -05:00
Zach Daniel
45356d6cce WIP 2022-11-21 02:14:47 -05:00
Zach Daniel
63d007131f
fix: don't use hard-coded join assoc name (#118) 2022-11-13 11:38:00 -05:00
Kyle Grinstead
a88687c1d5
fix: && operator in expressions to point to ash_elixir_and (#115) 2022-10-24 22:13:12 -06:00
Zach Daniel
e3db7d2fa9 improvement: add check for unsupported expression 2022-10-20 01:20:09 -04:00
Zach Daniel
13413d3cc7 feat: support now() in latest Ash 2022-10-20 01:08:35 -04:00
Zach Daniel
5222e1e755 improvement: handle UUID types better 2022-10-17 08:40:32 -05:00
Zach Daniel
fb8a13f33d improvement: set lateral join source for latest ash
improvement: use `prepend?: true` option when applying relationship sorts
2022-10-15 00:03:16 -05:00
Zach Daniel
a8b44fef0f fix: no unnecessary type cast on count/sum aggregates 2022-10-10 12:12:17 -04:00
Zach Daniel
7fd1e73baa fix: don't apply filter to array_agg 2022-10-10 12:06:54 -04:00
Zach Daniel
b7b5758134 improvement: update to the latest ash
improvement: remove the need to dynamically expand fragments
2022-10-07 15:50:20 -04:00
Zach Daniel
435d5216b8 fix: handle custom calculation selects properly
improvement: when casting string to uuid, dump to binary
2022-10-05 15:06:09 -04:00
Zach Daniel
94edf64322 fix: use attribute source for identity fields 2022-10-04 16:13:52 -04:00
Zach Daniel
3b1b90d7ab chore: add mix tasks to doc index 2022-09-28 23:27:46 -04:00
Zach Daniel
12cf97d89e fix: never attempt to group custom operations 2022-09-28 22:21:37 -04:00
Zach Daniel
fd5ac60072 improvement: exists filters necessitate multiple aggregate joins (for now) 2022-09-28 18:01:20 -04:00
Zach Daniel
49732b42e2 fix: wrap case statement in parens 2022-09-28 16:47:07 -04:00
Zach Daniel
6ad57501ff improvement: upgrade to new exists usage 2022-09-25 14:41:29 -04:00
Zach Daniel
e8643d4aa0 fix: properly type cast top level fragments
chore: update tests not to use deprecated helper
2022-09-21 13:36:18 -04:00
Zach Daniel
31d0ec20ac improvement: support latest ash 2022-09-20 23:00:29 -04:00
Darren Black
b0292d66f8
improvement: implement Length function (#111) 2022-09-15 16:51:49 -04:00
Zach Daniel
7fc6c91cac improvement: support manual relationships with joins 2022-09-13 16:40:12 -04:00