Commit graph

1911 commits

Author SHA1 Message Date
Zach Daniel
2cf18e6a3a
docs: proper link to ash postgres multitenancy guide 2022-11-13 11:49:04 -05:00
Rowland Carlson
f3e9bf865c
docs: Comment out editorial comments (#445) 2022-11-09 16:31:20 -05:00
Zach Daniel
70305849e4 chore: update extension link in AshPostgres 2022-11-05 18:19:25 -04:00
Zach Daniel
27ca1d2f3c fix: properly raise error on invalid type.
closes #422
2022-11-03 16:06:26 -07:00
Zach Daniel
1dcb9dd8c4 docs: library links 2022-11-03 08:19:35 -07:00
Zach Daniel
399e6f4a9e docs: fix policies link 2022-11-03 07:29:56 -07:00
Zach Daniel
86877cdcca chore: release version v2.4.2 2022-11-03 01:00:00 -07:00
Zach Daniel
6840cc4870 chore: fix docs link 2022-11-03 00:51:48 -07:00
Zach Daniel
a0e5b2cb7d docs: small docs tweaks
improvement: update to latest spark
2022-11-03 00:47:24 -07:00
Josh Price
d1821a8ef7
docs: review guides and docs (#430) 2022-11-03 00:03:43 -07:00
Zach Daniel
a31da97d4c chore: properly set error vars and run spark.formatter 2022-11-02 21:29:12 -07:00
Zach Daniel
ef0407299b improvement: support statically configured upsert actions 2022-11-01 03:13:56 -04:00
Zach Daniel
d23be5e49b improvement: add more builders
docs: fix typo in docs
2022-10-31 21:23:07 -04:00
Zach Daniel
3407d1e2e3 fix: properly set error vars with list constraints
fix: when creating changesets/queries that already have arguments, revalidate arguments
2022-10-31 14:20:13 -04:00
Zach Daniel
80f67d3afc chore: release version v2.4.1 2022-10-31 13:09:35 -04:00
Zach Daniel
6f2c685ae6 fix: fix depend on resources to depend on each resource 2022-10-31 12:30:41 -04:00
Zach Daniel
cb192517c7 fix: allow references on both sides of in 2022-10-31 12:08:24 -04:00
Zach Daniel
6994295a8f fix: properly upsert all explicitly changed fields
fix: traverse maps for `template_references_actor?/1`
docs: various doc fixes
2022-10-31 11:33:51 -04:00
Zach Daniel
36abd313b3 chore: fix credo 2022-10-31 02:28:29 -04:00
Zach Daniel
113d2452d2 improvement: replace templates in change/preparation/validation opts
Previously, only a few specific changes supported using `arg/1` or `context/1`
in their options. Now, those templates can be used in any change options,
built-in or not.
2022-10-31 02:25:01 -04:00
Zach Daniel
e18a8782c7 chore: remove empty file 2022-10-30 22:20:02 -04:00
Zach Daniel
85e121bcd7 chore: update to latest spark 2022-10-30 22:11:56 -04:00
Zach Daniel
151433bca4 chore: update changelog 2022-10-30 21:35:16 -04:00
Zach Daniel
bf2a4a7871 chore: release version v2.4.0 2022-10-30 21:34:44 -04:00
Zach Daniel
d41c510f68 improvement: support anonymous functions for various behaviour based options
These include:

- custom create/read/update/destroy actions
- changes
- preparations
- validations
- calculations
- manual relationships

See the respective DSL guides for more.
2022-10-30 21:31:48 -04:00
Zach Daniel
d1c5c32e3f WIP 2022-10-30 21:00:57 -04:00
Zach Daniel
8cbd766172 feat: support anonymous functions in DSL
improvement: add more ergonomic manual action definitions.

The old method will likely be deprecated some time in the future (there is no rush really, they both work).
2022-10-30 21:00:57 -04:00
Michael St Clair
5626c8be2c
fix: don't add required belongs_to error if changeset is invalid (#437) 2022-10-30 17:40:10 -04:00
Zach Daniel
d70a05c805 fix: don't lazy load when managing relationships
if a relationship was loaded previously we were just using that relationship value.
However, this has a chance to cause incorrect behavior in edge cases. One such
edge case is illustrated here: https://github.com/ash-project/ash/pull/434 We can return to the
more optimized behavior when lazy loading is improved via https://github.com/ash-project/ash/issues/438
2022-10-30 10:36:26 -04:00
oco-adam
2c85e325cd
test: Add test demonstrating minimal example of strange upsert behaviour (#434) 2022-10-29 19:33:19 -04:00
Zach Daniel
1718314f40 chore: update spark 2022-10-28 10:34:43 -05:00
Zach Daniel
e52d7187d8 improvement: more additions to the resource builder, update spark
test: add a test for loading many to many relationships on code interface actions
2022-10-28 10:18:01 -05:00
Zach Daniel
8aab478003 chore: release version v2.3.0 2022-10-27 17:54:27 -05:00
James Harton
2d6762ae61
feat(Ash.PlugHelpers): standardise conn interface for actors/tenants. (#432) 2022-10-27 17:52:42 -05:00
Zach Daniel
3c6758fa59 chore: use the tenant from the existing query when reselecting/loading calcs 2022-10-27 07:57:17 -05:00
Zach Daniel
bdb2265196 improvement: pass tenant to calculation query explicitly 2022-10-27 07:51:16 -05:00
James Harton
4917e283cd
fix(DataLayer): incorrect typespec for run_query/2 callback. (#431) 2022-10-26 14:36:57 -05:00
Zach Daniel
39ea911d33 docs: various guide/documentation updates 2022-10-25 23:17:49 -05:00
Zach Daniel
f89fd53806 fix: in Ash.Seed, don't try to update a non-loaded record 2022-10-25 22:30:00 -05:00
Zach Daniel
6e43784535 docs: update docs, add some context, remove dead link 2022-10-25 09:11:54 -06:00
Zach Daniel
a66a487cf8 chore: add resource builder to hex docs 2022-10-24 12:06:07 -06:00
Zach Daniel
1a1714a37c docs: add resource builder to doc index 2022-10-24 12:05:41 -06:00
Zach Daniel
6b9cff5d43 feat: add Ash.Resource.Builder, the start of DSL builder utilities of rextension writing 2022-10-24 12:04:56 -06:00
Zach Daniel
72171da732 docs: update some descriptions 2022-10-24 08:57:22 -06:00
Zach Daniel
8c0e4de6bd improvement: allow using get_path/2 by name, as well as bracket access
prior to this, you had to say `map[:foo][:bar]`, but now you can also say
`get_path(map, [:foo, :bar])`. This makes certain things much clearer, i.e
`^arg(:foo)[:foo]`, which is problematic, would normally need to be written
as `(^arg(:foo))[:foo]` so that the pin only applied to the `arg/1` call.
This looks much nicer as `get_path(^arg(:foo), [:foo])`.
2022-10-24 07:57:21 -06:00
Josh Price
3d05bfa95e
improvement: SVG, PDF, PNG, Markdown and plain mermaid formats (#428) 2022-10-24 07:55:05 -06:00
Zach Daniel
67814a2160 docs: add more context to manual relationship guide
docs: add a "Defining Idiomatic Actions" guide

chore: fix flaky tests
2022-10-23 23:08:17 -06:00
Zach Daniel
3dd16304f7 improvement: optimize nested exists filter statements
i.e `exists(friends, exists(friends, name == ^name))`
will be automatically translated to `exists(friends.friends, name == ^name)`.
2022-10-23 22:16:50 -06:00
Zach Daniel
5e3b71e79b fix: properly load manual to_one relationships 2022-10-23 22:16:50 -06:00
Zach Daniel
03482cf908 docs: add an initial "Why Ash?" guide 2022-10-23 22:16:50 -06:00