PrismaP
Prisma7mo ago
17 replies
Francisco Hermida

D1_ERROR: too many SQL variables at offset 340: SQLITE_ERROR

Prisma 6.10.1 / D1 adapter

This error occurs when calling findMany with 100 rows, each including nested 100 rows.

If I reduce the number of rows on both (e.g. take:10) it works.

Is this an error with the chunking or a limitation with D1 adapter with no plan of being supported?

datasource db {
    provider = "sqlite"
    url      = "file:./db.sqlite"
}

generator client {
    provider        = "prisma-client"
    previewFeatures = ["queryCompiler", "driverAdapters"]
    output          = "../generated/prismaClient"
    runtime         = "cloudflare"
    moduleFormat    = "esm"
}
Was this page helpful?