@@ -122,10 +122,9 @@ export class QueryBuilder<GenericResultWrapper, IsAsync extends boolean = true>
122122 limit : 1 ,
123123 }
124124 if ( params . subQueryPlaceholders ) {
125- selectParamsForCount . subQueryPlaceholders = params . subQueryPlaceholders ;
125+ selectParamsForCount . subQueryPlaceholders = params . subQueryPlaceholders
126126 }
127127
128-
129128 const mainSql = this . _select ( { ...params , limit : 1 } as SelectAll , queryArgs )
130129 const countSql = this . _select ( selectParamsForCount , countQueryArgs )
131130
@@ -162,7 +161,7 @@ export class QueryBuilder<GenericResultWrapper, IsAsync extends boolean = true>
162161 lazy : undefined ,
163162 }
164163 if ( params . subQueryPlaceholders ) {
165- countQueryParams . subQueryPlaceholders = params . subQueryPlaceholders ;
164+ countQueryParams . subQueryPlaceholders = params . subQueryPlaceholders
166165 }
167166
168167 const mainSql = this . _select ( mainQueryParams , queryArgs )
@@ -508,7 +507,9 @@ export class QueryBuilder<GenericResultWrapper, IsAsync extends boolean = true>
508507 for ( const part of parts ) {
509508 if ( part === '?' ) {
510509 if ( primitiveParamIndex >= primitiveParams . length ) {
511- throw new Error ( 'SQL generation error: Not enough primitive parameters for "?" placeholders in WHERE clause.' )
510+ throw new Error (
511+ 'SQL generation error: Not enough primitive parameters for "?" placeholders in WHERE clause.'
512+ )
512513 }
513514 context . queryArgs . push ( primitiveParams [ primitiveParamIndex ++ ] )
514515 builtCondition += '?'
@@ -531,8 +532,11 @@ export class QueryBuilder<GenericResultWrapper, IsAsync extends boolean = true>
531532 processedConditions . push ( `(${ builtCondition } )` )
532533 }
533534
534- if ( primitiveParamIndex < primitiveParams . length && primitiveParams . length > 0 ) { // Check primitiveParams.length to avoid error if no params were expected
535- throw new Error ( 'SQL generation error: Too many primitive parameters provided for "?" placeholders in WHERE clause.' )
535+ if ( primitiveParamIndex < primitiveParams . length && primitiveParams . length > 0 ) {
536+ // Check primitiveParams.length to avoid error if no params were expected
537+ throw new Error (
538+ 'SQL generation error: Too many primitive parameters provided for "?" placeholders in WHERE clause.'
539+ )
536540 }
537541
538542 if ( processedConditions . length === 0 ) return ''
@@ -602,7 +606,7 @@ export class QueryBuilder<GenericResultWrapper, IsAsync extends boolean = true>
602606 return ` HAVING ${ whereEquivalentString . substring ( ' WHERE ' . length ) } `
603607 }
604608 // If _where returned empty (e.g., no conditions) or an unexpected format,
605- курорт // return an empty string for HAVING as well.
609+ курорт // return an empty string for HAVING as well.
606610 return ''
607611 }
608612
0 commit comments