@@ -48,6 +48,7 @@ import {
4848 provideControlledConnection ,
4949} from './util/provide-controlled-connection.js'
5050import { ConnectionProvider } from './driver/connection-provider.js'
51+ import { logOnce } from './util/log-once.js'
5152
5253// @ts -ignore
5354Symbol . asyncDispose ??= Symbol ( 'Symbol.asyncDispose' )
@@ -539,11 +540,18 @@ export class Kysely<DB>
539540 */
540541 executeQuery < R > (
541542 query : CompiledQuery < R > | Compilable < R > ,
542- queryId : QueryId = createQueryId ( ) ,
543+ // TODO: remove this in the future. deprecated in 0.28.x
544+ queryId ?: QueryId ,
543545 ) : Promise < QueryResult < R > > {
546+ if ( queryId !== undefined ) {
547+ logOnce (
548+ 'Passing `queryId` in `db.executeQuery` is deprecated and will result in a compile-time error in the future.' ,
549+ )
550+ }
551+
544552 const compiledQuery = isCompilable ( query ) ? query . compile ( ) : query
545553
546- return this . getExecutor ( ) . executeQuery < R > ( compiledQuery , queryId )
554+ return this . getExecutor ( ) . executeQuery < R > ( compiledQuery )
547555 }
548556
549557 async [ Symbol . asyncDispose ] ( ) {
@@ -1169,21 +1177,17 @@ class NotCommittedOrRolledBackAssertingExecutor implements QueryExecutor {
11691177 return this . #executor. provideConnection ( consumer )
11701178 }
11711179
1172- executeQuery < R > (
1173- compiledQuery : CompiledQuery < R > ,
1174- queryId : QueryId ,
1175- ) : Promise < QueryResult < R > > {
1180+ executeQuery < R > ( compiledQuery : CompiledQuery < R > ) : Promise < QueryResult < R > > {
11761181 assertNotCommittedOrRolledBack ( this . #state)
1177- return this . #executor. executeQuery ( compiledQuery , queryId )
1182+ return this . #executor. executeQuery ( compiledQuery )
11781183 }
11791184
11801185 stream < R > (
11811186 compiledQuery : CompiledQuery < R > ,
11821187 chunkSize : number ,
1183- queryId : QueryId ,
11841188 ) : AsyncIterableIterator < QueryResult < R > > {
11851189 assertNotCommittedOrRolledBack ( this . #state)
1186- return this . #executor. stream ( compiledQuery , chunkSize , queryId )
1190+ return this . #executor. stream ( compiledQuery , chunkSize )
11871191 }
11881192
11891193 withConnectionProvider (
0 commit comments