From 3b0ff3d950b3a845964aff54846b8c72e31f0332 Mon Sep 17 00:00:00 2001 From: Brian Sakal Date: Wed, 26 Apr 2023 23:37:26 -0400 Subject: [PATCH] tuples as keys; get underlyings list --- index.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/index.ts b/index.ts index 4b74650..433b7f1 100644 --- a/index.ts +++ b/index.ts @@ -75,6 +75,18 @@ function countRowsInLmdb(){ 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-lmdb:', countRowsInLmdb()); -await ingestCsvToLmdb(); \ No newline at end of file +//await ingestCsvToLmdb(); +for(let key in getUnderlyingsSet().values()){ + console.log(key); +} +Array.from(getUnderlyingsSet().values()).forEach((x)=>{ console.log(x) }) \ No newline at end of file