tellesleandro
tellesleandro
AEAsh Elixir
Created by tellesleandro on 9/29/2023 in #support
How to use Ash.Transform?
Perfect. Thanks.
4 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
Perfect. I'll give it a try.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
How do I use Ecto with Ash.Resource and w/o the Ecto.Schema?
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
BTW, is there a documentation for this?
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
Bingo. Simple like that. Worked like a charm. Thank you all.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
Wow. Trying right now. Thanks.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
The lack of this functionality in Ash sounds like I'm doing something wrong, but what I need is just as simple as a SELECT COUNT. Why this is not possible? Thanks for your support.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
Sorry for disturbing your meeting with Zach, but I need this initial guidance to move on.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
The timestamp field could be the inserted_at field.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
Something like SELECT COUNT(*) FROM parked_cars WHERE timestamp_field BETWEEN start_time AND end_time. start_time AND end_time are set by the user.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
There is a dashboard that shows the amount of cars parked in a parking lot in a day. The table is parked_cars and it has a timestamp field (the time the car arrived at the parking lot). I have to count how many cars is parked during a timespan.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
There's no parent relationship. It's a simple SELECT COUNT(*) FROM table.
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
34 replies
AEAsh Elixir
Created by tellesleandro on 9/27/2023 in #support
Ash.Query getting started docs
Thanks. I tried, but I'm still stucked. Maybe I missed something. Could you give an example how to write these queries: "SELECT COUNT(*) FROM table" and "SELECT MIN(field) FROM table"?
34 replies
AEAsh Elixir
Created by tellesleandro on 9/26/2023 in #support
belongs_to does not add _id attributes do resource
Alright. Thanks.
21 replies
AEAsh Elixir
Created by tellesleandro on 9/26/2023 in #support
belongs_to does not add _id attributes do resource
I'll do that. Thanks.
21 replies
AEAsh Elixir
Created by tellesleandro on 9/26/2023 in #support
belongs_to does not add _id attributes do resource
Just a note: the doc (https://ash-hq.org/docs/dsl/ash-resource#relationships-belongs_to) say that belongs_to "creates a field on the resource with the corresponding name and type, unless define_attribute?: false is provided". It makes me think that, by default, belongs_to takes care of all the configuration.
21 replies
AEAsh Elixir
Created by tellesleandro on 9/26/2023 in #support
belongs_to does not add _id attributes do resource
I have some forms that collect information about one resource and its "children" (as post and comments), than I have to insert in the database the resource (post) and all its children (comments) at once (in the same db transaction). Is Ash able to do it? How?
21 replies
AEAsh Elixir
Created by tellesleandro on 9/26/2023 in #support
belongs_to does not add _id attributes do resource
Yes, I tried that and it works. Thanks. Is this the right thing to do to insert a resource and its relation at once?
21 replies
AEAsh Elixir
Created by tellesleandro on 9/26/2023 in #support
belongs_to does not add _id attributes do resource
How do I insert in a table and in its relation when getting information from a form?
21 replies