Commit graph

1248 commits

Author SHA1 Message Date
Zach Daniel
c591bf6746 improvement: clean up new create authorization simplification 2022-10-05 20:08:36 -04:00
Zach Daniel
be68aa041b improvement: remove the need for SetTypes 2022-10-05 19:32:47 -04:00
Frank Dugan III
e805d2a9c4
fix: policy fixes from pair session (#403) 2022-10-05 19:25:12 -04:00
Zach Daniel
3dfabb8879 improvement: add some info to policy errors 2022-10-05 17:48:22 -04:00
Zach Daniel
978e3ef6f0 improvement: experimental support for calcualtions accepting expression arguments 2022-10-05 15:02:45 -04:00
Zach Daniel
0efad5ae4e improvement: various Ash.Flow improvements, including returning the new Ash.Flow.Result 2022-10-04 16:21:38 -04:00
George Rodrigues
1f685a1413
docs: fix typos (#402) 2022-10-04 16:01:42 -04:00
Zach Daniel
c24d8e6d21 Revert "fix: switch from no_depend_modules in most places"
This reverts commit 650d8920e4.
2022-10-04 11:22:24 -04:00
Zach Daniel
03803734f3 fix: don't evaluate expressions incorrectly after casting 2022-10-04 04:10:35 -04:00
Zach Daniel
f60cc5b43d fix: add back in new/2 to Changeset 2022-10-04 01:58:27 -04:00
Zach Daniel
008e3a3751 docs: update docs for Ash.Changeset.new 2022-10-04 01:31:22 -04:00
Zach Daniel
dd6fd1fbc3 improvement: allow select/load callbacks for calcs to return irrelevant keys
test: add a test case for nested required calculations
2022-10-04 00:22:40 -04:00
Zach Daniel
e7847501f7 fix: properly load nested calcs 2022-10-04 00:11:54 -04:00
Zach Daniel
650d8920e4 fix: switch from no_depend_modules in most places 2022-10-03 21:47:45 -04:00
Zach Daniel
ab5cffa371 improvement: optimize load equality matching by not using Comp 2022-10-03 16:35:02 -04:00
Juha
fdebbeb242
improvement: Forbid reserved field names (#388)
Co-authored-by: Juha Lehtonen <juha.lehtonen@relexsolutions.com>
2022-10-03 16:19:16 -04:00
SpaceEEC
ace38cd31f
improvement: validate accepted and rejected attributes in actions (#395) 2022-10-03 12:16:53 -04:00
SpaceEEC
14a1b92963
feat: show_private? option for diagrams (#396) 2022-10-03 11:30:10 -04:00
Zach Daniel
2c685a6a2e fix: properly display compare/2 error message 2022-10-02 20:56:18 -04:00
Zach Daniel
c53eae58cd improvement: support zero argument functions in compare/2 2022-10-02 20:46:30 -04:00
Zach Daniel
329dfed138 fix: use the short type for aggregate types 2022-10-01 22:33:08 -04:00
Zach Daniel
ade0031081 fix: kind_to_type/2 returns tagged tuple 2022-10-01 22:25:49 -04:00
Josh Price
3d2f8277ad feat: generate mermaid entity relationship diagrams from a given api (#376) 2022-10-01 22:22:00 -04:00
Zach Daniel
95a4aa3708 improvement: optimize for relates_to_actor_via 2022-09-30 15:13:04 -04:00
Zach Daniel
8dca72c49d chore: fix mix tasks list 2022-09-29 16:26:46 -04:00
Zach Daniel
6f14cf0263 docs: add mix_tasks to doc_index 2022-09-28 20:59:47 -04:00
Zach Daniel
0e13456eb0 improvement: optimize relates_to_actor_via checks 2022-09-28 20:37:19 -04:00
Zach Daniel
6c94e5e578 chore: ensure calc module compiled (shouldn't have to do this) 2022-09-28 18:00:51 -04:00
Zach Daniel
fec01e32fa chore: log at_path in exists error message 2022-09-28 16:56:13 -04:00
Zach Daniel
fdbc5faeea fix: use at_path when parsing Exists 2022-09-28 16:49:11 -04:00
Zach Daniel
b12b5e34bb fix: properly require a condition of a following bypasses 2022-09-28 16:38:32 -04:00
Zach Daniel
6a172cce18 fix: don't transform == nil to is_nil automatically 2022-09-28 12:32:02 -04:00
Zach Daniel
68d0e8f55d fix: pass path down to keyword list errors 2022-09-28 01:52:41 -04:00
Zach Daniel
24bdf9058e improvement: catch more cases in preflight authorization checks 2022-09-27 14:58:48 -04:00
Zach Daniel
bc6daa56dd fix: bad pattern in filter.ex, fix dialyzer 2022-09-27 14:08:29 -04:00
Zach Daniel
8f1a43419b fix: attempt to evaluate filter checks for strict checks
closes: #385
2022-09-26 20:41:53 -04:00
Zach Daniel
f629de6808 fix: only return errors when there actually are errors 2022-09-26 19:18:42 -04:00
Zach Daniel
716fcf7c25 fix: return an error if data_layer_query/2 is given a query with errors 2022-09-26 19:13:08 -04:00
Zach Daniel
dc83e26fd8 chore: remove debugging raise statements 2022-09-26 18:41:39 -04:00
Zach Daniel
dcc6879bc1 chore: better error message for allow_nil? belongs to primary key 2022-09-26 18:09:16 -04:00
Zach Daniel
a8bce0ab23 improvement: lazily set required loads/selects for calcs/sorts 2022-09-26 18:08:18 -04:00
Zach Daniel
fe596db0b8 improvement: reselect any necessary fields when loading calcs
docs: tons of new documentation
improvement: set context when creating related filters allowing checks like `filtering_on`
2022-09-25 23:58:05 -04:00
Zach Daniel
3b803d4c55 fix: various fixes with complex policy statements
improvement: simplify filter statements further
improvement: don't overconstraint filters on related data
test: get started on some more complex policy tests
2022-09-25 13:21:17 -04:00
Zach Daniel
8f3e388c27 fix: ensure fields selected in-line when loading calcs 2022-09-23 10:44:29 -04:00
Zach Daniel
8031f1b698 improvement: any filter being statically true means :authorized 2022-09-22 21:06:57 -04:00
Zach Daniel
fbcd745401 improvement: properly mark conditions w/ access_type
fix: handle statically false conditions in filter logic
2022-09-22 21:03:33 -04:00
Zach Daniel
ac30194601 improvement: use IsNil instead of Eq when either side is nil 2022-09-22 18:27:05 -04:00
Zach Daniel
621cb6854e improvement: handle string dates for embeds 2022-09-22 09:42:16 -04:00
Zach Daniel
d4a6feb589 fix: cast embedded datetimes properly 2022-09-22 03:00:06 -04:00
James Harton
479b09951c
fix(Ash.Calculation): fix return type for load/3 callback. (#384) 2022-09-22 00:44:09 -04:00
Zach Daniel
7ef2f4884c improvement: remove __timestamps__ in favor of simpler macro
docs: add extending resources guide
2022-09-21 18:49:59 -04:00
Zach Daniel
739bf52309 fix: warn instead of raise on :replace usage
fix: handle var_args expression with literal args
2022-09-21 13:00:12 -04:00
Zach Daniel
5994c1b51f chore: fix dialyzer, add embedded resources guide back 2022-09-21 12:20:00 -04:00
Zach Daniel
48bcf1ca1f chore: relate_and_unrelate -> append_and_remove everywhere 2022-09-20 22:50:03 -04:00
Zach Daniel
980779fa7d fix: fix replace_relationship type 2022-09-20 22:38:08 -04:00
Zach Daniel
b4766d1ccc chore: set typespec to proper return value 2022-09-20 20:00:30 -04:00
Zach Daniel
39b143e19e chore: undo typespec that is complaining for some reason 2022-09-20 19:48:45 -04:00
Zach Daniel
1f6fb8d7af chore: fix tests 2022-09-20 19:44:04 -04:00
Zach Daniel
3903e36d29 improvement: update to latest spark, support dsls in resource info 2022-09-20 16:09:40 -04:00
Zach Daniel
87f20369bc improvement: deprecate :replace in favor of :relate_and_unrelate 2022-09-19 15:44:06 -04:00
Zach Daniel
2ca0f09444 improvement: add loading?/1 query helper
improvement: add `loading/1` built in check
2022-09-19 10:14:08 -04:00
Zach Daniel
bee3a6ea09 fix: properly handle args/nested expression for tuple calcs 2022-09-16 03:54:17 -04:00
Zach Daniel
003ba3246b fix: add a case for calculations as tuples in expr filters 2022-09-16 03:47:12 -04:00
Zach Daniel
cc5c1b69c0 fix: return count, not {:ok, count} 2022-09-15 17:12:40 -04:00
Zach Daniel
301d5b56d9 fix: bad return value when async fetching counts 2022-09-15 17:06:56 -04:00
Zach Daniel
405019d33b fix: remove dbg() call 2022-09-15 16:54:58 -04:00
Zach Daniel
da282d1193 docs: hide a function from docs 2022-09-15 16:52:06 -04:00
Zach Daniel
266ecc8249 fix: nil casts as any type (sort of) 2022-09-15 02:15:23 -04:00
Zach Daniel
1b2d351721 fix: return nil on nil inputs for length/1 2022-09-15 02:12:51 -04:00
Zach Daniel
d7b446bc7f fix: properly reraise errors raised in tasks 2022-09-15 02:08:30 -04:00
Zach Daniel
f084d346ad fix: properly return errors from tasks 2022-09-15 01:09:12 -04:00
Zach Daniel
2c2c207e68 fix: use Comp.equal?/2 when finding loaded data matches 2022-09-15 00:55:04 -04:00
Darren Black
865d028667
chore: Guard length function for invalid input (#380) 2022-09-15 00:10:01 -04:00
Zach Daniel
a5f51e8f1b fix: properly error on types when evaluating expressions at runtime 2022-09-14 22:31:32 -04:00
Zach Daniel
4b88300e00 fix: properly surface errors all the way from runtime filters 2022-09-14 20:05:51 -04:00
Zach Daniel
3baf2b8c97 fix: properly catch errors when running expressions at runtime 2022-09-14 19:50:07 -04:00
Darren Black
a572099e24
improvement: Implement length function (#379) 2022-09-14 13:28:42 -04:00
Zach Daniel
08642b9123 chore: update typespec for attribute 2022-09-14 13:20:24 -04:00
Zach Daniel
2dae8ffa44 improvement: validate aggregate paths supported 2022-09-13 16:24:55 -04:00
Zach Daniel
e36f8c3e59 improvement: add filterable? option to relationships
improvement: add data layer capability for aggregate relationships & filter relationships
improvement: add guide on manual relationships
2022-09-13 13:53:05 -04:00
Zach Daniel
4260b9a1c9 fix: inspect the match for default message 2022-09-13 13:53:05 -04:00
Zach Daniel
827548f737 chore: fix typespec for aggregate_type/2 2022-09-12 13:43:18 -04:00
Zach Daniel
f583ababbc fix: fix keyset pagination ordering bug
fix: short names are snake cased
2022-09-12 11:17:44 -04:00
Zach Daniel
d32efadb62 improvement: add aggregate_type/2 helper 2022-09-12 11:17:44 -04:00
Zach Daniel
5c81d2b4a7 fix: properly do pagination
docs: fix some docs, add some guides
2022-09-11 22:19:37 -04:00
Zach Daniel
3644d05cd6 Revert "improvement: make two queries for full keyset pagination support"
This reverts commit 64b3312cb9.
2022-09-11 18:35:02 -04:00
Zach Daniel
8c7ddf703c chore: warnings 2022-09-11 16:10:11 -04:00
Zach Daniel
64b3312cb9 improvement: make two queries for full keyset pagination support
docs: add store context in process guide
2022-09-11 16:07:21 -04:00
Zach Daniel
fbebcf6670 fix: handle pins in exists 2022-09-07 17:53:18 -04:00
Zach Daniel
1c1c375d66 fix: add better error for exists/2 2022-09-07 17:15:18 -04:00
Zach Daniel
f381014fd1 fix: use root_resource for related path in filter 2022-09-07 17:00:16 -04:00
Zach Daniel
9ddc2aeb0d fix: set root_resource in exists parsing 2022-09-07 16:26:49 -04:00
Zach Daniel
ac60cda9ac docs: add docs for all builtins 2022-09-07 15:03:09 -04:00
Zach Daniel
0368c1a8da fix: error fetching relationships in filter expressions
docs: more docs on upgrade/policies guide
2022-09-07 12:53:29 -04:00
Zach Daniel
12c46a8da9 fix: filter check typespecs
docs: add docs on `expr/1` policies and using `exists/2`
2022-09-06 22:38:56 -04:00
Zach Daniel
171b7bbdf3 fix: runtime filter handle new relationship shape 2022-09-06 18:17:36 -04:00
Zach Daniel
619adcee93 improvement: add exists/2 expression 2022-09-06 18:02:01 -04:00
Zach Daniel
b98dc5ffd5 docs: update moduledocs and types 2022-09-04 00:56:41 -06:00
Zach Daniel
9ac4eafb87 fix: the semantics of forbid_unless were not wrong
docs: remove some formatting
2022-09-04 00:53:52 -06:00
Zach Daniel
31d1d925ef fix: forbid_unless expression compilation
docs: add some more expression template docs
fix: fix runtime filter join simulation for multiple rows
2022-09-03 21:34:55 -06:00
Zach Daniel
5134673fed chore: fix tests 2022-08-31 10:51:12 -06:00
Zach Daniel
4c90ab5d1f chore: fix ets test 2022-08-30 17:00:45 -06:00
Zach Daniel
c380cc1a14 docs: sanitize things for docs 2022-08-30 16:45:55 -06:00
Zach Daniel
bf67aef99f chore: bump pre version
fix: typo in dsl
2022-08-30 12:37:43 -06:00
Zach Daniel
1ff91f303d improvement: update ash docs 2022-08-30 12:27:03 -06:00
Zach Daniel
696f7ca82a fix: small fix to get_path
improvement: support `read_action` in embeddable types, and optimize loading
docs: more documentation
2022-08-30 11:18:10 -06:00
Zach Daniel
85b2d0d50c chore: fix lint 2022-08-30 02:23:13 -06:00
Zach Daniel
ae3f4290d2 docs: update pub_sub example 2022-08-30 02:22:46 -06:00
Zach Daniel
834d99c57e fix: runtime filter checking is unknown for non-selected values
docs: tons of work on docs/guides
2022-08-30 02:22:15 -06:00
Zach Daniel
005bb3ea3c fix: typo on private -> private? 2022-08-29 08:57:52 -06:00
Zach Daniel
54deb28d2e fix: make private:0 overridable 2022-08-29 08:57:25 -06:00
Zach Daniel
89c7f15b85 fix: always select always_select? fields
improvement: add `private?/0` callback to functions
docs: reword some docs
2022-08-29 08:54:11 -06:00
Zach Daniel
7930e3efa1 fix: don't fail to build Phoenix.Socket.Broadcast 2022-08-29 08:05:12 -06:00
Zach Daniel
5924833c1d fix: use ensure_compiled/1 to detect Phoenix.Socket.Broadcast 2022-08-28 22:39:51 -06:00
Zach Daniel
6c40747320 improvement: options for prepending/appending hooks
docs: guides improvements
2022-08-28 19:27:44 -06:00
Zach Daniel
b181a8d4cf improvement: add flow chart generator 2022-08-28 19:27:44 -06:00
Zach Daniel
a262e58ffb fix: validate args in the proper order 2022-08-28 19:27:44 -06:00
Zach Daniel
1bb3468851 improvement: add tracing and telemetry 2022-08-28 19:27:44 -06:00
Zach Daniel
caf9a2340e fix: various issues w/ over/under-selecting data 2022-08-28 19:27:44 -06:00
Zach Daniel
2e6ec5b8b4 docs: total docs reorg 2022-08-28 19:27:44 -06:00
Zach Daniel
603f845952 chore: update spark 2022-08-28 19:27:44 -06:00
Zach Daniel
e37f62284b chore: update doc links 2022-08-28 19:27:44 -06:00
Zach Daniel
0b7f48b7c2 fix: string goes before ci_string in function typings always 2022-08-28 19:27:44 -06:00
Zach Daniel
c7640abfef improvement: better scope simple data layer context
docs: better language around simple data layer in getting started guide
2022-08-28 19:27:44 -06:00
Zach Daniel
feee4516bc fix: properly halt in ets dump_to_native reducer 2022-08-28 19:27:44 -06:00
Zach Daniel
d7a9ff7996 improvement: move docs out of priv, update spark 2022-08-28 19:27:44 -06:00
Zach Daniel
f678c585d6 WIP: on guides 2022-08-28 19:27:44 -06:00
Zach Daniel
87eca9fdcd fix: use proper link identifier 2022-08-28 19:27:44 -06:00
Zach Daniel
edb0887d19 fix: section link format error 2022-08-28 19:27:44 -06:00
Zach Daniel
8786df69f3 fix: fix section docs format 2022-08-28 19:27:44 -06:00
Zach Daniel
a806cac2e2 fix: properly list entries for ensuring no embeds 2022-08-28 19:27:44 -06:00
Zach Daniel
f50484cf98 fix: properly get entries registry DSL structure 2022-08-28 19:27:44 -06:00
Zach Daniel
b5796ff65b fix: typo in rebase 2022-08-28 19:27:44 -06:00
Zach Daniel
6d98b78227 improvement: unlock flow
improvement: pagination as a DSL
improvement: don't block engine on async tasks
2022-08-28 19:27:44 -06:00
Zach Daniel
f9941a6c75 improvement: update spark, use new transformer style 2022-08-28 19:27:44 -06:00
Zach Daniel
656bd22085 docs: docs and links for everything 2022-08-28 19:27:44 -06:00
Zach Daniel
8f2c74da74 docs: fix docs for check/4 2022-08-28 19:27:44 -06:00
Zach Daniel
04744f395f improvement: move functions to more conventional places
improvement: move ash.formatter task to `spark.formatter`
2022-08-28 19:27:44 -06:00
Zach Daniel
6c79519b6c improvement: make long-awaited DSL name changes 2022-08-28 19:27:44 -06:00
Zach Daniel
44adc9a1b8 improvement: upgrade spark, move to its formatter 2022-08-28 19:27:44 -06:00
Zach Daniel
a5f616812b improvement: replace Ash DSL underpinnings with Spark 2022-08-28 19:27:44 -06:00
Zach Daniel
8a87e7c891 fix: don't try to use record as input when updating embed 2022-08-28 18:51:43 -06:00
Zach Daniel
bb4a3b34b3 fix: fix read! typespec 2022-08-24 12:50:26 -04:00
Zach Daniel
18515dd82a fix: don't raise random error :| 2022-08-24 12:00:17 -04:00
Zach Daniel
91d3bf314a fix: properly handle "bare" references, and track it for potential later use 2022-08-24 11:54:12 -04:00
Zach Daniel
80833c3f58 improvement: handle the case where managed relationship input is an embed 2022-08-22 19:48:22 -04:00
Zach Daniel
584a927776 improvement: add value_is_key option for managed relationships 2022-08-22 12:26:31 -04:00
Darren Black
548247a8b7
fix: False default value for argument is nil in changeset (#364) 2022-08-22 10:41:25 -04:00
Zach Daniel
3a69b3104e fix: ignore belongs_to in preflight attribute check 2022-08-17 20:58:11 -04:00
Mike Buhot
150f7178b8
improvement: Replace usage of Timex.shift with builtin Calendar functions (#362) 2022-08-17 19:18:03 -04:00