{"id":"f78921a11d9599fb","repo":"drizzle-team/drizzle-orm","slug":"streaming-is-not-supported-by-the-tidb-cloud-serve","errorCode":null,"errorMessage":"Streaming is not supported by the TiDB Cloud Serverless driver","messagePattern":"Streaming is not supported by the TiDB Cloud Serverless driver","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"drizzle-orm/src/tidb-serverless/session.ts","lineNumber":100,"sourceCode":"\n\t\t\t\treturn returningResponse;\n\t\t\t}\n\t\t\treturn res;\n\t\t}\n\n\t\tconst rows = await this.queryWithCache(queryString, params, async () => {\n\t\t\treturn await client.execute(queryString, params, queryConfig) as unknown[][];\n\t\t});\n\n\t\tif (customResultMapper) {\n\t\t\treturn customResultMapper(rows);\n\t\t}\n\n\t\treturn rows.map((row) => mapResultRow<T['execute']>(fields!, row, joinsNotNullableMap));\n\t}\n\n\toverride iterator(_placeholderValues?: Record<string, unknown>): AsyncGenerator<T['iterator']> {\n\t\tthrow new Error('Streaming is not supported by the TiDB Cloud Serverless driver');\n\t}\n}\n\nexport interface TiDBServerlessSessionOptions {\n\tlogger?: Logger;\n\tcache?: Cache;\n}\n\nexport class TiDBServerlessSession<\n\tTFullSchema extends Record<string, unknown>,\n\tTSchema extends TablesRelationalConfig,\n> extends MySqlSession<TiDBServerlessQueryResultHKT, TiDBServerlessPreparedQueryHKT, TFullSchema, TSchema> {\n\tstatic override readonly [entityKind]: string = 'TiDBServerlessSession';\n\n\tprivate logger: Logger;\n\tprivate client: Tx | Connection;\n\tprivate cache: Cache;\n","sourceCodeStart":82,"sourceCodeEnd":118,"githubUrl":"https://github.com/drizzle-team/drizzle-orm/blob/b7862528fd8fc39bc2653a6c18dad7c1f4e68d10/drizzle-orm/src/tidb-serverless/session.ts#L82-L118","documentation":"Error \"Streaming is not supported by the TiDB Cloud Serverless driver\" thrown in drizzle-team/drizzle-orm.","triggerScenarios":"Attempting to stream results over the TiDB Cloud Serverless (HTTP) driver, which cannot stream rows.","commonSituations":"Using query streaming APIs with the tidb-serverless driver; switch to a TCP driver (mysql2) for streaming.","solutions":["Use a driver that supports streaming for TiDB, or fetch results without streaming (regular query execution)."],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"analyzedSha":"b7862528fd8fc39bc2653a6c18dad7c1f4e68d10","analyzedAt":"2026-08-03T18:11:14.318Z","schemaVersion":2}