Giter VIP home page Giter VIP logo

Comments (3)

Irrelon avatar Irrelon commented on July 3, 2024

Hey ya,

Does your array in setData() have any data in it? When you say weird, you talking about the __fdbOp and cursor objects returned as properties of the array?

Those are expected. Are they causing you any issues?

from forerunnerdb.

robhicks avatar robhicks commented on July 3, 2024

Yes, setData has an array of 93 items in it.
According to the docs, collection.find({}) should return all docs or an empty array if there are none. So why does it return a cursor? And it doesn't appear the cursor that it returns is similar to MongoDb's cursor. I'm not complaining but trying to understand how it works.

from forerunnerdb.

Irrelon avatar Irrelon commented on July 3, 2024

No worries, happy to explain!

So the array returned is augmented with some extra properties. Technically the array itself is still empty if no items are returned since the properties are named rather than numbered (although perhaps we should mark them as non-iteratable - browser support issues with that maybe?).

The $cursor is definitely not something that relates to MongoDB in anyway and will probably change - it's all internal stuff that is useful for various bits and pieces such as integrating between collections, views etc with regards to paging large data-sets.

The fdbOp stuff is data returned about the operation that was performed. This is very useful for performance tuning / indexes and whatnot. The main reason these are exposed however is that the new chrome extension will start to make use of internal metrics as it's GUI gets more functionality. The chrome extension is already quite useful for taking a quick look at the browser's ForerunnerDB instance but it will get better and better as I add more to it.

from forerunnerdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.