Filter for articles with at least one comment
How to get a similar result of db.query but with extra aggregation and using select
Next 13, Next-Auth with Neon Postgres and Drizzle vs Prisma 5
error: column "x" is in a primary key
drizzle-kit push:pg
, this is the error I get, even if the schema has not changed at all.
Does anyone know what might cause this?...postgres error: type "serial" does not exist
error: type "serial" does not exist.
This is my schema:
```ts...planetscale cache error
MySql 8 - How to use onDuplicateKeyUpdate with array?
Performance difference between `.select()` and `.findMany()`
.select()
and .findMany()
when using in prepared statements?
Or any benefit of using one over the other? Which one is preferred in prepared statements?..."VALUES(Column)" abstraction ( quick )
[insert query here].onDuplicateKeyUpdate({ set: { name: sql'VALUES(name)'}})
.
I was wondering though, if there's any abstraction for the VALUES
function.
On the site: https://orm.drizzle.team/docs/insert#on-duplicate-key-update, it only shows example to set an fixed value or the one that was already set - emulating "do nothing behaviour" - is there any abstraction for that SQL function?...Prepared statement returns undefined
Prepared Update statements
.select()
, .findFirst()
, or .findMany()
, but I am having trouble with .update()
.
If possible, what would the syntax be? I am trying to update a verificationToken, and I would need two placeholders there. Tried something like this, but It's wrong:
```export const psUpdateEmailVerificationToken = db.update(users).set({...Schema to type
db:push constraint is not found in the table
Subtopic
DROP CONSTRAINT Subtopic_name_key
;',
sqlState: 'HY000',...Does schema declaration filepath have to be exactly as in docs?
/src/db/*
. Is it required to follow that filepath exactly, or is there a place you specify where to find your schema files?...Slow api request using a transaction
tsc command fails when using sqlite
tsc
command. Here's the output (shortened a lot though):
```
node_modules/drizzle-orm/mysql-core/db.d.ts:1:38 - error TS2307: Cannot find module 'mysql2/promise' or its corresponding type declarations.
1 import type { ResultSetHeader } from 'mysql2/promise';...Drizzle generates PG statement with parentheses on order by clause
Streaming results from mysql
Planetscale db:push has issues with default values
``
Warning You are about to execute current statements:
ALTER TABLE
comments MODIFY COLUMN
created_at timestamp DEFAULT (now());
ALTER TABLE
comments MODIFY COLUMN
updated_at` timestamp DEFAULT (now());...