sqlite stream reader

This commit is contained in:
Jan Prochazka
2021-05-06 15:23:45 +02:00
parent 615397f332
commit 1888de8728
3 changed files with 37 additions and 7 deletions

View File

@@ -24,7 +24,8 @@ export const driverBase = {
const analyser = new this.analyserClass(pool, this);
analyser.singleObjectFilter = { ...name, typeField };
const res = await analyser.fullAnalysis();
return res.tables[0];
if (res[typeField].length == 1) return res[typeField][0];
return res[typeField].find(x => x.pureName == name.pureName && x.schemaName == name.schemaName);
},
analyseSingleTable(pool, name) {
return this.analyseSingleObject(pool, name, 'tables');