b0o
b0o
Explore posts from servers
DTDrizzle Team
Created by b0o on 6/27/2023 in #help
Why is insertId a string, not a number?
This was answered in tweet: MySQL does not provide returning and you always have to make an extra select and we don't do anything implicitly. That's a little less DX, but in a long run it's a win for everybody
10 replies
DTDrizzle Team
Created by b0o on 6/27/2023 in #help
Why is insertId a string, not a number?
10 replies
DTDrizzle Team
Created by b0o on 6/27/2023 in #help
Why is insertId a string, not a number?
It doesn't have returning 😦 I wish it did
10 replies
DTDrizzle Team
Created by b0o on 6/27/2023 in #help
Why is insertId a string, not a number?
export interface ExecutedQuery {
headers: string[]
types: Types
rows: Row[]
fields: Field[]
size: number
statement: string
insertId: string
rowsAffected: number
time: number
}
export interface ExecutedQuery {
headers: string[]
types: Types
rows: Row[]
fields: Field[]
size: number
statement: string
insertId: string
rowsAffected: number
time: number
}
10 replies
DTDrizzle Team
Created by b0o on 6/27/2023 in #help
Why is insertId a string, not a number?
Actually, I think this has nothing to do with drizzle, it seems it's coming from PlanetScale's database.js: https://github.com/planetscale/database-js/blob/8b1a360abd9b7b28ab953984e2aa9bd242d8a169/src/index.ts#L27
10 replies