Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add ControlledTransaction. #962

Merged
merged 22 commits into from
Oct 5, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
remove preventAwait.
  • Loading branch information
igalklebanov committed Oct 5, 2024
commit 1c21909b7e1292fee15def1e159695e72e5d29a0
15 changes: 1 addition & 14 deletions src/kysely.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,7 @@ import {
} from './query-builder/function-module.js'
import { Log, LogConfig } from './util/log.js'
import { QueryExecutorProvider } from './query-executor/query-executor-provider.js'
import {
DatabaseConnection,
QueryResult,
} from './driver/database-connection.js'
import { QueryResult } from './driver/database-connection.js'
import { CompiledQuery } from './query-compiler/compiled-query.js'
import { createQueryId, QueryId } from './util/query-id.js'
import { Compilable, isCompilable } from './util/compilable.js'
Expand Down Expand Up @@ -755,11 +752,6 @@ interface ControlledTransactionBuilderProps extends TransactionBuilderProps {
readonly releaseConnection?: boolean
}

preventAwait(
ControlledTransactionBuilder,
"don't await ControlledTransactionBuilder instances directly. To execute the transaction you need to call the `execute` method",
)

export class ControlledTransaction<
DB,
S extends string[] = [],
Expand Down Expand Up @@ -1037,8 +1029,3 @@ export class Command<T> {
return await this.#cb()
}
}

preventAwait(
Command,
"don't await Command instances directly. Call the `execute` method",
)