$returningId returning extra rows
mysql2
driver in drizzle-orm
this:
console.log(await db.insert(table).values([row1, row2]).$returningId())
console.log(await db.insert(table).values([row1, row2]).$returningId())
Error when pulling from MySQL
yarn drizzle-kit pull
, I get the following error:
```
/<path redacted>/node_modules/drizzle-kit/bin.cjs:30727
Request2 = class extends GlobalRequest {
^...Get the count of a nested relation in findMany()
findMany()
query?
```ts
const data = await db.query.docs.findMany({
with: {
articles: {...How to `as` a table name
No overload matches call even with strict=true
Resolved: Need help with my multi column primary and foreign key table
Edge runtime issues after upgrading drizzle-orm to v0.34.1
INTERNAL_EDGE_FUNCTION_INVOCATION_FAILED
from vercel when visiting that route. I create a new drizzle client for every request like this:
```ts
import { Pool } from '@neondatabase/serverless';
import { drizzle } from 'drizzle-orm/neon-serverless';
const pool = new Pool({ connectionString: env.DATABASE_URL });...Extremely weird behaviour
Drizzle kit push and migrate don't match typescript schema
drizzle.config.ts
```ts
import { defineConfig } from 'drizzle-kit'...
bun documentation
bun:sqlite
is pretty unclear about the fact that you have to install @libsql/client
to do migrations and specifically it doesn't list that in the installation step. The error message if you don't have it installed also does not specify that installing @libsql/client
will fix the issue and installing better-sqlite3
will not.PgCore: QueryBuilder Issue
QueryBuilder
where if a subquery generated directly with a database connection (const connection = drizzle(client, { schema });
) works but if a subquery generated with a QueryBuilder
doesn't?Subquery select without left join
InferSelectModel does not work with a view
unable to use the `push` command
Cant drizzle-kit pull with next.js from supabase postgres
Trying to use deno...
Cannot use pgEnum with aws aurora
pgEnum
with the AWS aurora adapter, as i keep getting the same error over and over. It seems weird, as intellisense doesn't say that the types are wrong at all when i am doing the update query, but pg returns an error
ERROR: column "status" is of type "EmailStatus" but expression is of type text; Hint: You will need to rewrite or cast the expression.; Position: 31; SQLState: 42804
```ts
await db...Setting Procedures and Triggers and custom SQLs
mapping data inside select function
db client typing