ขนาดวิดีโอ: 1280 X 720853 X 480640 X 360
แสดงแผงควบคุมโปรแกรมเล่น
เล่นอัตโนมัติ
เล่นใหม่
hey dude, Just I let u know u doing great job with these videos. Keep going
Thanks
Thank you so much! that's all I need to understand! keep it up man 😉
Very informative thank you sir
You saved my day.Great...
Glad I could help
Well explained 👍
Awsome!!
Now how could I use that data in a html file with script trying to fetch the data to make a graph.
Very good tutorial, unfortunately it cut a little short for my issue. I want to take the data from the database and make variables out of the data client side - is this possible?
Yes, you can use Object.entry(data).vlaues
@@StudyAutomationAcademy thank you!
If I want to get the data of individual user by I'd ? How can I do this
It is different from mongoose ?
what about the count query please help with it..!
i have 15000 data when i try to fetch data using find it shows Error: Maximum response size reachedhelp me to solve this issue
const MongoClient = require('mongodb').MongoClient;const uri = "mongodb://localhost:27017";const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true });async function fetchDataInBatches(collectionName, limit = 1000) { try { await client.connect(); const database = client.db("yourDatabaseName"); const collection = database.collection(collectionName); let cursor = collection.find({}); let data = []; while (await cursor.hasNext()) { const batch = await cursor.limit(limit).toArray(); data.push(...batch); } return data; } catch (error) { console.error(error); } finally { await client.close(); }}fetchDataInBatches("yourCollectionName") .then(data => { // Process the data in batches here }) .catch(error => { console.error(error); });
You can use cursor based query
@@StudyAutomationAcademy i want without using pagination
@@StudyAutomationAcademy i want without using pagination
The above code is without pagination only.. if you see we have usee while loop.. it will fetch all records in batch and return all records
slash or shlas?
Good catch
"Cannot read properties of undefined (reading 'collection')" this error throw
am also facing this issue
Where is that database variable defined ?
hey dude, Just I let u know u doing great job with these videos. Keep going
Thanks
Thank you so much! that's all I need to understand! keep it up man 😉
Very informative thank you sir
You saved my day.Great...
Glad I could help
Well explained 👍
Awsome!!
Now how could I use that data in a html file with script trying to fetch the data to make a graph.
Very good tutorial, unfortunately it cut a little short for my issue. I want to take the data from the database and make variables out of the data client side - is this possible?
Yes, you can use Object.entry(data).vlaues
@@StudyAutomationAcademy thank you!
If I want to get the data of individual user by I'd ? How can I do this
It is different from mongoose ?
what about the count query please help with it..!
i have 15000 data when i try to fetch data using find it shows Error: Maximum response size reached
help me to solve this issue
const MongoClient = require('mongodb').MongoClient;
const uri = "mongodb://localhost:27017";
const client = new MongoClient(uri, { useNewUrlParser: true, useUnifiedTopology: true });
async function fetchDataInBatches(collectionName, limit = 1000) {
try {
await client.connect();
const database = client.db("yourDatabaseName");
const collection = database.collection(collectionName);
let cursor = collection.find({});
let data = [];
while (await cursor.hasNext()) {
const batch = await cursor.limit(limit).toArray();
data.push(...batch);
}
return data;
} catch (error) {
console.error(error);
} finally {
await client.close();
}
}
fetchDataInBatches("yourCollectionName")
.then(data => {
// Process the data in batches here
})
.catch(error => {
console.error(error);
});
You can use cursor based query
@@StudyAutomationAcademy i want without using pagination
@@StudyAutomationAcademy i want without using pagination
The above code is without pagination only.. if you see we have usee while loop.. it will fetch all records in batch and return all records
slash or shlas?
Good catch
"Cannot read properties of undefined (reading 'collection')" this error throw
am also facing this issue
Where is that database variable defined ?