Browse Source

Merge pull request #3692 from nocodb/fix/3681-mssql

fix: drop wrapping select queries for mssql
pull/3701/head
աɨռɢӄաօռɢ 2 years ago committed by GitHub
parent
commit
6680409d43
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

2
packages/nocodb/src/lib/db/sql-data-mapper/lib/sql/BaseModelSqlv2.ts

@ -2331,7 +2331,7 @@ class BaseModelSqlv2 {
}
return this.isPg
? (await this.dbDriver.raw(query))?.rows
: query.slice(0, 6) === 'select'
: query.slice(0, 6) === 'select' && !this.isMssql
? await this.dbDriver.from(
this.dbDriver.raw(query).wrap('(', ') __nc_alias')
)

Loading…
Cancel
Save