histdbimport
Advanced tools
Comparing version 1.0.3 to 1.0.4
@@ -49,3 +49,5 @@ #!/usr/bin/env node | ||
WHERE commands.argv = @command AND places.host = @host AND places.dir = @dir`); | ||
console.time("took"); | ||
db.exec("BEGIN"); | ||
let count = 0; | ||
for await (const entryStr of readEntries()) { | ||
@@ -65,5 +67,8 @@ const result = /^: (?<started>\d+):(?<duration>\d+);(?<command>[\s\S]*)$/.exec(entryStr); | ||
historyInsert.run(fullEntry); | ||
count++; | ||
} | ||
db.exec("COMMIT"); | ||
console.timeEnd("took"); | ||
console.log(`inserted ${count} history entries`); | ||
} | ||
readHistory(); |
{ | ||
"name": "histdbimport", | ||
"version": "1.0.3", | ||
"version": "1.0.4", | ||
"scripts": { | ||
@@ -5,0 +5,0 @@ "insert-all": "ts-node insert-all.ts" |
4467
72