Commit graph

2122 commits

Author SHA1 Message Date
Kyle Grinstead
c0efa2ae1f
chore: add failing test for invalid syntax error (#444) 2022-11-16 11:47:43 -05:00
Rebecca Le
91bb426e7e
fix: Add missing [:ash, :query] telemetry (#451) 2022-11-16 11:41:52 -05:00
Zach Daniel
a2fc21a218 chore: fix dialyzer 2022-11-15 21:39:57 -05:00
Zach Daniel
5090deb202 improvement: validate that modules exist and are documented when referenced 2022-11-15 21:26:25 -05:00
Zach Daniel
5d434448ef docs: add Ash.Tracer to hexdocs 2022-11-15 16:47:06 -05:00
Zach Daniel
b7f4425265 docs: add Ash.Tracer to doc_index 2022-11-15 16:46:40 -05:00
Zach Daniel
d38625082c chore: release version v2.4.3 2022-11-15 14:49:03 -05:00
Zach Daniel
d8ae4da1b3 docs: use new spark doc index guide order 2022-11-15 14:47:25 -05:00
Zach Daniel
e62d8e4a13 fix: don't incur compile time dependency for resources used as types 2022-11-15 10:03:34 -05:00
Zach Daniel
43362c7656 fix: allow for not-yet-compiled resources as Ash types 2022-11-15 09:59:04 -05:00
Zach Daniel
665a9fb5c4 improvement: optimize sat solving
1. only convert to CNF once
2. group predicates that only appear in specific combinations to limit amount of variables provided to the sat solver

Number 2 above does technically slow down all cases a bit, but the optimization is really important when it matters. And cases that don't need this optimization still happen on the order microseconds anyway.
2022-11-15 01:45:55 -05:00
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