Getting results in document form rather than record
{id: 1, user: "joe", posts: [{id : 1, title: "my first post"},{id : 2, title: "my second post"}]}
rather than in record form [{id: 1, user: "joe", post: {id : 1, title: "my first post"}}, ...}]
. I'm doing something like select({id ... post: {id: posts.id, title, posts.title}})
. Thanks.Unable to upgrade migrations if there are ones that do not change state but manipulate data
require() of ES Module is not supported planetscale serverless + sveltekit
MySQL Standalone queryBuilder?
Applying migrations with drizzle-orm/pg-core
What is the type for an .orderBy() parameter
db.select().from(users).where(...).orderBy(asc(users.username))
db.select().from(users).where(...).orderBy(asc(users.username))
MySqlInsertValue<> vs typeof Table type mismatch
await db.insert(table).values(props);
await db.insert(table).values(props);
Argument of type 'SQL<unknown>' is not assignable to parameter
documented types for the return of `drizzle()` and the return of `mysqlTable()`
.andWhere()
.andWhere()
isn't a function, but I'm wondering if there's a way to start a query in one function, and return it. And then have the receiver be able to continue to add to the where clause?
Something like:
```ts...Example failed to run: `pg` does not provide an export named `Pool`
README
file. I made a minial version, installed pg
, @types/pg
, drizzle-orm
and drizzle-kit
and tried to run it via tsx
.
This is my stripped down example:
```
import { drizzle } from "drizzle-orm/node-postgres";...how do you pass a query in a typesafe way?
db.select().from(users).where(like(users.email, '%@gmail.com'))
db.select().from(users).where(like(users.email, '%@gmail.com'))
help with column builder types
InferModel
to get the column types from my schema, I'm getting
```ts...migration on mysql errors
drizzle-kit generates mysql 8 syntax, but AWS Aurora uses 5.7 syntax, any way to switch?
error: there is no transaction in progress
Having a problem just connecting with drizzle