Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
OctaviaDB is a lightweight Node.js module for creating encrypted collections of data on the filesystem. It provides basic CRUD (Create, Read, Update, Delete) operations for collections and supports encryption for data security.
OctaviaDB is a lightweight Node.js module for creating encrypted collections of data on the filesystem. It provides basic CRUD (Create, Read, Update, Delete) operations for collections and supports encryption for data security.
To install the OctaviaDB module, run the following command in your terminal:
npm install octavia-db
Encryption: OctaviaDB provides built-in encryption for your database to ensure data security.
CRUD Operations: Perform Create, Read, Update, and Delete operations on collections.
Database Information: Retrieve information about the database, collections, and file sizes.
const myDatabase = new OctaviaDB({
databaseName: 'myDatabase',
databasePassword: 'mySecretPassword',
logging: true // Set to false to disable logging
});
databaseName.collection()
const userCollection = myDatabase.collection(
'users', // collection name
true // encryption, default true
);
collectionName.insert()
const user1 = {
username: 'john_doe',
email: 'john.doe@example.com',
age: 30
};
const result = userCollection.insert(user1);
if(result) {
console.log(`inserted successfully`)
} else {
console.log(`error while inserting the data`)
}
collectionName.insertMany()
const multipleUserData = [
{
username: "patrick_williams",
email: "patrick.williams@example.com",
age: 25
},
{
username: "jane_smith",
email: "jane.smith@example.com",
age: 25
},
{
username: "alex_johnson",
email: "alex.johnson@example.com",
age: 35
},
{
username: 'john_doe',
email: 'john.doe@example.com',
age: 25
}
];
const insertResult = userCollection.insertMany(multipleUserData);
if(insertResult) {
console.log("success")
} else {
console.log(`error while inserting the data`)
}
collectionName.find()
const foundUser = userCollection.find({ username: 'john_doe' });
if (foundUser) {
console.log('Found User:', foundUser);
} else {
console.log('User not found.');
}
collectionName.findMany()
const foundUser = userCollection.findMany({ age: 25 });
if (foundUser) {
console.log('Found User:', foundUser);
} else {
console.log('User not found.');
}
collectionName.update()
const updatedUserData = {
age: 31,
city: 'New York'
};
const updated = userCollection.update({ username: 'alex_johnson' }, updatedUserData);
if (updated) {
console.log("success");
} else {
console.log("failed");
}
collectionName.updateMany()
const updatedUserData = {
status: "active"
};
const updated = userCollection.updateMany({ age: 25 }, updatedUserData);
if (updated) {
console.log("success");
} else {
console.log("failed");
}
collectionName.remove()
const removed = userCollection.remove({ username: 'alex_johnson' });
if (removed) {
console.log("success");
} else {
console.log("failed");
}
collectionName.removeMany()
const removed = userCollection.removeMany({ username: 'john_doe' });
if (removed) {
console.log("success");
} else {
console.log("failed");
}
collectionName.info()
const collectionInfo = userCollection.info();
if (collectionInfo) {
console.log('Collection Information:', collectionInfo);
} else {
console.log('Collection not found.');
}
databaseName.info()
const databaseInfo = myDatabase.info();
if (databaseInfo) {
console.log('Database Information:', databaseInfo);
} else {
console.log('Database not found.');
}
const isUserCollectionDeleted = userCollection.delete();
if (isUserCollectionDeleted) {
console.log('Collection deleted successfully.');
} else {
console.log('Error deleting collection.');
}
const isDatabaseDeleted = myDatabase.delete();
if (isDatabaseDeleted) {
console.log('Database deleted successfully.');
} else {
console.log('Error deleting database.');
}
FAQs
OctaviaDB - A lightweight, AES-encrypted NoSQL database for fast and secure local storage in Node.js.
The npm package octavia-db receives a total of 20 weekly downloads. As such, octavia-db popularity was classified as not popular.
We found that octavia-db demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.