Commit graph

92 commits

Author SHA1 Message Date
Zach Daniel
904968b936 improvement: add no_fields? relationships 2022-05-03 18:56:37 -04:00
Zach Daniel
7a1e32908a improvement: more flow features/fixes, debug step 2022-04-25 17:01:23 -04:00
Zach Daniel
4e19223173 improvement: tons of engine/timeout improvements 2022-04-17 23:56:01 -04:00
Zach Daniel
9f21435dbf fix: fix expression logic
improvement: flow -> mermaid chart
improvement: flow tenants
improvement: fix nested map statements in flow
2022-04-10 20:00:57 -04:00
Zach Daniel
c98910add6 improvement: add dynamic allow list
improvement: uniqify list_references
2022-04-07 22:33:48 -04:00
Zach Daniel
0309f7131e improvement: fully deprecate the resource entity 2022-04-06 13:12:22 -04:00
Zach Daniel
be9e564d57 chore: fix identity docs/tests 2022-04-06 12:22:34 -04:00
Zach Daniel
4fc53baf5f improvement: add eager validate identities
improvement: percolate `nil` values in operators in ash expresion language (like SQL)
chore: more docs work
2022-04-06 12:00:32 -04:00
Zach Daniel
84ed398980 chore: docs/ci work 2022-04-05 03:59:34 -04:00
Zach Daniel
ae630581ea improvement: better loading behavior for managed relationships
improvement: add lazy? option for loading
2022-04-01 15:17:01 -04:00
Zach Daniel
c7ff13c2ef chore: build/lint 2022-03-30 11:37:44 -04:00
Zach Daniel
f9734af48c chore: get final tests passing 2022-03-24 23:36:43 -04:00
Zach Daniel
96c45e1a58 improvement: add transaction steps to flow
fix: don't require `writable?: false` attributes
2022-03-19 23:51:45 -04:00
Zach Daniel
a53b61ddf4 feat: add Ash.Flow
feat: support recursive DSL entities.
improvement: unimport to avoid name collisions in nested DSLs
2022-03-15 17:42:29 -04:00
Zach Daniel
ba1b39536e feat: manual relationships
fix: make the formatter safer, again
2022-02-20 22:46:39 -05:00
Zach Daniel
15bdae0d99 feat: add source option to attributes 2022-02-14 11:38:45 -05:00
Zach Daniel
079b941e90 chore: release version v1.50.18 2022-02-07 15:39:12 -05:00
Zach Daniel
1b2d28eb90 fix: no IO.inspect, and log errors from formatting 2022-02-02 17:14:29 -05:00
Zach Daniel
4138bd4934 improvement: initial implementation of ash resource formatter 2022-02-02 17:02:43 -05:00
Zach Daniel
ca631d27da improvement: only_when_valid? on changes
fix: set storage_type to `:uuid` for Ash.Type.UUID
2021-11-01 04:39:13 -04:00
Zach Daniel
05d8eb1741 improvement: add allow_async? to calculations, default to false
improvement: add elixir evaluation step to expression calculations
2021-10-25 17:53:51 -04:00
Zach Daniel
5e6442c3e4 improvement: add get_by and get_by_identity to code interface
improvement: compile time validations for managed relationships
2021-10-19 21:39:30 -04:00
Zach Daniel
3bad25c1e0 improvement: add primary_actions? option 2021-10-19 04:42:35 -04:00
Zach Daniel
1f2f9802a3 fix: fix code interface on resources
improvement: breaking change! api level code interface *removed*, contact me on discord if you want a way to avoid changing to resource-based interface, but otherwise
switch to the resource based one by specifying `define_for YourApp.YourApi` in the `code_interface` block of each resource.
improvement: use proper equality checking in places where we were using simple elixir equality checking
2021-10-13 18:42:42 -04:00
Zach Daniel
922c87ea85 improvement: add resource registry validation
fix: move related field validations to resource
fix: remove join_attributes, which didn't do anything anyway
2021-10-11 15:14:33 -04:00
Zach Daniel
ff756b72a7 improvement: deprecation!
A deprecation warning will be shown at compile time to illustrate
a change from listing all of your resources in an api to listing
them in a registry and connecting that registry to the api
2021-10-07 02:41:02 -04:00
Zach Daniel
87627993b8 improvement: breaking change! don't define code interface by default
In an effort to improve compile times in general, and remove unnecessary
compile time dependencies, the code interface is not defined by default.
It is also now possible to define the code interface directly in the resource module,
via

