Oupsla
Oupsla
DTDrizzle Team
Created by Oupsla on 7/22/2024 in #help
Alias values rows in insert with mysql
4 replies
DTDrizzle Team
Created by Oupsla on 7/22/2024 in #help
Alias values rows in insert with mysql
Yes at the moment, it is not even fully compatible with Drizzle because you have to write custom sql to pick values Eg.
await drizzleClient
.insert(foo)
.values([...])
.onDuplicateKeyUpdate({
set: {
bar: sql`VALUES(${foo.bar})`
},
});
await drizzleClient
.insert(foo)
.values([...])
.onDuplicateKeyUpdate({
set: {
bar: sql`VALUES(${foo.bar})`
},
});
And yes this syntax could break in the futur. But I can open an issue to allow aliasing of rows 👍
4 replies