|
|
@ -75,6 +75,18 @@ function countRowsInLmdb(){
|
|
|
|
return db.getKeysCount();
|
|
|
|
return db.getKeysCount();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function getUnderlyingsSet(){
|
|
|
|
|
|
|
|
const underlyings = new Set();
|
|
|
|
|
|
|
|
db.getKeys({start:['A']}).forEach(([underlying])=>{
|
|
|
|
|
|
|
|
underlyings.add(underlying);
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
return underlyings
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//console.log('rows-in-csv:', await countRowsInCsv());
|
|
|
|
//console.log('rows-in-csv:', await countRowsInCsv());
|
|
|
|
//console.log('rows-in-lmdb:', countRowsInLmdb());
|
|
|
|
//console.log('rows-in-lmdb:', countRowsInLmdb());
|
|
|
|
await ingestCsvToLmdb();
|
|
|
|
//await ingestCsvToLmdb();
|
|
|
|
|
|
|
|
for(let key in getUnderlyingsSet().values()){
|
|
|
|
|
|
|
|
console.log(key);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
Array.from(getUnderlyingsSet().values()).forEach((x)=>{ console.log(x) })
|