DT
Drizzle TeamLuca
noob help: INSERT with JOIN SQL to Drizzle
Frontend developer dabbling with SQL for the first time in years. With the help of ChatGPT I have the following query which works as intended.
How do I construct with Drizzle such that I can supply my values using the
.values()
method?
AS
Andrii Sherman•349d ago
Still don't have a support for it but here is a tracking issue
https://github.com/drizzle-team/drizzle-orm/issues/398
L
Luca•349d ago
Thanks, what's a temporary workaround that I can employ in the meantime?
Is it possible to use the sql`` operator somehow?
AS
Andrii Sherman•349d ago
yes
you can use it
D
DivMode•232d ago
Looking to do something similiar, were you able to get it working @Luca?
The official Discord for all Drizzle related projects, such as Drizzle ORM, Drizzle Kit, Drizzle Studio and more!
7.3KMembers
View on DiscordWant results from more Discord servers?
More PostsOrderBy with dynamic queries dont work```
....orderBy(sql`${products.xyz} ${order}`)
```
```
error: syntax error at or near "$2"
```
ordeIs there a way to limit update to just 1 document?I know there will be multiple documents matching this where query, but I only want to update 1 of thHow to get InferModel to work with Relation model?Is there a way to get the infer type for a relation model? eg:
type User = InferModel<typeof users,MySQL column type: "Generated"?Does drizzle support defining generated columns? https://planetscale.com/courses/mysql-for-developeAnyone else having a weird issue with drizzle-kit push:mysql?I spun up a new project using Planetscale and I got a bizarre __vtschema error (see: https://github.Performance questionsI'm using Drizzle ORM with Planetscale DatabaseJS driver and my application has spots where I want tCan drizzle generate an initial schema from an existing db?I have a db that wasn't built using drizzle, but I'm interesting in moving over to it. Do I need toPrepared StementsI was looking into using AWS RDS Proxy with Prisma and ran into this
https://www.prisma.io/docs/guiReact Native SupportHi all
New to drizzle ORM, does it support React Native?
Thanksupdate multiple rowsHow can I update values in multiple rows at once?Running `drizzle-kit introspect:pg` returns "client password must be a string"I'm attempting to move from objection.js+knex.js over to Drizzle and I'm running `drizzle-kit introsnoob help : transaction not acid```
return await this.drizzle.db.transaction(async (trx) => {
const u = await trx
.seExplicit inferred types```ts
async loginWithGoogle(user: NonNullable<Request['user']>) {
const existingUser = await thiMany-to-Many where in far tableI'm trying to `findMany()` Pokemon(s) by a type name
```
pokemons pokemonsToType