Piotrek
Explore posts from serversDTDrizzle Team
•Created by Vilian on 8/19/2023 in #help
Query builder insert
Unless you're talking about something else haha
9 replies
DTDrizzle Team
•Created by Vilian on 8/19/2023 in #help
Query builder insert
You cannot insert with the relational query builder
9 replies
DTDrizzle Team
•Created by cal on 8/20/2023 in #help
findMany without additional options
Shouldn't
orderBy
be without the brackets? Idk if it's gonna change something but worth trying anyway6 replies
DTDrizzle Team
•Created by Liltripple_reid on 8/18/2023 in #help
planetscale
It's in the mysql2 version, using planetscale-serverless doesn't have it
3 replies
DTDrizzle Team
•Created by micaww on 8/14/2023 in #help
Is there a way to declare a custom SQL index?
https://github.com/drizzle-team/drizzle-orm/blob/09d699f212ee3dc9d7ea3dbea1c56c4416604273/drizzle-orm/src/pg-core/unique-constraint.ts#L51
Looking at the source code, if only supports table columns
6 replies
DTDrizzle Team
•Created by jakeleventhal on 8/12/2023 in #help
How do you get defined types for relational queries
Do what's better for you
13 replies
DTDrizzle Team
•Created by jakeleventhal on 8/12/2023 in #help
How do you get defined types for relational queries
But you'd have to export this type from below the query
13 replies
DTDrizzle Team
•Created by jakeleventhal on 8/12/2023 in #help
How do you get defined types for relational queries
It would also be updated with your schema, contrary to what the example above does
13 replies
DTDrizzle Team
•Created by jakeleventhal on 8/12/2023 in #help
How do you get defined types for relational queries
By inferring the return type for the query
13 replies
DTDrizzle Team
•Created by jakeleventhal on 8/12/2023 in #help
How do you get defined types for relational queries
In his case it would actually be something like that:
13 replies
DTDrizzle Team
•Created by jakeleventhal on 8/12/2023 in #help
How do you get defined types for relational queries
inference can be used in many places
13 replies
DTDrizzle Team
•Created by jakeleventhal on 8/12/2023 in #help
How do you get defined types for relational queries
type PostWithComments = typeof post;
can work13 replies
DTDrizzle Team
•Created by ultrakiller on 8/12/2023 in #help
How am I supposed to put unique constraints on columns
Can you update and restart ts server maybe?
13 replies
DTDrizzle Team
•Created by ultrakiller on 8/12/2023 in #help
How am I supposed to put unique constraints on columns
27.2 introduced unique it seems like... hm
13 replies
DTDrizzle Team
•Created by ultrakiller on 8/12/2023 in #help
How am I supposed to put unique constraints on columns
However this should still work
13 replies
DTDrizzle Team
•Created by ultrakiller on 8/12/2023 in #help
How am I supposed to put unique constraints on columns
28.2 is the latest, not 27.2 😄
13 replies
DTDrizzle Team
•Created by Xafets on 8/1/2023 in #help
Get `id` of inserted row
weird ¯\_(ツ)_/¯
23 replies
DTDrizzle Team
•Created by Xafets on 8/1/2023 in #help
Get `id` of inserted row
Yeah, returning is not for MySQL, however
insertId
is for MySQL exclusively23 replies
DTDrizzle Team
•Created by Xafets on 8/1/2023 in #help
Get `id` of inserted row
Oh ok, good to know haha
23 replies