@@ -15,6 +15,7 @@ import {
1515 Expression ,
1616} from '../expression/expression.js'
1717import { isOperationNodeSource } from '../operation-node/operation-node-source.js'
18+ import { ExecuteOptions } from '../util/executable.js'
1819
1920/**
2021 * An instance of this class can be used to create raw SQL snippets or queries.
@@ -135,7 +136,10 @@ export interface RawBuilder<O> extends AliasableExpression<O> {
135136 * const result = await sql`select * from ${sql.table('person')}`.execute(db)
136137 * ```
137138 */
138- execute ( executorProvider : QueryExecutorProvider ) : Promise < QueryResult < O > >
139+ execute (
140+ executorProvider : QueryExecutorProvider ,
141+ options ?: ExecuteOptions ,
142+ ) : Promise < QueryResult < O > >
139143
140144 toOperationNode ( ) : RawNode
141145}
@@ -187,10 +191,11 @@ class RawBuilderImpl<O> implements RawBuilder<O> {
187191
188192 async execute (
189193 executorProvider : QueryExecutorProvider ,
194+ options ?: ExecuteOptions ,
190195 ) : Promise < QueryResult < O > > {
191196 const executor = this . #getExecutor( executorProvider )
192197
193- return executor . executeQuery < O > ( this . #compile( executor ) )
198+ return executor . executeQuery < O > ( this . #compile( executor ) , options )
194199 }
195200
196201 #getExecutor( executorProvider ?: QueryExecutorProvider ) : QueryExecutor {
0 commit comments