
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Hive-db now has interactions based on the adapter you choose, so that you can swiftly use the whole module! Wiki for an in-dept guide
mongodb -> hive.mongosqlite -> hive.sqlitepostgres -> hive.Postgresconst hive = require('hive-db');
const db = hive.sqlite;
db.init('name',['Lason']);
db.get('name')
// output => Lason
/*
Array Functionality in Hive-db
*/
db.input('name','Tensor')
db.array('name');
// output => Lason, Tensor
const Discord = require('discord.js');
const hive = require('hive-db');
const db = hive.sqlite;
run = async (message, args, client) =>{
message.channel.send('Enter your name');
db.init('name', args[0]);
}
//Trigger function using get.
const Discord = require('discord.js');
const db = require('hive-db');
run = async (message, args, client) =>{
message.channel.send('Your name is \t'+db.get('name'));
}
/*
You can do only user based values that are unique for example, to remember
the name of some users db.init(`name_${message.author.id}`, args[0]), because
discord user ids are unique, same goes with guild values!
*/
db.init('name',['Lason']);
db.fetch('name')
db.del('name')
db.push('name','Tensor')
db.subtract('age',1)
// subtracting 21 from 1, where age(key) contains -> 21
db.add('age',1)
// Adding 1 to 21, where age(key) contains -> 21
db.fetchArray('name')
// output => Tensor, Lason
value or is nulldb.has('name')
// output => true
db.datatype('age')
// output => int
You can use both localhost and MongoDb altas uri's to connect to mongodb. Here is an example of its support:-
const db = require('hive-db');
// Point to be noted, database is a constructor under db.mongo
const {database} = db.mongo;
const mongo= new database("mongodb+srv://wyvern:thebestbot@cluster0.67lsz.mongodb.net", "JSON", { useUnique: true });
mongo.on("ready", () => {
console.log(`Connected!`);
test();
});
mongo.on("error", console.error);
mongo.on("debug", console.log);
async function test() {
mongo.init('age','21');
mongo.get('age')
//-> 21
mongo.init('name','Lason');
mongo.get('name');
//-> Lason
}
Creating Tables using hive-db mongo interaction!
const db = require('hive-db');
const mongo= new db.Mongo("mongodb+srv://wyvern:thebestbot@cluster0.67lsz.mongodb.net", "JSON", { useUnique: true });
mongo.on("ready", () => {
console.log(`Connected!`);
test();
});
mongo.on("error", console.error);
mongo.on("debug", console.log);
async function test() {
const test = db.table('test');
test.init('slogan','hive-db is da best!')
test.get('slogan');
// output => hive-db is da best
// while if we use mongo.get('slogan') it won't work!
mongo.get('slogan');
// returns null!
}
Initialize a value.
mongo.init("foo", "bar");
Get a value.
mongo.get("foo").then(console.log);
//-> bar
Input a value into an existing array.
mongo.push("name");
// assuming that the key name has an array, for example ["Lason", "Tensor"]
Add a value to a data(number) in a key
mongo.add('age', 4)
// adds 4 to the age
Subtract a value from a data(number) in a key
mongo.subtract('age', 4)
// subtracts 4 from the age
Create data models!
const age = mongo.table('age')
age.init('name', 'Lason')
age.get('name').then(console.log);
// -> Lason!
TIP You can use your own data table using a JSON base. Below stats an example using the key, data structure.
[
{
"ID":"something",
"data":"something"
}
]
Hive-db understands this without any external effort, and you don't even have to call the file anywhere in your code!
db.get("something");
//-> give you something as the output!
Yes hive-db offers postgres interaction! Isn't that super cool!
Connecting to the postgres pool:
{Postgres} = require('hive-db');
const db = new Postgres({
host: 'localhost',
user: 'postgres',
password: '1234',
database: 'myDatabase'
})
/*
Basic paradigm
new Postgres({
config options,
table
})
*/
Create new schemas using the postgres pool!
{Postgres} = require('hive-db');
const db = new Postgres({
host: 'localhost',
user: 'postgres',
password: '1234',
database: 'myDatabase'
}, {
schema:'people' //schema name
})
get data
await db.get('peope')
init data
await db.init('people', 'Jack');
delete data
await db.del('people', 'Lason');
push data into an array
await db.push('people', 'Tensor');
Fetch data as an array!
await db.fetchArray('people');
// output => [Jack, Tensor]
Search for a value in a key
await db.search('people','Tensor')
// output => true

The hive-db github repository is the development verision of hive-db.
Check the wiki for a guide.
FAQs
A peristant database for impressive storage and easy functionality
We found that hive-db demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

Security News
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.