Commit graph

506 commits

Author SHA1 Message Date
Zach Daniel
567dcf6372 fix: better handling for negate error messages 2023-09-04 16:01:48 -04:00
Zach Daniel
69623a1efe chore: cleanups for new mix task 2023-09-04 01:23:57 -04:00
Barnabas Jovanovics
b661022736
fix: sort operator names in keyset (#684) 2023-09-01 06:53:01 -04:00
Zach Daniel
c5ea541b2d chore: rework atomics to atomic_update change and function
improvement: add `Ash.context_to_opts/1-2`
2023-08-29 14:39:38 -04:00
Zach Daniel
18cb24e7f7
improvement: implement atomics, expression-based changes (#682)
there is still a lot of potential work that needs to be on this front.
1. supporting atomics on create actions.
2. supporting atomics in upserts (this one may actually be much easier than the first one, for postgres specifically, due to ecto implementation details)
3. discovering places atomics can be more nicely integrated into existing changes, validations, policies
2023-08-28 16:05:26 -04:00
Zach Daniel
7d5fd04e5c fix: ensure that errors/records return the proper value in bulk creates
closes #681
2023-08-25 08:59:24 -04:00
James Harton
269889c34b
fix(Ash.Filter): Don't overly constrain related references. (#678)
We now only apply related policies to filter statements based on references
that are explicitly annotated as inputs.  This is the same logic that backs
protecting access in filters for field policies.
2023-08-21 19:39:07 -04:00
Tchowa Franck A
7e47bfb60f
improvement: validate all actions and accept/reject fields at once. (#674) 2023-08-18 20:47:35 -04:00
Tchowa Franck A
f302dca003
Feature: Ensure aggregate field is attribute or calculation. (#671) 2023-08-17 18:02:05 -04:00
Zach Daniel
b51dbe49c9 improvement: storage_type/0 -> storage_type/1 2023-08-17 17:52:00 -04:00
Zach Daniel
8233634bb1 improvement: properly set path into error instead of on error messages
TBD: this may break some people's tests, and so may need to be
reverted or released as part of 3.0
2023-08-15 16:23:06 -07:00
Zach Daniel
8c1f334075 improvement: expose union errors with path when tag is set 2023-08-15 14:07:28 -07:00
Barnabas Jovanovics
f85bc95ff5
chore: release version v2.14.0 (#669) 2023-08-09 19:43:55 +02:00
Zach Daniel
7ae9244d01 fix: don't optimized in/== predicates across incorrect boolean expressions 2023-08-08 12:17:07 -07:00
Zach Daniel
6daae630f4 fix: various fixes with runtime evaluation of aggregates
fix: handle mnesia transaction errors properly
2023-08-06 00:41:29 -04:00
Zach Daniel
cf99929230 improvement: initialize change opts in bulk actions
fix: better error message in `validate_related_resource_inclusion`
test: add test for arguments in bulk create actions
2023-08-02 12:41:54 -04:00
Zach Daniel
bda7c56543 improvement: support parent/1 in relationships 2023-07-26 16:46:22 -04:00
Zach Daniel
da73502a2f fix: before/after batch callbacks are no longer broken
test: add tests for those callbacks being executed
2023-07-22 19:51:27 -04:00
Zach Daniel
e5563ce664 fix: Keyword.fetch on keywords, fix test name 2023-07-19 11:18:20 -04:00
Zach Daniel
7f3ec1b8bf improvement: support distinct_sort 2023-07-19 11:06:01 -04:00
Zach Daniel
3c42062861 fix: allow the query & related fields to be read before authorization status is complete 2023-07-18 15:23:27 -04:00
Mariusz Morawski
e356691765
test: Add test that covers issue 652 (#657) 2023-07-18 14:48:26 -04:00
Zach Daniel
5b2efe5e5c improvement: support distincting on calculations
improvement: support distinct in ets data layer for testing
2023-07-18 14:35:25 -04:00
Zach Daniel
c0d8a86987 improvement: support resources directly in API modules
improvement: compile time warning on resources not detected in any apis
2023-07-13 01:38:21 -04:00
Zach Daniel
7114b5efbb improvement: exists type aggregate 2023-07-13 00:08:51 -04:00
Zach Daniel
2634d3d830 improvement: add at/2 function 2023-07-12 16:53:43 -04:00
Zach Daniel
d27e871b8f improvement: add string_split expression 2023-07-12 15:11:21 -04:00
skanderm
925f5c1f9a
fix: incorrect error for casting binary UUID (#653) 2023-07-11 20:35:01 -04:00
Zach Daniel
8e12a14b25 improvement: add field_policy_bypass
fix: fix and improve policy breakdown logs
improvement: optimize field selection/loading when possible
2023-07-11 10:28:07 -04:00
Barnabas Jovanovics
c442d83534
test: add test for aggregate field policy (#644) 2023-07-10 09:00:55 -04:00
Zach Daniel
be75743b13 fix: properly detect selected attributes for changeset field policies 2023-07-06 10:58:09 -04:00
Barnabas Jovanovics
8837bb0b0d
test: add test case for create action (#641) 2023-07-06 10:39:24 -04:00
Mariusz Morawski
5ed2109e33
improvement: Add Negate validation (#636)
* Add `Negate` validation
---------

Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2023-07-05 16:25:51 -04:00
Alan Heywood
4ab7e84e4f
fix: typo in at_most validation message (#640) 2023-07-04 08:59:12 -04:00
Eduardo B. A
5fe72d4703
feat: Adds Ash.Changeset around_transaction (#632) 2023-06-27 22:13:50 -04:00
Zach Daniel
25f899d6f4 improvement: support specifying calculation as an option 2023-06-24 06:55:38 -05:00
Zach Daniel
51a86cd58d fix: fix field policy expressions
fix: handle various inconsistencies in runtime expression runner
2023-06-22 16:26:03 -04:00
Zach Daniel
4376cf9adb chore: fix reserved name test 2023-06-22 14:24:50 -04:00
Zach Daniel
c93c4b88f7 chore: fix credo/dialyzer 2023-06-22 14:19:40 -04:00
Zach Daniel
0b6d93c7c4 feat: add field_policies
see included documentation for more information on how field policies
work.
2023-06-22 14:00:11 -04:00
Zach Daniel
1a9b2c8406 improvement: fix loading w/ only nil values 2023-06-22 10:37:25 -04:00
Abhishek Tripathi
06329b97cf
improvement: add verifier for identity fields. (#626)
* improvement: adds verifier for identity fields.
---------

Co-authored-by: abhishek <abhishek.tripathi@tinymesh.in>
2023-06-20 01:05:41 -04:00
Zach Daniel
a7d069ae30 fix: properly set notification_data from loaded record 2023-06-14 20:40:04 -04:00
Zach Daniel
3f3a588df8 fix: properly handle lazy loaded many to many relationships 2023-06-14 19:52:05 -04:00
Dmitry Maganov
1ca4d9870a
fix: honor not_found_error?: true opt in code interface get actions (#620) 2023-06-14 09:43:51 -04:00
Zach Daniel
0e12686c61 fix: ensure attributes for keyset pagination are selected 2023-06-14 07:38:43 -04:00
Dmitry Maganov
984968d8ba
improvement: add support for generic actions in api.can (#617) 2023-06-13 09:35:27 -04:00
Dmitry Maganov
939b25d727
feat: generate some action helpers with code interface (#614) 2023-06-12 22:59:17 -04:00
Zach Daniel
d47dbe239c improvement: properly pass calculation args in keyset filters 2023-06-11 20:48:42 -04:00
RaspberryLambda
ffaf6d57df
* improvement: add data layer introspection to Ash.Resource.Info (#610)
---------

Co-authored-by: Daniel Stewart <mgdog1@googlemail.com>
2023-06-10 13:17:17 -04:00