Dush
DTDrizzle Team
•Created by Dush on 9/12/2024 in #help
Replacing hardcoded text value in `jsonb`
Hi everyone
I have this data in my
jsonb
column of my Postgres database:
And I have this current query that I search for a row based on a condition that depends on the json value above.
This query works fine and returns what is expected:
However when I try to replace "75" with a dynamic value I get an error of PostgresError: invalid input syntax for type json
Here is the code that I'm trying to work with:
I would appreciate any help and solution for this problem1 replies
DTDrizzle Team
•Created by Dush on 2/5/2024 in #help
Issue with SUM in sql template
This query works fine if the rows are available an produce the correct result.
But for conditions that the rows are 0,
boPending
and notLocked
result in null
I tried
but the result is same.
Is there any issue related to this that I can follow?
Are there any alteranitives using query builer instead of sql template?2 replies
DTDrizzle Team
•Created by Dush on 1/29/2024 in #help
Is custom mapping possible with Drizzle?
I'm trying to select from the mentioned table but instead of
I would like to get this result:
but I get this TS error:
Object literal may only specify known properties, and 'value' does not exist in type 'SQL<unknown> | Aliased<unknown> | PgColumn<ColumnBaseConfig<ColumnDataType, string>, {}, {}>'
is there a solution for that or should I do the mapping after the query?1 replies
DTDrizzle Team
•Created by Dush on 1/25/2024 in #help
selecting all the columns of table join
Hi everyone.
is there a supported syntax to select all the columns of a table join without defining them?
in SQL I use something similar to this:
13 replies
DTDrizzle Team
•Created by Dush on 1/11/2024 in #help
How to deal with the type of response in sql'' template
How can we deal with the types of sql'' template since the result is accessable from the
rows
property of result, Unlike the ORM itself.
For example rows are not type-safe here and I have to guess row manufacturer2 replies