Commit graph

68 commits

Author SHA1 Message Date
Zach Daniel
cea4b70a51 improvement: no need for subquery for simple table aliases 2024-02-29 20:20:33 -05:00
Zach Daniel
2c8c993cf9 chore: optimization/cleanups 2024-02-29 13:01:53 -05:00
Zach Daniel
4db1b80eb1 fix: ensure that from_many? joins are properly limited
fix: ensure that lateral joins are properly filtered
2024-02-29 09:22:37 -05:00
Zach Daniel
bc9718d063 chore: fix dialyzer 2024-02-28 23:42:48 -05:00
Zach Daniel
f716e3bb69 fix: simplify(and fix) exists subquery generation 2024-02-28 22:55:53 -05:00
Zach Daniel
2b3b6b0bc9 fix: properly leverage subqueries throughout relationship joining 2024-02-28 21:22:54 -05:00
Zach Daniel
61045700a2 chore: clarify join semantics 2024-02-28 21:22:54 -05:00
Zach Daniel
5052463767 fix: properly apply lateral join conditions to left lateral joins 2024-02-22 07:31:06 -05:00
Zach Daniel
38d1beb0d8 fix: properly handle to_many joins in aggregates
fix: honor aggregate query filters
2024-02-20 18:38:35 -05:00
Dmitry Maganov
46928521c0
fix: use proper tables in joins originating from polymorphic resource (#211) 2024-02-20 11:15:56 -05:00
Zach Daniel
9edde198ef fix: joining to from_many?: true relationships not honoring limit 2024-02-19 09:27:16 -05:00
Zach Daniel
cde117e18b fix: don't subquery if we need to reference parent_as 2024-02-15 23:06:24 -05:00
Zach Daniel
bdcf97a638 fix: avoid double wrapping in subqueries 2024-02-15 22:58:11 -05:00
Zach Daniel
fd746a784c fix: properly set 0 binding on joined subquery creation
fixes #208
2024-02-15 11:57:17 -05:00
Zach Daniel
8c43deea9b fix: properly build subqueries when required for relationship queries 2024-01-30 15:21:59 -05:00
Dmitry Maganov
8f3100a381
fix: keep fields of custom_index in format that they were provided (#195) 2024-01-22 11:32:34 -05:00
Zach Daniel
445de282c0 fix: remap selected fields, don't subquery in aggregate joins 2024-01-19 20:13:42 -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
8976ab6722 improvement: use the target action when generating related queries 2024-01-09 08:31:06 -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
9ca9272426 improvement: only start savepoints when necessary 2023-12-21 16:56:57 -05:00
Zach Daniel
61d229c685 fix: use lateral joins when joining to subquery w/ parent reference 2023-12-19 18:15:00 -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
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
db8255e5b1 improvement: support a 2 argument function for the repo option 2023-11-14 10:56:22 -05:00
Zach Daniel
ad9d18aecb improvement: join relationships for aggregate filters 2023-10-25 12:59:03 -04:00
Zach Daniel
52302046e1 fix: properly join to related references in relationship filters 2023-10-24 12:25:23 -04:00
Zach Daniel
270d8685e7 improvement: support to-one references in calculations 2023-10-09 18:57:06 -04: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
d568ac18a8 improvement: support new from_many? option
improvement: subquery after distinct to handle distinct
2023-08-04 18:53:23 -04:00
Zach Daniel
d2e309c126 improvement: support the new parent/1 expr in relationships 2023-07-26 17:32:09 -04:00
Zach Daniel
0e6bcd047e improvement: add simple_join_first_aggregates option 2023-06-11 20:33:20 -04:00
Zach Daniel
6712943e74 fix: properly handle nested aggregate references 2023-06-05 18:35:22 -04:00
Zach Daniel
d954825b7e chore: update ecto in lock & fix warnings
fixes: #138
2023-04-12 10:44:43 -04:00
Zach Daniel
5046273ed0 fix: properly map parent bindings in exists 2023-03-17 17:06:06 -04:00
Zach Daniel
bbb45f3622 fix: sorting on optimized first aggregates 2023-02-09 17:49:37 -05:00
Zach Daniel
80cd06818d improvement: optimized first aggregates where possible 2023-02-08 14:46:29 -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
79f84041ae fix: properly join to all required relationships 2023-01-09 13:56:05 -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
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
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