chore: update transaction default value comment (#5223)

This commit is contained in:
Alex Yang
2025-10-10 14:46:57 -07:00
committed by GitHub
parent 2f0cb5059c
commit 542b3c2a1d
4 changed files with 5 additions and 5 deletions

View File

@@ -66,7 +66,7 @@ export interface DrizzleAdapterConfig {
* *
* If the database doesn't support transactions, * If the database doesn't support transactions,
* set this to `false` and operations will be executed sequentially. * set this to `false` and operations will be executed sequentially.
* @default true * @default false
*/ */
transaction?: boolean; transaction?: boolean;
} }

View File

@@ -38,7 +38,7 @@ interface KyselyAdapterConfig {
* *
* If the database doesn't support transactions, * If the database doesn't support transactions,
* set this to `false` and operations will be executed sequentially. * set this to `false` and operations will be executed sequentially.
* @default true * @default false
*/ */
transaction?: boolean; transaction?: boolean;
} }

View File

@@ -34,7 +34,7 @@ export interface MongoDBAdapterConfig {
* *
* If the database doesn't support transactions, * If the database doesn't support transactions,
* set this to `false` and operations will be executed sequentially. * set this to `false` and operations will be executed sequentially.
* @default true * @default false
*/ */
transaction?: boolean; transaction?: boolean;
} }
@@ -283,7 +283,7 @@ export const mongodbAdapter = (db: Db, config?: MongoDBAdapterConfig) => {
}, },
supportsNumericIds: false, supportsNumericIds: false,
transaction: transaction:
config?.client && (config?.transaction ?? false) config?.client && (config?.transaction ?? true)
? async (cb) => { ? async (cb) => {
if (!config.client) { if (!config.client) {
return cb(lazyAdapter!(lazyOptions!)); return cb(lazyAdapter!(lazyOptions!));

View File

@@ -42,7 +42,7 @@ export interface PrismaConfig {
* *
* If the database doesn't support transactions, * If the database doesn't support transactions,
* set this to `false` and operations will be executed sequentially. * set this to `false` and operations will be executed sequentially.
* @default true * @default false
*/ */
transaction?: boolean; transaction?: boolean;
} }