Jason
AEAsh Elixir
•Created by Jason on 9/17/2023 in #support
Filter check is returning an error tuple, rather than filtering rows.
Will do. Thanks!
23 replies
AEAsh Elixir
•Created by Jason on 9/17/2023 in #support
Filter check is returning an error tuple, rather than filtering rows.
Let me know if there is an easier, more recommended Ash way to do this.
23 replies
AEAsh Elixir
•Created by Jason on 9/17/2023 in #support
Filter check is returning an error tuple, rather than filtering rows.
router
<live_user_auth.ex>
23 replies
AEAsh Elixir
•Created by Jason on 9/17/2023 in #support
Filter check is returning an error tuple, rather than filtering rows.
Then that is also used for routing as well. For instance, if an unauthorized user tries to access a url that requires authorization, the condition defined as calculations is used to determine it is an unauthorized access and route them to the appropriate page.
23 replies
AEAsh Elixir
•Created by Jason on 9/17/2023 in #support
Filter check is returning an error tuple, rather than filtering rows.
Invisible was a simplified example. The real one is more complex like visible if admin, or author, or autorized by author, etc. It becomes pretty complex pretty quickly.
23 replies
AEAsh Elixir
•Created by Jason on 9/17/2023 in #support
Filter check is returning an error tuple, rather than filtering rows.
Yeah, I read it from the doc.
23 replies
AEAsh Elixir
•Created by Jason on 9/17/2023 in #support
Filter check is returning an error tuple, rather than filtering rows.
Ahhh.... makes perfect sense 🙂 Thank you.
I have been doing these filtering through making calculations (such as
calculate :invisible
, calculate: :is_author, etc) and then mixing and matching them in read actions. It appears that using policies can replace them in many cases, but it feels that having calculations will provide more flexibility because it can be used elsewhere (e.g., to show visibility of a task, rather than filtering invisible ones out altogether). Is there a useful rule of thumb in terms of where to define filters, for instance, policies vs. calculation+action?23 replies
AEAsh Elixir
•Created by Jason on 9/17/2023 in #support
Filter check is returning an error tuple, rather than filtering rows.
23 replies
AEAsh Elixir
•Created by Jason on 9/13/2023 in #support
Resource MyApp.Accounts.FriendLink is not present in any known Ash.Api module.
Oddly enough, I'm not getting that warning anymore. I didn't even change anything 🙂
12 replies
AEAsh Elixir
•Created by Jason on 9/13/2023 in #support
Resource MyApp.Accounts.FriendLink is not present in any known Ash.Api module.
on compile
12 replies
AEAsh Elixir
•Created by Jason on 9/13/2023 in #support
Resource MyApp.Accounts.FriendLink is not present in any known Ash.Api module.
Trying
resource FriendLink
now.12 replies
AEAsh Elixir
•Created by Jason on 9/13/2023 in #support
Resource MyApp.Accounts.FriendLink is not present in any known Ash.Api module.
Yes,
registry Registry
is there.12 replies
AEAsh Elixir
•Created by Jason on 9/10/2023 in #support
(Postgrex.Error) ERROR 42P18 (indeterminate_datatype) could not determine data type of parameter $1
This works!! So the concatenation was the key. Thanks!
17 replies
AEAsh Elixir
•Created by Jason on 9/10/2023 in #support
(Postgrex.Error) ERROR 42P18 (indeterminate_datatype) could not determine data type of parameter $1
Then I get " (Postgrex.Error) ERROR 42601 (syntax_error) syntax error at or near ""
|> Ash.Query.filter(fragment("(? ~* ?::text||\d+)", task_id, ^prefix))
17 replies
AEAsh Elixir
•Created by Jason on 9/10/2023 in #support
(Postgrex.Error) ERROR 42P18 (indeterminate_datatype) could not determine data type of parameter $1
If I run
where task_id::text ~* '^T::text\d+'
in pgadmin, it returns nothing because ::text is treated as part of the regex pattern. That makes me think type(^prefix, :string)` is not going to work, even if the error message goes away.17 replies
AEAsh Elixir
•Created by Jason on 9/10/2023 in #support
(Postgrex.Error) ERROR 42P18 (indeterminate_datatype) could not determine data type of parameter $1
Same error with the query repeating ::text 3 times.
17 replies
AEAsh Elixir
•Created by Jason on 9/10/2023 in #support
(Postgrex.Error) ERROR 42P18 (indeterminate_datatype) could not determine data type of parameter $1
It translates to this SQL statement, and I still get
"could not determine data type of parameter $1"
17 replies
AEAsh Elixir
•Created by Jason on 6/25/2023 in #support
no route found for POST /admin
after getting ash_admin, authentication, and authentication_phoenix from github.
73 replies
AEAsh Elixir
•Created by Jason on 6/25/2023 in #support
no route found for POST /admin
It's working!!
73 replies