consterror=newError(`${options.transaction.finished} has been called on this transaction(${options.transaction.id}), you can no longer use it. (The rejected query is attached as the \'sql\' property of this error)`);
error.sql=sql;
returnPromise.reject(error);
}
if(isFirstTry&&this.test._trackRunningQueries){
this.test._runningQueries++;
}
//if dialect doesn't support search_path or dialect option
//to prepend searchPath is not true delete the searchPath option
if(
!this.dialect.supports.searchPath||
!this.options.dialectOptions||
!this.options.dialectOptions.prependSearchPath||
options.supportsSearchPath===false
){
deleteoptions.searchPath;
}elseif(!options.searchPath){
//if user wants to always prepend searchPath (dialectOptions.preprendSearchPath = true)