Commit graph

269 commits

Author SHA1 Message Date
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
805de0f2f1 improvement: support locking 2023-04-27 21:49:13 -04:00
Zach Daniel
d417361012 fix: subquery aggregates when a distinct is being added 2023-04-22 01:17:38 -06:00
Zach Daniel
d954825b7e chore: update ecto in lock & fix warnings
fixes: #138
2023-04-12 10:44:43 -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
03f8fee3d1 fix: exclude order_by when building aggregates 2023-02-16 16:12:28 -05:00
Zach Daniel
128d8a2be8 improvement: significantly optimize aggregate queries 2023-02-12 23:18:08 -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
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
a9d46e0163 improvement: support for dynamically set repo 2023-01-19 09:33:19 -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
eac649e5fb fix: don't subquery unless we have to 2022-12-21 23:59:27 -05:00
Zach Daniel
09b19c8bfd improvement: add like and ilike 2022-12-21 16:12:49 -05:00
Zach Daniel
5987515b8d fix: properly combine sort + to many join filter 2022-12-14 22:37:10 -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
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
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
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
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
26668df73d improvement: add migration_defaults for customizing default values 2022-11-21 02:38:00 -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
7fd1e73baa fix: don't apply filter to array_agg 2022-10-10 12:06:54 -04:00
Zach Daniel
fd5ac60072 improvement: exists filters necessitate multiple aggregate joins (for now) 2022-09-28 18:01:20 -04:00
Zach Daniel
7fc6c91cac improvement: support manual relationships with joins 2022-09-13 16:40:12 -04:00
Zach Daniel
170b9fc9e7 improvement: support latest ash exists/2 expr 2022-09-06 18:33:17 -04:00
Zach Daniel
385214694d docs: total docs reorg 2022-08-24 12:07:38 -04:00
Zach Daniel
4a69edce2d important: update to ash 2.0 branch 2022-08-24 12:07:38 -04:00
Zach Daniel
e20e68e73a improvement: add custom_statements to migration generator 2022-07-21 13:34:38 -04:00
Zach Daniel
0f9a433c95 improvement: support || and && 2022-07-20 14:19:06 -04:00
Zach Daniel
c52917bca1 improvement: set update_defaults on upsert results 2022-07-06 14:44:18 -04:00
Zach Daniel
c352a1f1fa fix: support upsert_identity with base_filter 2022-07-01 19:12:14 -04:00
Zach Daniel
10c7e75f4a chore: small cleanups 2022-06-04 16:58:03 -04:00
Zach Daniel
d04fd201f2 fix: test and confirm behavior of schemas 2022-05-22 18:30:20 -04:00
Zach Daniel
ff05084b8f improvement: add explicit timeout capability declaration 2022-05-14 02:58:04 -04:00
Zach Daniel
6c5ee9aae5 improvement: add static schema specification in DSL
improvement: support static schema specification in migration generator
2022-05-13 17:41:30 -04:00
Zach Daniel
4e85466724 fix: handle combinations of distinct & sort
closes #93
2022-05-10 22:48:04 -04:00
Zach Daniel
662bf421c4 improvement: support new timeouts 2022-04-18 00:23:09 -04:00
Zach Daniel
b77ad2c808 improvement: make select unique before running query 2022-04-07 19:59:43 -04:00
Zach Daniel
48c6142040 chore: clean up docs for new docs site 2022-03-28 22:30:27 -04:00
kernel-io
ed8d4f29f2
improvement: add exclusion_constraint_names (#83) 2022-03-20 20:35:30 -04:00
Zach Daniel
2258e6f749 all green on dynamic refactor 2022-02-07 15:35:18 -05:00
Zach Daniel
fcee70b2f7 WIP 2022-02-07 15:35:18 -05:00
Zach Daniel
e19a44d7d9 WIP on dynamic refactor 2022-02-07 15:35:16 -05:00
Zach Daniel
1dcef728fe fix: don't sort when joining 2022-01-18 18:50:14 -05:00
Zach Daniel
d7874c5ecd fix: properly construct nested join relationships 2021-12-20 23:12:28 -05:00
Zach Daniel
912fab9a96 fix: use CiStringWrapper type in ash_postgres 2021-12-17 13:25:14 -05:00
kernel-io
2790a725cc
fix: ensure we are returning * on upserts (#79)
Co-authored-by: kernel-io <kernel>
2021-11-25 21:35:26 -05:00
kernel-io
df62c35801
improvement: don't upsert defaults on conflict (#77)
Co-authored-by: kernel-io <kernel>
2021-11-24 19:31:59 -05:00
Zach Daniel
98004f3251 fix: handle new if types
improvement: relax ash version requirement
2021-11-13 14:48:14 -05:00
Zach Daniel
af97c549c5 improvement: add custom migration types, and repo level override 2021-11-10 04:18:36 -05:00
kernel-io
5a0d145249
fix: copy query prefix to newly created query (#74) 2021-11-02 17:00:13 -04:00
Zach Daniel
4c4af7ebfa fix: use proper ecto types everywhere 2021-11-01 04:41:41 -04:00
Zach Daniel
ff261d75bb fix: try to fix missing paren issue in array_agg 2021-10-26 17:01:57 -04:00
Zach Daniel
2fdcea7ef8 improvement: support default on aggregates
chore: update to latest ash patterns for testing
2021-10-25 18:53:34 -04:00
kernel-io
e4de6f59f6
bugfix: fix can? for :joins (#73) 2021-10-07 04:16:33 -04:00
Zach Daniel
be1fbd6137 improvement: support custom_indexes 2021-09-20 16:38:36 -04:00
Zach Daniel
981f6c8ccd improvement!: update to latest ash/ecto versions w/ parameterized types 2021-09-13 12:58:23 -04:00
Zach Daniel
54765f300a fix: set subquery prefix properly 2021-07-27 23:03:39 -04:00
Zach Daniel
dc054e09fb chore: undo unnecessary expr casting 2021-07-27 19:15:28 -04:00
Zach Daniel
c6841c9e72 fix: set subquery source correctly
fix: create parameter for ci strings
2021-07-27 18:35:14 -04:00
Zach Daniel
7d9d7611cb fix: explicitly set prefix at each level 2021-07-24 16:59:23 -04:00
Zach Daniel
5e5b5f3fc0 fix: interaction w/ attribute and context tenancy 2021-07-24 11:28:58 -04:00
Zach Daniel
85f27337d6 improvement: upgrade ash dep
chore: remove comment
test: add a sort test
2021-07-22 15:23:38 -04:00
Zach Daniel
17efc83eaa fix: don't add a non-list to a list 2021-07-19 17:12:01 -04:00
Zach Daniel
487c9f32d6 improvement: fix significant performance issue in lateral joins
fix: ensure source table is sorted in lateral join
2021-07-19 13:56:36 -04:00
Zach Daniel
aa334eb152 improvement: support default_prefix configuration 2021-07-12 02:43:39 -04:00
Zach Daniel
be7e2a89bc fix: left_lateral_join for many_to_many aggregates
fix: properly reference nested aggregate fields for join
fix: properly determine fallback table for polymorphic resources
2021-07-05 14:12:21 -04:00
Zach Daniel
a67c8b4e11 fix: ensure non-tenant resources can be aggregates 2021-07-02 23:43:30 -04:00
Zach Daniel
f13f31330f fix: properly set aggregate query sources 2021-07-02 12:41:44 -04:00
Zach Daniel
2b2f5f1646 fix: retain parent as bindings 2021-07-02 11:08:31 -04:00
Zach Daniel
a82325e28d fix: don't add rel_source at all 2021-07-02 01:50:41 -04:00
Zach Daniel
ba0c66e395 fix: properly build atoms list 2021-07-02 01:08:53 -04:00
Zach Daniel
ad497f0182 fix: horribly hack ecto for dynamic bindings 2021-07-02 01:01:56 -04:00
Zach Daniel
46744c5d4a fix: properly coalesce aggregate values 2021-07-01 15:28:27 -04:00
Zach Daniel
576c317b68 improvement: leverage new private_vars for errs 2021-06-23 17:21:09 -04:00
Zach Daniel
5583270426 improvement: support calculation sorts 2021-06-05 18:13:20 -04:00
Zach Daniel
dae39f5fda feat: support expression based calculations
feat: support concat + if expressions
improvement: various other improvements
2021-06-04 01:48:35 -04:00
Zach Daniel
84fe7a4822 fix: set prefix to "public" for fkeys to public schema
improvement: set explicit prefix on join filters
2021-05-22 23:56:52 -04:00
Zach Daniel
c2fca09e2d improvement: support new ash upsert specifying targets 2021-05-18 23:04:37 -04:00
Zach Daniel
f0b901173c fix: properly group many_to_many aggregates 2021-05-12 13:17:26 -04:00
Zach Daniel
7911de61a5 improvement: support latest ash/filtering on related aggregates 2021-05-08 23:25:28 -04:00
Zach Daniel
e6e5ca8165 fix: properly construct sources for lateral joins 2021-05-07 12:09:09 -04:00
Zach Daniel
8f80c89db9 improvement: update to latest ash 2021-05-07 12:00:52 -04:00
Zach Daniel
ea26d3f432 fix: copy the correct data for lateral join queries 2021-05-07 11:04:09 -04:00
Zach Daniel
f82e2d44c8 fix: better errors in error cases 2021-05-07 03:09:49 -04:00
Zach Daniel
48c3830209 fix: don't cast booleans to string in last_ditch_cast 2021-05-07 01:49:04 -04:00
Zach Daniel
f28ee00d68 improvement: support latest ash version resource sorts 2021-05-07 01:12:13 -04:00
Zach Daniel
7b37042817 test: more lateral join testing
fix: join to join table in lateral join query
2021-05-04 02:14:24 -04:00
Zach Daniel
ebde2b620e fix: multitenancy + lateral join sources
fix: don't distinct in lateral joins
2021-05-04 01:36:25 -04:00
Zach Daniel
7115bec586 feat: support new side load improvements 2021-04-29 17:31:34 -04:00
Zach Daniel
b7efe6e078 improvement: custom index names
fix: simpler index names
2021-04-27 17:16:56 -04:00
Zach Daniel
07244d66a8 fix: remove inspects that were left in by accident 2021-04-27 13:16:44 -04:00
Zach Daniel
79cba4553b fix: type cast atoms to strings in last ditch cast 2021-04-27 13:03:02 -04:00
Zach Daniel
0e235a6ded fix: properly type cast 2021-04-27 12:09:21 -04:00
Zach Daniel
1cce277e7d improvement: support list aggregate 2021-04-26 16:45:47 -04:00
Zach Daniel
1f6621b852 feat: add check_constraints, both for validation and migrations 2021-04-19 14:26:41 -04:00
Zach Daniel
737a6a5442 improvement: support new ash select feature 2021-04-09 00:53:50 -04:00
Michael St Clair
cf92fe14a5
improvement: add sum aggregate (#53) 2021-04-04 16:05:41 -04:00
Zach Daniel
4d2d29d976 feat: support configuring references
feat: support configuring polymorphic references
feat: support `distinct` Ash queries
2021-04-01 02:19:30 -04:00
Zach Daniel
6414bed5d8 improvement: better error message on missing table 2021-03-21 17:58:47 -04:00
Zach Daniel
830a4ca6ee improvement: consistent foreign key names
fix: force create extensions snapshot
improvement: support custom foreign key error messages
2021-03-19 18:42:10 -04:00
Zach Daniel
99d4095d26 fix: more conservative inner join checks 2021-03-04 22:54:40 -05:00
Zach Daniel
0b7817e420 fix: add back in inner join detection logic 2021-03-04 22:50:12 -05:00
Zach Daniel
eb703efe6f fix: better embedded filters, switch to latest ash 2021-02-24 13:59:49 -05:00
Zach Daniel
33a84e1799 improvement: support latest ash 2021-02-22 23:53:18 -05:00
Zach Daniel
70568c43c0 feat: support polymorphic relationships 2021-02-05 18:59:33 -05:00
Zach Daniel
9d5583cce7 chore: WIP on polymorphic relationships 2021-01-28 19:42:55 -05:00
Zach Daniel
7f8aa98f24 improvement: better errors for multitenant unique constraints
fix: un-break the `in` filter type casting code

test: add tests for untested features
2021-01-26 15:07:26 -05:00
Zach Daniel
d8b3db7bf1 fix: ago was adding, not subtracting 2021-01-24 13:24:43 -05:00
Zach Daniel
5b3fd3f144 feat: support latest ash + contains 2021-01-23 22:45:15 -05:00
Zach Daniel
80e63f9067 feat: support fragments
feat: support type casting

feat: update to latest ash to support expressions
2021-01-22 16:47:24 -05:00
Zach Daniel
b2428213c7 feat: support latest Ash version 2020-12-28 19:26:04 -05:00
Zach Daniel
8e321af566 chore: update to latest ash 2020-12-27 01:20:12 -05:00
Zach Daniel
e8dde8b2ff feat: support refs on both sides of operators 2020-12-23 14:46:49 -05:00
Zach Daniel
f9101be69b
chore: remove IO.inspect 2020-11-03 00:41:38 -05:00
Zach Daniel
ec03af83b8
fix: access data_layer_query with function 2020-11-02 22:59:51 -05:00
Zach Daniel
53d06867dc
improvement: mark repo as not requiring compile-time dep 2020-10-29 00:17:48 -04:00
Zach Daniel
35b9cae6d1
docs: update docs 2020-10-28 23:56:59 -04:00
Zach Daniel
4267d0165d
chore: uppdate docs/add guide 2020-10-28 23:53:28 -04:00
Zach Daniel
03510dae24
feat: multitenancy (#25) 2020-10-28 22:26:45 -04:00
Zach Daniel
9eb703437d
feat: support latest ash 2020-10-17 19:13:51 -04:00
Zach Daniel
dcce3f51fe
chore: updated ash to latest version, fix compiler warnings (#24) 2020-10-07 01:45:58 -04:00
Zach Daniel
493cfb7754
feat: update to latest ash, trigram filter 2020-10-06 01:39:47 -04:00
Zach Daniel
e9b3e26ea0
WIP 2020-10-05 01:08:38 -04:00
Zach Daniel
817e6cc5d8
WIP 2020-10-05 01:08:13 -04:00
Zach Daniel
80230b65df
WIP 2020-10-05 01:08:13 -04:00
Zach Daniel
64fa0a7f2e
docs: add guidance to use ash_postgres dep 2020-09-30 09:08:16 -04:00
Zach Daniel
5004b2f380
feat: fix error when filtering with true 2020-09-23 21:04:43 -04:00
Zach Daniel
3304807dfc
fix: broken types for in operator 2020-09-23 21:04:43 -04:00
Zach Daniel
51cb9c1a68
feat: support base_filter (#18) 2020-09-19 18:08:09 -04:00
Zach Daniel
ed1fe9bd24
fix: document/update migration path logic 2020-09-10 23:47:14 -04:00
Zach Daniel
24b743d31b
feat: snapshot-based migration generator 2020-09-10 20:26:47 -04:00
Zach Daniel
60c18dd149
test: Start test suite (#16) 2020-09-03 04:18:11 -04:00
Zach Daniel
52a39d0597
feat: support inner joins when possible (#15)
fix: better support for aggregates/calculations when delegating
2020-09-02 00:01:34 -04:00
Zach Daniel
ed0f3027b8
fix: don't fail w/ no extensions configured 2020-08-27 22:51:43 -04:00