```elixir
code_interface do
  define_for ApiModule
end
```

If you need to reenable the code interface, simply add the following to your api module:
```elixir
resources do
  define_interfaces? true
  ...
end
```
2021-10-06 17:43:22 -04:00
Michael St Clair
8af32a0053
chore: Bring over changes committed to master branch (#271)
Co-authored-by: kernel-io <git@omnium.co>
Co-authored-by: Zach Daniel <zach@zachdaniel.dev>
Co-authored-by: kernel-io <kernel-io@users.noreply.github.com>
2021-10-01 23:27:35 -04:00
Zach Daniel
16629a23f1 chore: update .formatter.exs 2021-09-14 17:19:10 -04:00
Zach Daniel
47bacbfe84 chore: fix lint/format 2021-08-27 20:35:25 -04:00
Zach Daniel
dc56376d80 improvement: add error_handler for create/update/destroy actions 2021-06-23 17:19:59 -04:00
Zach Daniel
231eeafd30 feat: expression calculations for sorting/filtering
improvement: small improvements/fixes across the board
2021-06-04 01:37:11 -04:00
Zach Daniel
4662c23f68 improvement: calculation.select/2 + select calculation option 2021-05-20 16:42:26 -04:00
Zach Daniel
0f6d5e861d chore: fix formatter 2021-05-20 12:19:47 -04:00
Zach Daniel
dd40b24bf9 improvement: transactions for reads, notifications from read callbacks 2021-05-14 11:25:42 -04:00
Zach Daniel
574f6f59a3 improvement: various managed relationship improvements
fix: rename `context` -> `relationship_context` to avoid conflict
feat: `on_no_match: :match` supported for to_one rels
2021-05-14 01:07:51 -04:00
Zach Daniel
7d37f8ae3d improvement: add manual? option for create/update/destroy 2021-05-09 16:25:39 -04:00
Zach Daniel
593b111069 improvement: add read_action option
feat: rework lateral joins for many to many performance boost
2021-05-03 16:21:29 -04:00
Zach Daniel
e11f399fc0 improvement: add :list aggregate kind 2021-04-26 16:01:39 -04:00
Zach Daniel
53ceb5b753 fix: compile time fixes
improvement: add `require_attributes` to create/update/destroy
2021-04-23 11:41:13 -04:00
Zach Daniel
e353ea49c3 fix: allow api.load/2 to load calculations
improvement: add `allow_nil_input` to create actions for api layers
improvement: add `load/1` builtin change
feat: change `get?: true` interface functions to raise on `nil`
2021-04-13 15:49:42 -04:00
Zach Daniel
ec57f363ed improvement: support the datalayer selecting fields in reads 2021-04-09 00:10:01 -04:00
Michael St Clair
6805d431ac
improvement: add sum aggregate (#221) 2021-04-04 16:00:53 -04:00
Zach Daniel
92344029d3 improvement: before_action? on validate, validate inline 2021-04-01 11:53:52 -04:00
Zach Daniel
afddb212f6 chore: fix formatter 2021-03-14 17:51:49 -04:00
Zach Daniel
22188d4366 improvement: derive has_one destination_field
improvement: finalize code API logic
2021-03-11 23:45:52 -05:00
Zach Daniel
662bbf96b9 fix: fix pub_sub on update
improvement: add not_found_message + violation_message for relationships
chore: fix lint
2021-03-10 00:08:26 -05:00
Zach Daniel
72b5a57a25 feat: functional interface on the Api module
feat: resource aliases
improvement: require completely unique action names
2021-03-08 00:59:32 -05:00
Zach Daniel
03b6714e6f improvement: set_context change/preparation
fix: support `manage_relationship` for `belongs_to`
2021-02-05 18:56:56 -05:00
Zach Daniel
142b3bf7f9 feat: add default_context
feat: add `manage_relationship/4`

feat: add relationship specific context (for postgres polymorphism)

feat: add `reject` (opposite of `accept`)

improvement: set `accept` by default
2021-02-04 17:15:15 -05:00