wheresthegold_
wheresthegold_
DTDrizzle Team
Created by wheresthegold_ on 2/1/2024 in #help
Typing casting from JSON_OBJECT()
It's not a major issue I guess.. can just cast later in my code - just wondering if there's a method for casting inside the query that I missed.
8 replies
DTDrizzle Team
Created by wheresthegold_ on 2/1/2024 in #help
Typing casting from JSON_OBJECT()
Psuedo code sorry. For this bool field it will return for bool_field "1" or "0" compared to
db.select({bool_field: t.bool_field}).from(t)
db.select({bool_field: t.bool_field}).from(t)
which returns a true / false
8 replies
DTDrizzle Team
Created by wheresthegold_ on 2/1/2024 in #help
Typing casting from JSON_OBJECT()
db.select({foobar: sql`JSON_ARRAYAGG(JSON_OBJECT('bool_field', ${t.bool_field}))`}).from(t)
db.select({foobar: sql`JSON_ARRAYAGG(JSON_OBJECT('bool_field', ${t.bool_field}))`}).from(t)
8 replies
DTDrizzle Team
Created by Evan Deam on 11/27/2023 in #help
'columns' does not exist in object passed to primaryKey() fn
Did you end up solving this..?
3 replies