Comments (8)
Hi ya,
Bit confused here... why don't you just send and receive JSON? Is there a specific case where you need to manipulate the .db files directly?
from forerunnerdb.
yes because i have a large data set in jSON format so for searching purpose and for loading performance i need data instant that can be possible via Database because if i do manipulation in JSON boject for searching , i did using recursion and check whether its have or not , if it have that store in array and not then move further check its children . this is for each entry in JSON this is time consuming and consuming so much memory so to avoid this i want to search in database .
from forerunnerdb.
Hey,
So my understanding from your message:
- You have a large data set
- You want to use ForerunnerDB because it makes it really easy to query that data set
I'm still a bit confused why you need to create / manipulate db files directly.
Surely you can do:
On the server: Get your data set and send it to the client in JSON format
On the client: Receive your data set in JSON and insert into ForerunnerDB and then query it
Can you explain a bit more what the issue you are trying to solve is? Thanks!
from forerunnerdb.
yes i have a large data set .
i am using Angular 4 primeNG treetable view in which i am sending JSON data object as a argument and it display to me ,
for small dataset its loading and searching is good but for large it fails so for that i am trying to send some data i.e on Demand from database .
but in my secenerio i have server which is native so it only create data in JSON file .json extension not in forerunner DB file standard .
so that JSON file i want to give to the database when client send me request for the data and manipulate according to his/her need .
after manipulation i want export that data to JSON file and pass to the server component.
so can i do import and export of JSON file in this data or not .
from forerunnerdb.
Yes you can import and export from ForerunnerDB in JSON format easily.
To import just create a collection and use insert() or setData().
To export, simply run a find query without any query object fields:
var myJson = collection.find({});
// Now send the myJson to the server or wherever.
from forerunnerdb.
or you can suggest me something for searching something in large nested JSON data set quickly .
i am using the following given approach , so you have any please suggest
filterFields(object) {
let res = false;
if (object.name) {
let name = object.name;
res = name.toLowerCase().includes(this.globalFilter.value.toString().toLowerCase())
}
return res;
}
filterChildren(children, parent) {
let res = false;
if (children) {
children.map(child => {
let _fields = this.filterFields(child.data);
let _children = this.filterChildren(child.children, child);
res = _fields || _children || res;
});
parent.expanded = res;
}
return res;
}
filter(node) {
let res = false ;
res= this.filterFields(node.data) || this.filterChildren(node.children,node);
return res;
}
from forerunnerdb.
among searching via above solution or via forrunnerDB , which one is good option ?
from forerunnerdb.
I am using the below code for printing the JSON data on the console but nothing is happen , no error nothing.
just running the following code using node connection.js command
Connection.js file
I am doing so
`var ForerunnerDB = require("forerunnerdb");
var fdb = new ForerunnerDB();
var db = fdb.db("jardatabase");
var collection = db.collection("first");
collection.insert("./data.json");
// try with as well
//collection.insert("data.json");
console.log(" lets see any possiblites"+collection.find({}));
`
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
- 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.