{"id":"d2108d1cca611290","repo":"drizzle-team/drizzle-orm","slug":"method-not-implemented-d2108d","errorCode":null,"errorMessage":"Method not implemented.","messagePattern":"Method not implemented\\.","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"drizzle-orm/src/prisma/sqlite/session.ts","lineNumber":50,"sourceCode":"\n\toverride all(placeholderValues?: Record<string, unknown>): Promise<T['all']> {\n\t\tconst params = fillPlaceholders(this.query.params, placeholderValues ?? {});\n\t\tthis.logger.logQuery(this.query.sql, params);\n\t\treturn this.prisma.$queryRawUnsafe(this.query.sql, ...params);\n\t}\n\n\toverride async run(placeholderValues?: Record<string, unknown> | undefined): Promise<[]> {\n\t\tawait this.all(placeholderValues);\n\t\treturn [];\n\t}\n\n\toverride async get(placeholderValues?: Record<string, unknown> | undefined): Promise<T['get']> {\n\t\tconst all = await this.all(placeholderValues) as unknown[];\n\t\treturn all[0];\n\t}\n\n\toverride values(_placeholderValues?: Record<string, unknown> | undefined): Promise<never> {\n\t\tthrow new Error('Method not implemented.');\n\t}\n\n\toverride isResponseInArrayMode(): boolean {\n\t\treturn false;\n\t}\n}\n\nexport interface PrismaSQLiteSessionOptions {\n\tlogger?: Logger;\n}\n\nexport class PrismaSQLiteSession extends SQLiteSession<'async', unknown, Record<string, never>, Record<string, never>> {\n\tstatic override readonly [entityKind]: string = 'PrismaSQLiteSession';\n\n\tprivate readonly logger: Logger;\n\n\tconstructor(\n\t\tprivate readonly prisma: PrismaClient,","sourceCodeStart":32,"sourceCodeEnd":68,"githubUrl":"https://github.com/drizzle-team/drizzle-orm/blob/b7862528fd8fc39bc2653a6c18dad7c1f4e68d10/drizzle-orm/src/prisma/sqlite/session.ts#L32-L68","documentation":"PrismaSQLitePreparedQuery.values() throws 'Method not implemented.' The Prisma SQLite adapter implements all()/run()/get()/execute() through $queryRawUnsafe but does not implement values() (the raw driver-value/typed-value extraction path), because Prisma's raw query API does not expose driver-level typed values.","triggerScenarios":"Calling .values() on a prepared query from a Prisma-backed SQLite Drizzle instance, or reaching an internal path that uses values() (some low-level typed-result helpers).","commonSituations":"Using Drizzle over Prisma for SQLite (e.g., Turso/Prisma), then calling typed value extraction. Migrating from better-sqlite3/libsql driver code that used values().","solutions":["Use .all() / .get() / .execute() instead of .values() to obtain row objects.","Switch to a native Drizzle SQLite driver (better-sqlite3, libSQL, d1) if raw typed values are required.","Map row object fields to typed values manually if specific driver types are needed."],"exampleFix":"// before (throws)\nconst rows = await preparedQuery.values();\n\n// after\nconst rows = await preparedQuery.all();","handlingStrategy":"validation","validationCode":"import { entityKind } from 'drizzle-orm/entity';\n\nfunction isPrismaSqlitePrepared(q: any): boolean {\n  return q?.[entityKind] === 'PrismaSQLitePreparedQuery';\n}\n\nconst rows = isPrismaSqlitePrepared(stmt) ? await stmt.all() : await stmt.values();","typeGuard":"function isPrismaSqlitePreparedQuery(q: unknown): boolean {\n  return (q as any)?.[Symbol.for('drizzle:entityKind')] === 'PrismaSQLitePreparedQuery';\n}","tryCatchPattern":"try {\n  const v = await stmt.values();\n} catch (e) {\n  if (e instanceof Error && e.message === 'Method not implemented.') {\n    const rows = await stmt.all();\n  } else throw e;\n}","preventionTips":["Avoid .values() with the Prisma SQLite adapter; use .all()/.get()/.execute().","If raw typed values are needed, use a native Drizzle SQLite driver.","Document per-adapter which prepared-query methods are supported."],"tags":["prisma","sqlite","not-implemented","adapter","prepared-query"],"analyzedSha":"b7862528fd8fc39bc2653a6c18dad7c1f4e68d10","analyzedAt":"2026-08-03T18:11:14.318Z","schemaVersion":2}