Comments (3)
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.
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.
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)
- Clarity about find(); HOT 2
- upsert that resolves to update does not update fields that start with '$' HOT 5
- TypeError: http.IncomingMessage.prototype is not an object or null HOT 6
- Support for $not operator HOT 3
- Interactive Demo HOT 1
- index not used when using query operator
- collection.load is very slow HOT 1
- Loading JSON file into forrunner db file and vice versa ? HOT 8
- Duplicate data when setData and ensureIndex HOT 1
- Adding event listener with an ID does not work HOT 2
- Dropping condition does not remove memory reference
- $replace with new documents?
- How does load work? HOT 2
- using Date query with $gte and $lte operators. HOT 3
- Typescript is outdated HOT 3
- Where can i find the database file?
- Weird query behavior when using elemMatch
- WebWorker import ForerunnerDB
- ⚠️ Web SQL is deprecated
- How to query condition on comparing 2 fields?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from forerunnerdb.