Browse Source

fix: return values

Signed-off-by: mertmit <mertmit99@gmail.com>
pull/6928/head
mertmit 1 year ago
parent
commit
f0ba719065
  1. 14
      packages/nocodb/src/db/BaseModelSqlv2.ts

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

@ -2963,7 +2963,7 @@ class BaseModelSqlv2 {
for (const insertData of insertDatas) {
const query = trx(this.tnPath).insert(insertData);
const id = await query;
const id = (await query)[0];
response.push(aiPkCol ? { [aiPkCol.title]: id } : id);
}
} else {
@ -3158,10 +3158,14 @@ class BaseModelSqlv2 {
await conditionV2(this, conditionObj, qb);
count = (
await this.execAndParse(qb.clone().count(), null, {
raw: true,
first: true,
})
await this.execAndParse(
qb.clone().count('*', { as: 'count' }),
null,
{
raw: true,
first: true,
},
)
)?.count;
qb.update(updateData);

Loading…
Cancel
Save