Commit graph

455 commits

Author SHA1 Message Date
Zach Daniel
8e74ff62a6 fix: remove invalid boolean expression optimization
improvement: make form errors work better with phoenix

this involves temporarily making embed error messages *worse*
but we can improve them as we get more usage
2021-01-24 13:47:10 -05:00
Zach Daniel
61e6b7c80c fix: various ci_string improvements
feat: add `contains/2` query function
2021-01-23 22:28:56 -05:00
zimt28
63483822d6
Update transformer.ex (#179) 2021-01-22 20:26:23 -05:00
Zach Daniel
bb91fd4bc7 fix: add action filters in for_read/3
fix: don't let local runner processes mix up messages

fix: runtime filter filters properly
2021-01-22 16:41:32 -05:00
Zach Daniel
7ea9b082f1 improvement: support all string constraints for ci_string 2021-01-21 15:25:07 -05:00
Zach Daniel
f6f5d194bf feat: freeform expressions
feat: validatiosn in actions

feat: query arguments

feat: add `Ash.Query.for_read/3`

feat: return changeset with API errors

feat: add case insensitive string `CiString`/`:ci_string`

feat: support `context/1` and `arg/1` in filter templates

feat: support targeting notifications with the `for` option

feat: add `ago/2` query function

feat: add basic arithmetic operators (+, *, -, /)

feat: `sensitive?` option for attributes

feat: `sensitive?` option for arguments

feat: `private` arguments, which can’t be set using `for_<action>`

feat: add `prevent_change` which will erase changes just before the changeset is committed

feat: add `match?` validation that supports a custom error message

feat: add `interval` type to support `ago/2` function

feat: add `url_encoded_binary` type

feat: add `function` type

improvement: `changing?` is now a validation

improvement: add `Transformer.get_persisted/3`

improvement: add `api` field to `Notification`

improvement: standardize errors, add `to_error_class`

improvement: use `Comp` everywhere

Improvement: use action on changeset if set by `for_<action_type>`

improvement: `action_failed?` field on change sets

improvement: remove ability for data layers to add operators (for now at least)

Improvement: Changeset.apply_attributes/2 now returns an error tuple

Improvement: add a bunch of new/informative errors

improvement: runtime filter now uses left join logic (a naive implementation of it)

improvement: support more filter templates in resources

Improvement: basic/naive type system for operators/functions

Fix: properly expand module aliases for options w/o compile time dependency

chore(engine): track changeset changes for the request with `manage_changeset?: true`
2021-01-21 15:22:50 -05:00
zimt28
6ddae6850f
improvement: Add trim/allow_empty to string type (#171) 2021-01-15 20:41:21 -05:00
zimt28
2a7acffabb
Always validate constraints (#173) 2021-01-14 10:52:18 -05:00
Zach Daniel
13ca0b2976 chore: generalize DSL tooling 2021-01-14 01:17:26 -05:00
zimt28
31cb4f4be3
improvement: Improve attribute defaults (#164) 2021-01-12 15:40:55 -05:00
Zach Daniel
6a26a583de
feat: Add Embedded Resources (#170) 2021-01-12 15:05:56 -05:00
zimt28
db6bdfcf15
improvement: Add built in decimal type (#162) 2021-01-09 11:58:52 -05:00
zimt28
4404da93ce
fix: Correct error message (#163) 2021-01-09 11:36:01 -05:00
Zach Daniel
dbf9f82802 improvement: add Ash.Sort.parse_input/2
fix: fix small sort bugs
2021-01-08 14:22:31 -05:00
zimt28
72ba6c4742
improvement: Add built in usec datetime type (#160) (#161)
improvement!: Use usec timestamps by default
2021-01-08 12:12:37 -05:00
Zach Daniel
7ce72a7454 fix: only cast public relationships/attributes 2021-01-08 02:58:02 -05:00
Zach Daniel
8ef272b1ca fix: allow_nil?: false for integer_primary_key 2021-01-07 22:30:41 -05:00
Zach Daniel
424d020a7d improvement: add for_<action> helpers 2021-01-07 21:35:40 -05:00
Darren Black
fb5cc74329
improvement: Add built in binary type (#156)
Co-authored-by: Darren Black <darren@ifixsystems.com.au>
2021-01-06 22:46:20 -05:00
Zach Daniel
109ed9b19c fix: the __resource__ change broke some extensions 2021-01-06 15:15:43 -05:00
Zach Daniel
6eebe33c29 fix: add back extensions/1 helper to resources 2021-01-06 14:49:30 -05:00
Zach Daniel
86236a5962 fix: lazy loaded module issues (e.g in iex) 2021-01-06 14:39:56 -05:00
Zach Daniel
a886fecfd6 improvement: optimize not-in and fix dialyzer 2020-12-31 18:39:15 -05:00
Zach Daniel
60e0dad7b6 improvement: rework filter creation + subset checking
This is one of the most complicated parts of Ash. In order to pass
a filter statement to the satisfiability solver that we use, we have
to first transpile a *value* statement into a *boolean* statement.
This means that we need to embed the knowledge of mutual exclusivity
wherever possible. Authorization still works if the system doesn't know
the relationship between two value statements, as it will attach
the authorization filters if its not sure. But having this in place
should represent a fairly significant optimization in many cases.

Additionally, filter creation has a set of optimizations around the
`eq` and `in` operators to combine them whlie building a boolean
statement
2020-12-31 18:39:15 -05:00
Zach Daniel
d96f54b4c8 docs: format line breaks in bullet points 2020-12-30 17:11:23 -05:00
Zach Daniel
9ebbb6e683 improvement: support autocompletion on Api funcs 2020-12-30 16:45:44 -05:00
Zach Daniel
b16cbf7303 fix: validate read action existence 2020-12-30 15:28:00 -05:00
Zach Daniel
c1767e79b2 improvement: default actions 2020-12-30 11:55:40 -05:00
Zach Daniel
2c996c8168 fix: fix compile issues, add docs 2020-12-30 01:09:02 -05:00
Zach Daniel
251d7e03df docs: filter parsing docs 2020-12-30 00:58:34 -05:00
Zach Daniel
dcbbd21f0c improvement: add parse_input/3 to Ash.Filter 2020-12-30 00:49:32 -05:00
Zach Daniel
31e58bfc70 improvement: describe operator types 2020-12-29 14:23:55 -05:00
Zach Daniel
9efe0355e8 fix: only accept kw list in aggregate/5 2020-12-28 19:33:01 -05:00
Zach Daniel
42deba22f0 chore: update aggregate documentation 2020-12-28 19:25:16 -05:00
Zach Daniel
1719d97d2c chore: update docs 2020-12-28 19:20:52 -05:00
Zach Daniel
d600c55509
feat: support :first aggregate (#153)
feat: support more sort orders
2020-12-28 19:18:01 -05:00
Zach Daniel
ada5e0a2ae fix: separate builders + description in sections 2020-12-27 01:06:32 -05:00
Zach Daniel
28e26660a6 fix: support examples on dsl sections 2020-12-27 01:00:24 -05:00
Zach Daniel
fb6478c52b docs: add section examples 2020-12-27 00:49:51 -05:00
Zach Daniel
abff2e4b39 docs: update generated documentation to be single file 2020-12-26 23:54:36 -05:00
Zach Daniel
bfa4d0f924 fix: cast string argument names 2020-12-26 21:20:12 -05:00
Zach Daniel
281fced422 fix: uuid/id pkeys should allow_nil 2020-12-26 18:30:51 -05:00
Zach Daniel
744a903f24 fix: support operators on both sides for not_eq 2020-12-23 14:49:40 -05:00
Zach Daniel
2c585d28a4 fix: fix filtering for ets + mnesia data layers 2020-12-23 14:16:23 -05:00
Zach Daniel
935cbf8b26 fix: various pagination, runtime, and auth bugs 2020-12-23 12:45:49 -05:00
Zach Daniel
b94bd0ff83 fix: default pagination limit triggers pagination 2020-12-07 19:55:54 -05:00
Zach Daniel
3bc1086a0a chore: release version v1.25.2 2020-12-05 20:39:45 -05:00
Zach Daniel
75a50ceb82 fix: resolve warning from nimbleoptions deprecation 2020-12-05 20:39:21 -05:00
Zach Daniel
2b500071f3 improvement: support confirming arguments, test allow_nil? 2020-12-01 22:50:43 -05:00
Zach Daniel
0abf03065a feat: support arguments for actions 2020-12-01 22:09:37 -05:00
Zach Daniel
c6ea07896b test: various testing improvements 2020-12-01 00:51:24 -05:00
Zach Daniel
b7896dbf8f fix: various build fixes 2020-12-01 00:45:15 -05:00
Zach Daniel
0e3333c05f chore: update tests 2020-11-30 23:23:34 -05:00
Zach Daniel
cb7caa51a0 fix: various small utility fixes 2020-11-30 23:15:37 -05:00
Kyle Nguyen
0f47d808e3
fix: do not require private attributes in create api (#143) 2020-11-08 11:49:03 -05:00
Zach Daniel
c493c1616b
feat: add uuid_primary_key/2 and integer_primary_key/2 2020-11-07 00:31:13 -05:00
Zach Daniel
8fd26d66ca
fix: derived belongs_to attributes are required if their parent is 2020-11-07 00:09:04 -05:00
Zach Daniel
375123e653
fix: default create/update timestamps to private? 2020-11-05 21:27:11 -05:00
Zach Daniel
262be96ed3
fix: set proper pagination defaults 2020-11-05 21:05:32 -05:00
Zach Daniel
05a79c2dbd
chore: add built_in? ash type helper 2020-11-03 13:58:57 -05:00
Zach Daniel
bd190f91f2
docs: update docs 2020-11-03 00:43:57 -05:00
Kyle Nguyen
c732099240
feat: Add property: private? for attributes, relationships, aggregates, and calculations (#140) 2020-11-02 15:33:14 -05:00
Zach Daniel
46efda4db4
improvement: support specifying that some options are modules 2020-10-29 00:14:01 -04:00
Zach Daniel
2333d01ddf
feat: multitenancy! and tons of various fixes (#139) 2020-10-28 01:14:17 -04:00
Zach Daniel
fcf2f2c7ce
chore: fix tests/new behavior 2020-10-21 00:57:27 -04:00
Zach Daniel
ef66219780
fix: better not_found error handling 2020-10-21 00:52:47 -04:00
Zach Daniel
721555f232
fix: remove unused code 2020-10-20 18:53:12 -04:00
Zach Daniel
1bf2058233
fix: various fixes and improvements 2020-10-20 18:50:11 -04:00
A.shalaby
9020d3b36d
feat: Optimize relashionship records replacement (#135)
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2020-10-19 19:10:05 -04:00
Zach Daniel
ad24164e2e
fix: invalid function arg parsing w/ ref 2020-10-17 19:21:25 -04:00
Zach Daniel
59063ff928
chore: docs + def -> defp 2020-10-17 13:35:09 -04:00
Zach Daniel
b0bfec7e0f
feat: pubsub notifier (#134) 2020-10-17 13:06:27 -04:00
Zach Daniel
de474db4a6
fix: engine hanging on parallel requests 2020-10-16 01:47:34 -04:00
Zach Daniel
eb25d5b826
feat: add notifiers (#133) 2020-10-15 00:54:02 -04:00
Digit
78861b6a51
feat: Add :one_of constraint to the Atom type (#130) 2020-10-13 10:29:57 -04:00
Maarten van Vliet
57c0c7294e
docs: Switch titles to match contents of paragraphs (#132) 2020-10-12 10:38:11 -04:00
Zach Daniel
7d4212b5bf
fix: bugs with keyset pagination 2020-10-12 02:35:12 -04:00
Zach Daniel
f8fadc67e6
feat: Add pagination (#131) 2020-10-11 23:55:47 -04:00
Zach Daniel
bd6334385f
fix: parse functions properly 2020-10-09 20:59:43 -04:00
Zach Daniel
3c6c60f594
fix: fix dialyzer 2020-10-09 20:56:15 -04:00
Zach Daniel
084857bf83
fix: fix certain versions of elixir having issues 2020-10-09 20:44:15 -04:00
Zach Daniel
cd0998bb92
chore: fix CI + update docs 2020-10-09 10:13:44 -04:00
Zach Daniel
6392361f72
chore: fix lint 2020-10-08 01:59:02 -04:00
Zach Daniel
d928ca5f6e
feat: expression based filter 2020-10-08 01:22:55 -04:00
Zach Daniel
0c216c284d
Module updates (#129) 2020-10-07 01:17:17 -04:00
Zach Daniel
114e64f8b4
feat: filter rewrite to op/function/ref based structure 2020-10-06 00:58:06 -04:00
WolfDan
1d6066f247
fix: add module name to errors (#127) 2020-10-05 10:40:22 -04:00
A.shalaby
a2f5db08f4
fix: Fix composite key in changeset functions (#125)
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2020-10-03 02:37:17 -04:00
A.shalaby
0f805803e1
test: add changeset_test (#123)
Co-authored-by: Zach Daniel <zachary.s.daniel@gmail.com>
2020-10-02 14:48:49 -04:00
Zach Daniel
bce4f910f5
docs: update dsl extension docs 2020-09-25 14:34:31 -04:00
mario
6d719516c2
feat: added description for missing resources (#117) 2020-09-25 08:20:58 -04:00
Zach Daniel
2fae5e1ec5
chore: remove typespec temporarily to fix dialyzer 2020-09-25 00:46:10 -04:00
Zach Daniel
9d9f5aab51
chore: fix dialyzer 2020-09-25 00:42:32 -04:00
Zach Daniel
657dd4bfc2
docs: write up some engine docs 2020-09-25 00:36:50 -04:00
Zach Daniel
d1d84422ed
fix: typespec/error message improvements 2020-09-23 21:06:12 -04:00
mario
2efcf12818
feat: descriptions for actions and relationships (#116) 2020-09-22 17:48:46 -04:00
Zach Daniel
ca66133777
docs: organize modules/builtins docs 2020-09-22 11:22:21 -04:00
Zach Daniel
6df3f4eb17
docs: fix ash_graphql link 2020-09-22 11:02:21 -04:00
Zach Daniel
d10ae9bad1
docs: update query/authorization docs 2020-09-22 10:51:15 -04:00
Zach Daniel
e75ae597d2
docs: add links to extensions 2020-09-21 18:33:44 -04:00