✅ – Can anyone help with better-sqlite3's `aggregate` method to read more than one row?
Can anyone help with better-sqlite3's
aggregate method to read more than one row?Solution
I'm using better-sqlite3 and I want to use its
But I need too add a second row,
Any idea on how I can get both values at once in the
aggregate method but I need to have access to 2 rows, not just 1, in the aggregate step function. This is the code that works But I need too add a second row,
key. I don't know how. I tried to do .prepare('SELECT filter(key, value) FROM mytable') but that tells me wrong number of arguments to function filter(). I tried SELECT filter(key), filter(value) from mytable and that runs the function twice, not once, with the key then the value and that's obviously not what I want. Any idea on how I can get both values at once in the
step ?