Browse Source

fix: substitute title and generate proper response

Signed-off-by: Pranav C <pranavxc@gmail.com>
pull/7161/head
Pranav C 12 months ago
parent
commit
7a6351c915
  1. 8
      packages/nocodb/src/db/BaseModelSqlv2.ts

8
packages/nocodb/src/db/BaseModelSqlv2.ts

@ -1208,10 +1208,8 @@ class BaseModelSqlv2 {
!this.isSqlite, !this.isSqlite,
); );
let children = await this.execAndParse(finalQb, childTable); const children = await this.execAndParse(finalQb, childTable);
if (this.isMySQL) {
children = children[0];
}
const proto = await ( const proto = await (
await Model.getBaseModelSQL({ await Model.getBaseModelSQL({
id: rtnId, id: rtnId,
@ -4408,7 +4406,7 @@ class BaseModelSqlv2 {
let data = let data =
this.isPg || this.isSnowflake this.isPg || this.isSnowflake
? (await this.dbDriver.raw(query))?.rows ? (await this.dbDriver.raw(query))?.rows
: query.slice(0, 6) === 'select' && !this.isMssql : /^(\(|)select/.test(query) && !this.isMssql
? await this.dbDriver.from( ? await this.dbDriver.from(
this.dbDriver.raw(query).wrap('(', ') __nc_alias'), this.dbDriver.raw(query).wrap('(', ') __nc_alias'),
) )

Loading…
Cancel
Save