Browse Source

fix: drop wrapping select queries for mssql

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/3692/head
mertmit 2 years ago
parent
commit
4c070bd1f5
  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