plexidev/quick.db

Is there a possible to way to everything from db at once?

C00LVansh opened this issue · 6 comments

I mean like if we can get all info at once.
for example, I have stored a. b, c at my database and i want to fetch all a, b,c at once like all the info which contains a, b,c by using .forEach
so is it possible?
if you need more explanation feel free to tell.

Currently, you can use db.all() to fetch all of the entries in the database

can you show me more examples
to get its data and use it for other part of code.

Sure, here is a quick example:

const db = require('quick.db');

db.set('keyOne', 'myFirstString');
db.set('keyTwo', 'mySecondString');
db.set('keyThree', 'myThirdString');

// Fetch all rows
const data = db.all();

console.log(data);
// All your data will show up here

Also, we have a Discord server where you can ask questions as well

Can you invite me?

Also, here's a better example of using db.all(), you can see it on the side that it displays all of the data https://codesandbox.io/s/quick-db-demo-forked-zsw1b?file=/src/index.js