You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature for order by nulls does't work for SQLServer
Expected Behavior
when using addOrderBy feature in query builder for SQLServer following query show in console, NULLS LAST does't work in SQLServer
SELECT "__root"."CountryCode" AS "__root_CountryCode", "__root"."Sequence" AS "__root_Sequence" FROM "Countries" "__root"
ORDER BY "__root"."Sequence" ASC NULLS LAST, "__root_CountryCode" ASC
Actual Behavior
QueryFailedError: Error: Invalid usage of the option NEXT in the FETCH statement.
at /code/src/driver/sqlserver/SqlServerQueryRunner.ts:261:30
at /code/node_modules/mssql/lib/base/request.js:440:25
at Request.userCallback (/code/node_modules/mssql/lib/tedious/request.js:492:15)
at Request.callback (/code/node_modules/tedious/src/request.ts:379:14)
at Parser.onEndOfMessage (/code/node_modules/tedious/src/connection.ts:3591:22)
at Object.onceWrapper (node:events:628:28)
at Parser.emit (node:events:514:28)
at Readable. (/code/node_modules/tedious/src/token/token-stream-parser.ts:30:12)
at Readable.emit (node:events:514:28)
at endReadableNT (node:internal/streams/readable:1589:12)
Steps to reproduce
First createQueryBuilder
Then add addOrderBy with 'NULLS LAST' | 'NULLS FIRST'
My Environment
Dependency
Version
Operating System
Node.js version
20.10.0
Typescript version
5.2.2
TypeORM version
0.3.17
Additional Context
issue #685 already created and this feature added but not for SQLServer.
I'll create this feature for SQLServer
Relevant Database Driver(s)
aurora-mysql
aurora-postgres
better-sqlite3
cockroachdb
cordova
expo
mongodb
mysql
nativescript
oracle
postgres
react-native
sap
spanner
sqlite
sqlite-abstract
sqljs
sqlserver
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
The text was updated successfully, but these errors were encountered:
Issue description
Feature for order by nulls does't work for SQLServer
Expected Behavior
when using addOrderBy feature in query builder for SQLServer following query show in console, NULLS LAST does't work in SQLServer
SELECT "__root"."CountryCode" AS "__root_CountryCode", "__root"."Sequence" AS "__root_Sequence" FROM "Countries" "__root"
ORDER BY "__root"."Sequence" ASC NULLS LAST, "__root_CountryCode" ASC
Actual Behavior
QueryFailedError: Error: Invalid usage of the option NEXT in the FETCH statement.
at /code/src/driver/sqlserver/SqlServerQueryRunner.ts:261:30
at /code/node_modules/mssql/lib/base/request.js:440:25
at Request.userCallback (/code/node_modules/mssql/lib/tedious/request.js:492:15)
at Request.callback (/code/node_modules/tedious/src/request.ts:379:14)
at Parser.onEndOfMessage (/code/node_modules/tedious/src/connection.ts:3591:22)
at Object.onceWrapper (node:events:628:28)
at Parser.emit (node:events:514:28)
at Readable. (/code/node_modules/tedious/src/token/token-stream-parser.ts:30:12)
at Readable.emit (node:events:514:28)
at endReadableNT (node:internal/streams/readable:1589:12)
Steps to reproduce
My Environment
Additional Context
issue #685 already created and this feature added but not for SQLServer.
I'll create this feature for SQLServer
Relevant Database Driver(s)
Are you willing to resolve this issue by submitting a Pull Request?
Yes, I have the time, and I know how to start.
The text was updated successfully, but these errors were encountered: