ericmartinezr
DTDrizzle Team
•Created by ericmartinezr on 12/8/2023 in #help
Window function fails with many-to-one relationship
Hello guys,
I'm trying to use a window function to sum some values with a many-to-one relations but it's failing with this error
You cannot use the window function 'sum' in this context.
With the following query
The schema is as follows:
And this is the query I'm trying to execute
Hopefully I was clear enough and I appreciate your help in advance.4 replies
DTDrizzle Team
•Created by ericmartinezr on 11/29/2023 in #help
Return array when parsing a schema with drizzle-valibot
Hello guys, I just started using drizzle-valibot and I'm not able to find in their docs nor yours how to return an array when parsing a schema
Or do I have to iterate over the array and parse each item by myself?
Thanks in advance!
PS: I tried to add drizzle-valibot as a tag but it doesn't exist
Thanks in advance!
PS: I tried to add drizzle-valibot as a tag but it doesn't exist
2 replies
DTDrizzle Team
•Created by ericmartinezr on 11/20/2023 in #help
How to use inner join with rqb?
Hello there!
Having the following schema
This query gives me all the "proyectos" when I actually want only those that match "plataformas" with id (aka plataforma) "[10,12]"
because drizzle is using LEFT JOIN to join the tables.
Is there a way to use "inner join" to filter all the rows with the inner where?
I'm still learning drizzle so I may be making a mistake anywhere else.
I hope I made myself clear enough (english is not my main language)
Thanks in advance!
11 replies
DTDrizzle Team
•Created by ericmartinezr on 11/18/2023 in #help
Relational and sql-like query apis in the same file
Hello! My first question here. Drizzle looks really cool and I'm trying to learn it.
I have this scenario where I have my schema file like this
Then I use it in my service file
This works just fine but I also have the other kind of query type
But I don't like having to add
schema.
everytime so I specify in the import what I want exactly
This works fine but then the next stops working and it doesn't recognize it anymore
Is there a way to have both kind of queries in the same file without doing anything special?6 replies