Zach Daniel
a0b0e633d5
fix: don't halt on request handler failure
...
fix: properly error when more than 2 requests of the same type are primary
fix: properly process sort when the sort is an atom
fix: properly calculate reverse relationship paths
2021-06-08 14:42:17 -04:00
Zach Daniel
d45a9dbbfa
improvement: support calculation sorts
2021-06-05 18:11:09 -04:00
Zach Daniel
30af25ba74
fix: always wait on the engine if it hasn't completed
2021-06-05 02:42:40 -04:00
Zach Daniel
3f1f31694d
fix: always wait for engine
...
improvement: spawn async requests where possible
2021-06-04 18:32:08 -04:00
Zach Daniel
9719d0dce5
fix: constraints on calculations
...
fix: better calculation inspect
fix: allow supplying stacktraces when building errors
2021-06-04 14:33:22 -04:00
Zach Daniel
d247004610
feat: expression based calculations for filterable/sortable calculations
...
fix: aggregate authorization issues
improvement: tons of improvements across the board
2021-06-04 01:40:11 -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
Darren Black
42cc8b9711
docs: Minor documentation tweaks ( #246 )
2021-06-02 10:38:15 -04:00
kernel-io
dd1474a4f6
improvement: Update remaining builtin validators ( #244 )
...
Co-authored-by: David Culina <git@omnium.co>
2021-06-01 20:57:13 -04:00
kernel-io
35af220d9d
feat: add compare validator ( #242 )
...
Co-authored-by: David Culina <git@omnium.co>
2021-06-01 13:32:22 -04:00
kernel-io
42895c50f7
fix: ensure create functions generated by code_interface accept tenant in the opts list ( #243 )
2021-05-31 18:34:54 -04:00
Zach Daniel
d9debc07f1
fix: properly process managed belongs to relationships
2021-05-28 03:12:14 -04:00
Zach Daniel
f895f3ddd8
fix: cast nil -> {:ok, nil} in all cases
2021-05-28 01:47:38 -04:00
kernel-io
0fbf7eab6a
fix: set tenant even on non-tenant resources where relevant ( #241 )
2021-05-27 02:22:24 -04:00
Zach Daniel
86f6719390
improvement: define embedded schemas where appropriate
2021-05-22 23:48:10 -04:00
Zach Daniel
4662c23f68
improvement: calculation.select/2 + select
calculation option
2021-05-20 16:42:26 -04:00
Zach Daniel
584d628047
fix: run after_action hooks in the proper order
...
improvement: add `validate_destination_field?`
improvement: add builtin `select` change
2021-05-20 12:17:56 -04:00
Zach Daniel
d87969ad1b
improvement: set moduledoc to description if one is not set
...
chore: fix some dialyzer typing issues
2021-05-20 01:36:45 -04:00
Zach Daniel
41aaeeed47
fix: fix dialyzer errors for enum + code interface
2021-05-19 01:32:06 -04:00
Zach Daniel
4b028cbf53
chore: lint/build/compiler issues
2021-05-18 23:12:49 -04:00
Zach Daniel
2406732811
fix: fix code interface + args
combo error
...
improvement: support specifying the `upsert_identity` option
2021-05-18 23:05:31 -04:00
Zach Daniel
013b49c2b2
fix: ignore?: true
still accumulates changes
...
fix: properly require_attributes before setting defaults
2021-05-18 01:44:10 -04:00
Zach Daniel
820020d4e5
improvement: ignore?
option for manage_relationship
change
...
fix: set default values before calling resource changes
2021-05-18 00:02:11 -04:00
Zach Daniel
d2e5c06511
fix: reverse-reverse relationship detection
2021-05-17 15:06:49 -04:00
Zach Daniel
de684a27a8
fix: support non-predicates in satsolver
2021-05-16 21:59:06 -04:00
Zach Daniel
50eb787410
improvement: expose default_value/1
in aggregate
2021-05-15 11:56:23 -04:00
Zach Daniel
2ffa0e38b6
fix: raise better error w/ invalid filter expression
2021-05-14 17:02:22 -04:00
Zach Daniel
dd40b24bf9
improvement: transactions for reads, notifications from read callbacks
2021-05-14 11:25:42 -04:00
Zach Daniel
baba0a368a
fix: handle error return in code_interface getter
2021-05-14 01:56:36 -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
968e234a31
improvement: set __source__
context for embeds
2021-05-11 00:28:26 -04:00
Zach Daniel
69afdfce25
improvement: utility manage_relationship_source
context
2021-05-10 18:03:36 -04:00
Zach Daniel
de167cea28
chore: format code
2021-05-09 17:25:40 -04:00
Frank Dugan III
a796e0d308
refactor: remove references to "side loading" ( #236 )
2021-05-09 17:24:48 -04:00
Zach Daniel
097447bf38
fix: run action changes on destroy
...
test: test manual actions
fix: pattern match manage_relationship notifications fix
2021-05-09 16:56:44 -04:00
Zach Daniel
7d37f8ae3d
improvement: add manual?
option for create/update/destroy
2021-05-09 16:25:39 -04:00
Zach Daniel
3bd2686de3
improvement: ensure data layer can perform aggregates
2021-05-08 23:31:01 -04:00
Zach Daniel
78247ffa5a
improvement: support filtering on related aggregates
...
improvement: autoload aggregates used in filters
2021-05-08 22:48:05 -04:00
Zach Daniel
990aaf8147
docs: side_loading -> loading
2021-05-08 20:34:44 -04:00
Zach Daniel
be07ffc0dd
fix: don't fail on nil root filters
2021-05-08 20:06:14 -04:00
Zach Daniel
30e443c021
fix: don't raise unnecessary side load error
2021-05-07 16:31:06 -04:00
Zach Daniel
1412052ff6
improvement: fix data-based side loads
2021-05-07 11:57:59 -04:00
Zach Daniel
cb19e66fb5
fix: IsNil function to IsNil operator
2021-05-07 01:51:54 -04:00
Zach Daniel
cd023bf0a1
fix: function clause match error in not expression
2021-05-07 01:37:44 -04:00
Zach Daniel
f8604717bd
fix: limit 1 on to one side load queries
2021-05-07 01:07:01 -04:00
Zach Daniel
46fb08f085
improvement: support sorted relationships
2021-05-07 00:28:51 -04:00
Zach Daniel
fed41b5060
fix: don't consider contextual relationships as reverse relationships
2021-05-06 13:39:04 -04:00
Zach Daniel
ae5b67fcdb
fix: support not
in query expressions
2021-05-05 16:05:32 -04:00
Zach Daniel
8d15cabd2a
fix: include aggregates in count request for aggregate filters
2021-05-04 12:27:25 -04:00
Zach Daniel
d767ba513e
fix: use base_query for aritifical limit/offset when loading
2021-05-04 09:27:33 -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
d16d2f35ce
improvement: inner later join for many to many relationships
2021-04-29 17:04:57 -04:00
Zach Daniel
3de71bc7f1
chore: fix test + compile
2021-04-28 17:43:02 -04:00
Zach Daniel
9da95e6d75
improvement: support relationship filters
2021-04-28 17:39:30 -04:00
Zach Daniel
312d19878b
improvement: add has
filter predicate
2021-04-27 13:45:23 -04:00
Zach Daniel
e11f399fc0
improvement: add :list
aggregate kind
2021-04-26 16:01:39 -04:00
Zach Daniel
9df3803492
fix: don't include NotLoaded
in manage_relationship
2021-04-25 18:35:19 -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
dd82fcc53b
improvement: add first class support for enum types
2021-04-21 13:32:25 -04:00
Zach Daniel
64876c6e19
fix: don't consider nils for pkey matching
2021-04-21 13:32:25 -04:00
Zach Daniel
d099bc87ee
chore: format code
2021-04-18 19:51:56 -04:00
Jason Axelson
85d9e8f86c
docs: use full module name ( #230 )
...
This will make the Query docs easier to follow
2021-04-18 19:46:21 -04:00
Jason Axelson
f6fa5a98dd
improvement: Add detailed parameter checking for Api read functions ( #229 )
2021-04-18 19:45:38 -04:00
Jason Axelson
a4262965ea
chore: Enable Credo's Readability.StrictModuleLayout ( #228 )
...
Enforce layout of module parts
2021-04-18 19:41:49 -04:00
Zach Daniel
060dadeff1
fix: clearer errors when resource fails to compile
2021-04-18 16:20:05 -04:00
Zach Daniel
a75bfd4203
improvement: add list access to context
2021-04-17 19:34:28 -04:00
Zach Daniel
33ac53faa5
fix: don't preload multiplicatively
2021-04-17 18:22:20 -04:00
Vadim Tsvetkov
0d13cd8b3d
fix: Decimal casting issues on ash_postgres ( #227 )
2021-04-17 15:00:43 -04:00
Zach Daniel
b028dad1cd
improvement: add Resource.input/1
2021-04-17 13:50:55 -04:00
Zach Daniel
bd7f4f9532
fix: use items for single constraints
2021-04-16 14:16:45 -04:00
Zach Daniel
ad2772034c
fix: don't overwrite select in side_load
2021-04-15 14:57:49 -04:00
Zach Daniel
5425660752
fix: load relationships for management properly
...
fix: `fetch_key` bug in embedded types
fix: handle_indexed_maps for embedded types
2021-04-14 23:38:51 -04:00
Zach Daniel
a6b880ce86
fix: handle no key provided to NotFound
...
chore: add tests for `get!`
2021-04-14 14:18:05 -04:00
Zach Daniel
c3c0abb239
docs: update documentation
2021-04-13 17:44:48 -04:00
Zach Daniel
2f634ae36a
improvement: special provisions for casting to embedded type (e.g uuid)
...
fix: embedded cast_stored must cast all key/values
fix: ci_string constraints when `nil`
fix: manage_relationship change turns embedded resources to maps
fix: fixes for common types parsing from embedded, e.g utc_datetime_usec
2021-04-13 17:41:16 -04:00
Zach Daniel
e20ffe9636
fix: get!
should raise on nil
not {:ok, nil}
2021-04-13 16:28:01 -04:00
Zach Daniel
0ee074c176
fix: allow_nil -> allow_nil_input
2021-04-13 16:22: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
567df21422
fix: always select necessary load fields for nested loads
2021-04-12 16:51:31 -04:00
Zach Daniel
3e29b4e00d
fix: always select necessary fields for side loading
2021-04-10 16:58:37 -04:00
Zach Daniel
c21e310996
fix: logic bug in selecting specific fields
2021-04-09 00:47:22 -04:00
Zach Daniel
250186a0ea
chore: update docs
2021-04-09 00:10:01 -04:00
Zach Daniel
ec57f363ed
improvement: support the datalayer selecting fields in reads
2021-04-09 00:10:01 -04:00
Zach Daniel
f454f98f3f
docs: add docs on managing relationships
2021-04-05 13:45:39 -04:00
Zach Daniel
425a1ce59e
chore: fix description
2021-04-04 16:01:37 -04:00
Michael St Clair
6805d431ac
improvement: add sum aggregate ( #221 )
2021-04-04 16:00:53 -04:00
Michael St Clair
fec77dd92f
allow specifying that calculation can't be nil ( #220 )
2021-04-04 03:11:43 -04:00
Zach Daniel
db26a1cc61
fix: update struct_field logic for latest ecto
2021-04-03 14:35:04 -04:00
Zach Daniel
7faf73097a
fix: apply proper interface operation when opts aren't passed
2021-04-02 10:21:10 -04:00
Zach Daniel
92344029d3
improvement: before_action?
on validate
, validate inline
2021-04-01 11:53:52 -04:00
Jason Axelson
274fc9ea88
chore: Misc doc updates ( #208 )
...
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2021-03-31 17:20:59 -04:00
Zach Daniel
d6ee71ce53
feat: support Ash.Query.distinct/2
...
feat: add `build/2` query preparation
fix: manage_relationships *before* after_action callbacks
2021-03-31 17:13:20 -04:00
Jason Axelson
fc705ad0a5
Documentation improvements and labeled examples ( #216 )
...
Improve documentation for calculations
Add ability to "label" examples by passing a tuple instead of just a string.
Fix some minor typos
2021-03-31 16:24:06 -04:00
Zach Daniel
29b2c821fe
fix: don't overwrite managed belongs_to
relationships
2021-03-29 14:48:42 -04:00
Zach Daniel
1d412c97cd
fix: handle on_lookup
+ on_no_match
for belongs_to
2021-03-29 14:04:53 -04:00
Zach Daniel
11d658d077
fix: fix required relationships and add test
2021-03-28 13:44:21 -04:00
Zach Daniel
e65d47d386
fix: fix required relationships
2021-03-28 13:44:21 -04:00
Zach Daniel
523f7bbc0d
fix: various managed_relationship fixes
2021-03-28 13:44:21 -04:00
Zach Daniel
2f9fafcbc7
feat: add manage relationship types
...
improvement: don't accept relationships on actions anymore
improvement: require arguments
This probably broke a lot of people's setups, but it was a
necessary change. Better to get this stuff out while we're
still beta
2021-03-25 11:33:32 -04:00
Zach Daniel
aeb1cad518
fix: add tenant metadata before after action hooks
2021-03-24 00:54:36 -04:00
Zach Daniel
8eba8d6b22
fix: support tenant
option in read interface
2021-03-24 00:24:42 -04:00
Darren Black
571eba3558
Resolve type aliases ( #207 )
2021-03-23 22:48:36 -04:00
Zach Daniel
5eec3d93b3
chore: release version v1.36.19
2021-03-22 17:37:44 -04:00
Zach Daniel
6c1108d834
fix: always return changeset when runner failed
2021-03-22 17:37:20 -04:00
Zach Daniel
44d574862b
improvement: docs + dialyzer + error improvements
2021-03-22 02:34:52 -04:00
Zach Daniel
41a91b8aa6
fix: don't require values when managing relationships
2021-03-21 23:00:17 -04:00
Zach Daniel
801778abbd
fix: Revert "fix: force_change_attributes before passing to action"
...
This reverts commit 4a0b2035b9
.
2021-03-21 22:17:41 -04:00
Zach Daniel
4a0b2035b9
fix: force_change_attributes before passing to action
2021-03-21 22:11:04 -04:00
Zach Daniel
4e8bd5bfbc
fix: exception on invalid query arguments
2021-03-21 14:19:45 -04:00
Zach Daniel
ac72c623d9
fix: allow casting strings as uuids (for embedded types)
2021-03-21 11:31:25 -04:00
Zach Daniel
ab31320e73
improvement: retain actor context from changeset
2021-03-21 11:31:01 -04:00
Jason Axelson
6c31956b56
improvement: Add float type ( #204 )
...
Also update `Ash.Type` documentation to use the float module as an
example of a custom type.
2021-03-21 00:09:27 -04:00
Zach Daniel
b155a5fb81
improvement: raise informative errors on bad inputs to for_*
2021-03-20 17:17:23 -04:00
Zach Daniel
b98650aeb7
fix: avoid exception in Changeset.new/2
for bad attribute
2021-03-20 17:16:57 -04:00
Zach Daniel
f1a6fb7418
fix: use ecto's uuid type under the hood
2021-03-20 16:27:11 -04:00
Zach Daniel
e206167f27
improvement: make Ash.Error
a public module
2021-03-19 18:23:48 -04:00
Zach Daniel
e0a368365c
improvement: docs/default value for params
2021-03-19 17:07:22 -04:00
Zach Daniel
6cfa91cc63
chore: fix lint
2021-03-18 23:37:34 -04:00
Zach Daniel
c2d121c0fe
fix: set source_field
when replacing belongs_to
relationship
2021-03-18 23:33:56 -04:00
Zach Daniel
60da316f58
fix: don't consider false
as absent value
2021-03-18 23:33:09 -04:00
Zach Daniel
0ef51ce9e6
improvement: trim whitespace in uuid
2021-03-18 23:32:56 -04:00
Zach Daniel
ba6b4202f9
fix: set argument name in manage_relationship
2021-03-18 23:32:12 -04:00
Zach Daniel
f3c85da268
improvement: improve the behavior of defaults
...
functional defaults are added at action time, others are added directly
into the changeset
2021-03-17 22:34:49 -04:00
Zach Daniel
a1c5f1d06f
fix: validate required attributes *after* before_action hooks
2021-03-16 23:09:36 -04:00
Zach Daniel
3e7b798e34
improvement: discard certain empty values for embed input
2021-03-16 21:41:19 -04:00
Zach Daniel
1b972b9598
fix: force_change attrs *after* for_create/update
2021-03-15 15:55:26 -04:00
Zach Daniel
e60acf4167
fix: pattern match errors in manage_relationships
...
fix: clean up some error cases
fix: only default accept to `public` attributes
2021-03-15 15:47:33 -04:00
Zach Daniel
f6026c6895
fix: allow_nil?: false + default interaction
2021-03-14 23:06:18 -04:00
Zach Daniel
a33e0b97b9
docs: fix redundancy in API docs
2021-03-14 18:45:10 -04:00
Zach Daniel
7eea6576a0
docs: fix dangling docs references
2021-03-14 18:29:30 -04:00
Zach Daniel
0109696d54
fix: remove the as
option
2021-03-14 17:50:11 -04:00
Zach Daniel
4df4e9a070
docs: remove interface docs
2021-03-14 17:48:39 -04:00
Jason Axelson
be56174a3d
docs: Fix some documentation warnings ( #196 )
...
i.e. warnings that appear when you run `mix docs`
Although this PR doesn't fix the majority of them, since the majority
are errors from referring to `@moduledoc false` modules in docs and typespecs.
2021-03-14 17:27:12 -04:00
Jason Axelson
3ba6b593b1
docs: Updates to the docs with a focus on the getting started docs ( #195 )
2021-03-14 17:14:53 -04:00
zimt28
a219bc0c6c
improvement: Add timestamps() attribute ( #198 )
2021-03-14 17:09:38 -04:00
Zach Daniel
5992fc00f7
docs: remove Ash from docs
2021-03-13 16:07:40 -05:00
zimt28
8ae003e382
docs: Update dsl.ex ( #193 )
2021-03-13 09:29:21 -05:00
zimt28
87390946bf
Fix documentation TOC ( #194 )
2021-03-13 09:26:57 -05:00
Zach Daniel
db47a15cf7
fix: properly validate allow_nil?: false
on update
...
fix: properly validate `allow_nil?: false` private attributes
2021-03-13 09:25:13 -05:00
Zach Daniel
3c2ffd8662
fix: set argument default on cast
2021-03-12 22:22:27 -05:00
Zach Daniel
55a35396a4
docs: add primary action docs
2021-03-12 22:22:27 -05:00
zimt28
deba10f236
docs: Fix doc ( #192 )
2021-03-12 22:21:03 -05: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
68f358d342
improvement: support get_by_<identity>
in interface
...
fix: fix `publish_all` pub_sub notifier
improvement: support sublists in pub_sub topics
improvement: support `:_tenant` in pub_sub topics
2021-03-09 16:16:02 -05:00
Zach Daniel
f4fcfb54a2
improvement: accept tenant
in for_read
...
fix: properly filter aggregates
2021-03-09 01:19:45 -05:00
Zach Daniel
5cfa4d5bf0
improvement: update interface to accept query/changesets
2021-03-08 17:19:13 -05:00
Zach Daniel
50f893e8db
docs: update notifier docs
2021-03-08 17:19:04 -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
6e1baad6b2
fix: don't reverse sub-entities in DSL
2021-03-07 15:19:53 -05:00