Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
shiyuhang0 committed Sep 26, 2024
1 parent 82cd921 commit c18895e
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions src/tidbcloud.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,21 +137,24 @@ class TiDBCloudTransaction
}
}

class TiDBCloudTransactionContext extends TiDBCloudQueryable<TiDBCloud.Connection> implements TransactionContext {
class TiDBCloudTransactionContext
extends TiDBCloudQueryable<TiDBCloud.Connection>
implements TransactionContext
{
constructor(connect: TiDBCloud.Connection) {
super(connect)
super(connect);
}

async startTransaction(): Promise<Result<Transaction>> {
const options: TransactionOptions = {
usePhantomQuery: false,
}
};

const tag = '[js::startTransaction]'
debug('%s option: %O', tag, options)
const tag = "[js::startTransaction]";
debug("%s option: %O", tag, options);

const tx = await this.client.begin()
return ok(new TiDBCloudTransaction(tx, options))
const tx = await this.client.begin();
return ok(new TiDBCloudTransaction(tx, options));
}
}

Expand All @@ -172,6 +175,6 @@ export class PrismaTiDBCloud
}

async transactionContext(): Promise<Result<TransactionContext>> {
return ok(new TiDBCloudTransactionContext(this.client))
return ok(new TiDBCloudTransactionContext(this.client));
}
}

0 comments on commit c18895e

Please sign in to comment.