Работа над расширенным поиском

This commit is contained in:
Book Pauk
2022-12-01 16:28:39 +07:00
parent e0a315f77c
commit 68532e361e
3 changed files with 8 additions and 7 deletions

View File

@@ -17,7 +17,7 @@ module.exports = {
//поправить в случае, если были критические изменения в DbCreator или InpxParser //поправить в случае, если были критические изменения в DbCreator или InpxParser
//иначе будет рассинхронизация между сервером и клиентом на уровне БД //иначе будет рассинхронизация между сервером и клиентом на уровне БД
dbVersion: '8', dbVersion: '9',
dbCacheSize: 5, dbCacheSize: 5,
maxPayloadSize: 500,//in MB maxPayloadSize: 500,//in MB

View File

@@ -446,8 +446,11 @@ class DbCreator {
table: 'config' table: 'config'
}); });
const inpxInfo = (inpxFilter && inpxFilter.info ? inpxFilter.info : parser.info);
inpxInfo.structure = parser.info.structure;
await db.insert({table: 'config', rows: [ await db.insert({table: 'config', rows: [
{id: 'inpxInfo', value: (inpxFilter && inpxFilter.info ? inpxFilter.info : parser.info)}, {id: 'inpxInfo', value: inpxInfo},
{id: 'stats', value: stats}, {id: 'stats', value: stats},
{id: 'inpxHash', value: await inpxHashCreator.getHash()}, {id: 'inpxHash', value: await inpxHashCreator.getHash()},
]}); ]});

View File

@@ -61,11 +61,9 @@ class InpxParser {
info.version = await this.safeExtractToString(zipReader, versionInfo); info.version = await this.safeExtractToString(zipReader, versionInfo);
//структура //структура
let inpxStructure = info.structure; if (!info.structure)
if (!inpxStructure) info.structure = defaultStructure;
inpxStructure = defaultStructure; const structure = info.structure.toLowerCase().split(';');
inpxStructure = inpxStructure.toLowerCase();
const structure = inpxStructure.split(';');
//парсим inp-файлы //парсим inp-файлы
this.chunk = []; this.chunk = [];