0

I'm trying to get the scan function to work, but it seems i'm missing something: According to the documention this should work:

var iter = new ydn.db.KeyIterator('contact');
db.scan([iter], function(keys, values)

But every time i call the function i get the following error:

Uncaught ydn.error.ArgumentException: Iterator argument must be an array. 

A contact sore with the name 'contact' exists and i tried different libraries ydb-db but none of them worked.

Lars Migula
  • 285
  • 1
  • 8

1 Answers1

0

Documentation is outdated. It should be:

db.scan(function(keys, values), [iter]

See unit test for it use case.

Kyaw Tun
  • 12,447
  • 10
  • 56
  • 83