Commit graph

478 commits

Author SHA1 Message Date
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
Zach Daniel
be57b909b5 fix: honor query limit when streaming 2023-06-10 13:09:45 -04:00
Zach Daniel
25acc2d793 improvement: better keyset pagination behavior on first and last pages 2023-06-09 15:08:49 -04:00
Zach Daniel
6320dad188 fix: various fixes to data loading
improvement: `Ash.Query.accessing/2` to get a list of fields being accessed
improvement: builting `LoadAttribute` and `LoadRelationship` calculations
2023-06-09 00:16:27 -04:00
Zach Daniel
907aec5e82 improvement: support loading through types
Will document this in a separate PR. The broad strokes are this:

1. to load through an attribtue, `load(attribute: [:nested: :stuff])`
2. to load through a calculation, `load(calculation: {:%{...input}, nested: :stuff})`
3. union types support loading through them, and is done first by keying by the type name, i.e: `load(union: [type_name: [nested: :stuff])`.
4. union types support specifying a load statement for all types with `load(union: [*: [nested: :stuff]])`
2023-06-07 21:54:17 -04:00
Adam Harris
87045f3984
chore: add failing test to illustrate calculation issue 2023-06-07 10:13:08 -04:00
Zach Daniel
8e7815388e improvement: handle nils in memory the same way sql would have 2023-06-05 16:50:27 -04:00
Barnabas Jovanovics
5477102104
fix: also do not autogenerate values for optional fields that have a generator (#599) 2023-06-05 08:57:22 -04:00
Barnabas Jovanovics
1185b615f8
fix: Only create values for attributes that did not get a generator (#595) 2023-06-02 08:18:02 -04:00
Dmitry Maganov
adb6cefac1
fix: remove field name from string length error message (#594)
* fix: remove field name from string length error message

* fix: remove old unused `Error.Changes.UnknownError`

* fix: do not capitalize ash error messages

* fix: change error kind code for `Ash.Error.Forbidden.Policy`
2023-06-01 02:29:19 -04:00
Zach Daniel
5af9dc6696 fix: properly honor the return_errors? option 2023-05-25 09:46:27 -04:00
James Harton
7326ca330e
improvement(Ash.Type.Module): Add :module type. (#578) 2023-05-15 07:26:52 -04:00
Zach Daniel
f04ffd5ebd improvement: support bulk upserts 2023-05-02 21:56:15 -04:00
Zach Daniel
523452cb94 docs: basic actions -> generic actions 2023-05-02 20:00:18 -04:00
Zach Daniel
1e61ae2d3c improvement: finishing initial touches on bulk actions 2023-05-02 17:24:24 -04:00
Zach Daniel
0ced9c7639 fix: assorted bulk create fixes 2023-05-02 14:04:08 -04:00
Zach Daniel
80f696417d improvement: bulk create actions
This is not currently supported by any data layer other than ETS
2023-05-02 13:19:00 -04:00
Zach Daniel
2843224f06 fix: handle invalid input in basic actions 2023-05-02 02:07:53 -04:00
Zach Daniel
49949ff58f improvement: initial support for basic actions 2023-05-02 01:54:53 -04:00
Zach Daniel
fbd2b2f50c fix: set flow argument defaults 2023-04-27 13:42:18 -04:00
Zach Daniel
fbc341b3a0 feat: add Api.stream!/1 2023-04-26 17:12:21 -04:00
Zach Daniel
38ec164e3e improvement: include resource validations by default
improvement: validate explicit api configurations, with good error messages
2023-04-25 21:31:01 -06:00
Frank Dugan III
2e5f045f72
feat: add fields/1 and public_fields/1 to Ash.Resource.Info (#569) 2023-04-20 12:27:13 -06:00
Zach Daniel
ba5a7e2cb7 improvement: automatically gather up notifications 2023-04-12 17:35:17 -04:00
Zach Daniel
29096c27ae fix: properly return errors on invalid calculation arguments 2023-04-08 03:39:41 -04:00
Barnabas Jovanovics
b5e0cbb3cc
improvement: add constraints to maps (#556) 2023-04-07 09:53:41 -04:00
Zach Daniel
a20ee0abf7 chore: fix tests/stacktrace setting 2023-04-06 10:23:17 -04:00
Zach Daniel
80616781d6 Revert "chore: fix tests"
This reverts commit 67305a6ec8.
2023-04-06 09:38:21 -04:00
Zach Daniel
67305a6ec8 chore: fix tests 2023-04-06 09:32:10 -04:00