File tree Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Expand file tree Collapse file tree 1 file changed +16
-9
lines changed Original file line number Diff line number Diff line change @@ -259,25 +259,32 @@ export function makeQueryTemplate(operations, source) {
259259 sort [ i ] . column = escaper ( sort [ i ] . column ) ;
260260 appendOrderBy ( sort [ i ] , args ) ;
261261 }
262- if ( source . dialect === ' mssql' ) {
262+ if ( source . dialect === " mssql" ) {
263263 if ( slice . to !== null || slice . from !== null ) {
264- if ( ! sort . length ) {
264+ if ( ! sort . length ) {
265265 if ( columns [ 0 ] === "*" )
266- throw new Error ( "at least one column must be explicitly specified. Received '*'." ) ;
266+ throw new Error (
267+ "at least one column must be explicitly specified. Received '*'."
268+ ) ;
267269 appendSql ( `\nORDER BY ` , args ) ;
268- appendOrderBy ( { column : escaper ( select . columns [ 0 ] ) , direction : 'ASC' } , args ) ;
270+ appendOrderBy (
271+ { column : escaper ( select . columns [ 0 ] ) , direction : "ASC" } ,
272+ args
273+ ) ;
269274 }
270275 appendSql ( `\nOFFSET ${ slice . from || 0 } ROWS` , args ) ;
271276 appendSql (
272- `\nFETCH NEXT ${ slice . to !== null ? slice . to - ( slice . from || 0 ) : 1e9 } ROWS ONLY` ,
273- args
277+ `\nFETCH NEXT ${
278+ slice . to !== null ? slice . to - ( slice . from || 0 ) : 1e9
279+ } ROWS ONLY`,
280+ args
274281 ) ;
275282 }
276- } else {
283+ } else {
277284 if ( slice . to !== null || slice . from !== null ) {
278285 appendSql (
279- `\nLIMIT ${ slice . to !== null ? slice . to - ( slice . from || 0 ) : 1e9 } ` ,
280- args
286+ `\nLIMIT ${ slice . to !== null ? slice . to - ( slice . from || 0 ) : 1e9 } ` ,
287+ args
281288 ) ;
282289 }
283290 if ( slice . from !== null ) {
You can’t perform that action at this time.
0 commit comments