Zach Daniel
d49f991021
fix: ensure actor is set when building queries in filter
2024-04-20 15:46:49 +01:00
Zach Daniel
c7991ec8a7
fix: don't eager evaluate type because it breaks data layers
2024-04-19 16:09:42 +01:00
Rebecca Le
7c75e5c102
refactor: Move opt schema definitions for built-in changes and validations to their specific modules ( #1036 )
...
* refactor: Move Spark opts definitions for built-in changes to the relevant change modules
This allows the change modules to be read and grokked standalone, without
needing to refer back to the `Builtins` module just for the opts
* refactor: Move Spark opts definitions for built-in validations to the relevant validation modules
This allows the change modules to be read and grokked standalone, without
needing to refer back to the `Builtins` module just for the opts
2024-04-19 15:43:35 +01:00
Zach Daniel
94f319a5f4
chore: invert code interface for simpler checking
2024-04-19 14:19:49 +01:00
Zach Daniel
89f15103c8
fix: ensure __union_tag__
is set when calling sub-union types
2024-04-19 13:41:05 +01:00
Zach Daniel
a2ac66093c
fix: handle more &Mod.fun/n
variations in fragments
2024-04-17 16:12:55 +01:00
Zach Daniel
28136ec43f
chore: format
2024-04-17 15:08:29 +01:00
Zach Daniel
45b66f539b
chore: remove atomic
...
fix: ensure validations are considered atomic
2024-04-17 15:07:15 +01:00
Zach Daniel
8e1fd3b833
improvement: better eager expression parsing and atomic error anticipation
2024-04-17 02:34:33 +01:00
Zach Daniel
ccb06b1628
fix: ensure tenant and actor are properly set in Ash.can?
...
fixes #1027
2024-04-17 00:14:31 +01:00
Zach Daniel
f960e69437
chore: remove IO.inspect
2024-04-16 21:49:59 +01:00
Zach Daniel
70cd40065b
fix: ensure changeset filter is parsed for templates
2024-04-16 21:03:25 +01:00
Zach Daniel
65675ef337
fix: properly parse additional changeset expression
2024-04-16 20:45:43 +01:00
Zach Daniel
371c2d1515
fix: properly parse changeset template for filters
2024-04-16 20:41:19 +01:00
Zach Daniel
3044339396
fix: properly parse changeset filter
2024-04-16 20:35:30 +01:00
Zach Daniel
4b50550149
chore: fix typo
2024-04-16 20:31:57 +01:00
Zach Daniel
3b8a15fd34
fix: ensure changeset filters are applied on bulk destroy/update
2024-04-16 20:27:42 +01:00
Zach Daniel
a147062523
improvement: add Ash.read_first
2024-04-16 18:19:20 +01:00
Zach Daniel
77ee3686eb
improvement: helpful output in mix tasks helper
2024-04-16 17:37:15 +01:00
Riccardo Binetti
6d209e8836
feat: configurable multitenancy on read actions ( #1030 )
...
Allow making specific read actions able to optionally or totally bypass
multitenancy
2024-04-16 12:09:13 +01:00
Dmitry Maganov
8bcbfc5b17
fix: support all calculate opts in code interface methods ( #1026 )
2024-04-15 22:34:33 +01:00
Riccardo Binetti
11de5dd64f
improvement: use explicit read actions when reading relationships ( #1029 )
...
While filter, sorts etc are already copied from the read action into the query,
using the right action is relevant, for example, when it's checked against in
policies, or in preparations that check the action name from the query
2024-04-15 22:33:56 +01:00
Riccardo Binetti
3338b343ac
improvement: use cached to_tenant when setting tenant attribute ( #1021 )
2024-04-14 11:53:09 -04:00
Zach Daniel
3519a85cee
fix: ensure to_tenant
is copied to aggregate query
2024-04-13 20:47:01 -04:00
Zach Daniel
bc69f904e2
improvement: support require_reference?: false
on code interfaces
...
improvement: support `:filter` option on bulk create/destroy
2024-04-13 17:21:43 -04:00
Riccardo Binetti
9c74e52bd8
improvement: make match/1
overridable in Ash.Type.Enum ( #1020 )
...
Allow handling additional inputs to map them to one of the enum values
2024-04-13 14:07:23 -04:00
Zach Daniel
0e2b392413
fix: compilation time improvements (hopefully)
2024-04-12 14:14:14 -04:00
Lukas Ender
10e3722446
fix: code_interface
actions accept @context
( #1016 )
2024-04-12 10:26:46 -04:00
Zach Daniel
8ea51ec506
fix: ensure tenant is set to opts
in action helpers
2024-04-11 23:33:22 -04:00
Zach Daniel
47dde10329
improvement: adding domain to embedded resource is an error
2024-04-11 22:28:47 -04:00
Zach Daniel
0416ce1d0d
fix: ensure more consistent use of Ash.Tenant.to_tenant/2
2024-04-11 11:41:29 -04:00
Zach Daniel
dc1205a48f
fix: ensure that strict loads are applied at all nesting levels
2024-04-11 10:16:24 -04:00
Zach Daniel
2474fbed44
improvement: raise more sensible error on unsupported pagination
2024-04-11 09:38:49 -04:00
Zach Daniel
752320c139
fix: properly load depended on fields for relationships even if public?: false
2024-04-11 08:04:20 -04:00
Jechol Lee
0b79515f69
fix: fix date_add query function ( #1010 )
2024-04-11 07:42:11 -04:00
Zach Daniel
e1a0b48172
fix: pass name through to underlying tasks
2024-04-10 19:02:42 -04:00
Zach Daniel
829f6d6e49
improvement: support builder options in read
code interfaces
2024-04-10 15:57:30 -04:00
Zach Daniel
268b335946
chore: fix return type matching for generic actions
2024-04-10 13:58:22 -04:00
Zach Daniel
bae263ca12
improvement: support omitting generic action return types
2024-04-10 13:46:44 -04:00
Riccardo Binetti
9f2b4ab8ba
improvement: call ToTenant protocol when setting tenant in actions ( #1004 )
2024-04-10 09:35:39 -04:00
Rebecca Le
3fce34cda6
fix: Validate all conditions in a numericality
validation instead of only the last ( #997 )
...
The previous `reduce` loop did not break on the first failure and
return the error, it returned the last iteration of the loop
Some more work may need to be done on the atomic side of the validation,
I'm not familiar with how they work!
2024-04-10 09:25:42 -04:00
Zach Daniel
f504ab6a67
chore: fix domain behaviour impl
2024-04-10 07:55:37 -04:00
Riccardo Binetti
8eb98bc663
fix: swap the parameters in Ash.ToTenant.to_tenant/2 ( #1003 )
...
This is technically a breaking change, but without this the protocol would never
work as intended since the funtion gets dispatched based on the type of the
first parameter and the resource parameter will always be an atom (precisely, an
alias) so the implementation for Atom will always be called
2024-04-10 06:58:53 -04:00
Zach Daniel
2f28bd9ee7
chore: better use Ash.Resource
options
...
chore: atom -> module
2024-04-09 22:55:26 -04:00
Zach Daniel
46ed97dd10
improvement: add ash.rollback
mix task
...
chore: fix some naming/mix task steps
2024-04-09 20:24:08 -04:00
Zach Daniel
4f26773fe0
improvement: add ash.rollback
task
2024-04-09 14:54:44 -04:00
139058d4c0
fix(Ash.Reactor): crash when calling an ash reactor for the first time.
...
Thanks to @carlgleisner for the [detailed reproduction](https://github.com/carlgleisner/reactor_notification_worker_issue ).
The problem was caused by an attempt to not have nested reactors indepdently publish their notifications separate to the parents but contained a logic flaw which caused the agent to not start, but only the first time you try and use a given reactor.
The fix involves _always_ starting a notification agent for each reactor, but nesting them. When a reactor completes it either publishes it's notifications to the parent reactor or to ash if there are no parent reactors.
2024-04-10 06:19:38 +12:00
Zach Daniel
1854880def
improvement: add config :ash, require_atomic_by_default?, false
, for upgrading
2024-04-09 13:45:19 -04:00
Zach Daniel
5c70935f2f
improvement: support skip_unknown_inputs
in Ash.bulk_create
...
closes : #998
2024-04-09 13:24:03 -04:00
Zach Daniel
25c1063e45
fix: add context argument to before_action
and after_action
for read actions
...
closes #999
2024-04-09 13:21:06 -04:00