fix(basic.gblib): Allow MERGE keyword in storage #380. @othonlima

This commit is contained in:
Rodrigo Rodriguez 2023-12-16 21:55:23 -03:00
parent 57bb89a73e
commit 3c7a1d1e8e

View file

@ -2146,18 +2146,6 @@ export class SystemKeywords {
await retry( await retry(
async (bail) => { async (bail) => {
let rows = []; let rows = [];
const paginate = (query, { page, pageSize }) => {
const offset = page * pageSize;
const limit = pageSize;
return {
...query,
offset,
limit,
};
};
let page = 0, pageSize = 1000; let page = 0, pageSize = 1000;
let count = 0; let count = 0;
@ -2165,12 +2153,7 @@ export class SystemKeywords {
rows = [ rows = [
await t.findAll( await t.findAll(
paginate( {offset:page * pageSize, limit:pageSize, subquery:false, where:{}}
{
where: {},
},
{ page, pageSize },
),
), ...rows]; ), ...rows];
page++; page++;
count = rows.length; count = rows.length;
@ -2182,6 +2165,8 @@ export class SystemKeywords {
} }
); );
GBLog.info(`cached: ${rows.length}.`);
} }
else { else {
rows = this.cachedMerge[pid][file]; rows = this.cachedMerge[pid][file];