I’m connecting to mongo db like this: Getting collection like this: And getting collection iterator like this: However last call shoots error: [error] Could not retrieve source count from demo_article: Authentication failed. What I’m doing wrong here? UPDATE: Here: iterator is Traversable. But then, this code is called from SourcePluginBase: and it’s not Traversable?! How can it loos that traversable
Tag: iterator
One-liner to fetch data in a loop / iterator and store into a variable
Is there some magic one-liner to get this data ? while ($res->next()) { $this->data[‘DwellingUnit’][] = $res->row; } Not while ($res->next()) $this->data[‘DwellingUnit’][] = $res-&…