
Security News
Vite Releases Technical Preview of Rolldown-Vite, a Rust-Based Bundler
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
A blazing-fast, lightweight, and scalable nodejs package based DBMS for modern applications. Supports schemas, encryption, and advanced query capabilities.
AxioDB is a blazing-fast, lightweight, and scalable open-source Database Management System (DBMS) tailored for modern applications. It supports .axiodb
file-based data storage, offers intuitive APIs, and ensures secure data management. AxioDB is the ultimate solution for developers seeking efficient, flexible, and production-ready database solutions.
๐ Official Documentation: Access the full power of AxioDB with detailed guides, examples, and API references.
.query()
, .Sort()
, .Limit()
, and .Skip()
for seamless data filtering.$match
, $sort
, $group
, and more with MongoDB-like syntax.While AxioDB offers many powerful features, there are some limitations to consider:
No Built-in Relation Tools: Unlike ODMs such as Mongoose, AxioDB doesn't provide built-in tools for managing document relations. While MongoDB-like NoSQL databases naturally don't enforce relations at the database level, AxioDB currently requires manual handling of references between collections.
Not Optimized for Heavy Workloads: The database may not perform optimally with rapid data input/output scenarios or extremely large datasets (10M+ documents).
Single-Thread Operations: Operations are performed on the main thread which can impact application performance during complex queries.
Limited Query Complexity: Some advanced query patterns found in mature databases are not yet implemented.
No Built-in Replication: Currently lacks distributed data replication capabilities for high availability setups.
We're actively working to address these limitations in future releases.
We're committed to continuously enhancing AxioDB with cutting-edge features:
We're excited to announce that work is in progress on AxioDB-Docker Image to extend the power of AxioDB to non-JavaScript languages!
While this feature is still under development, you can try out early versions:
# Pull from Docker Hub
docker pull theankansaha/axiodb:latest
# Or pull from GitHub Packages
docker pull ghcr.io/ankansaha/axiodb:latest
Stay tuned for more updates on this exciting expansion of AxioDB's capabilities!
Install AxioDB via npm:
npm install axiodb@latest --save
const { AxioDB, SchemaTypes } = require("axiodb");
const main = async () => {
const db = new AxioDB();
// Create a database with schema validation (default)
const db1 = await db.createDB("testDB");
// Create a database without schema validation
const db2 = await db.createDB("testDB2", false);
// Define a schema
const schema = {
name: SchemaTypes.string().required(),
age: SchemaTypes.number().required().min(1).max(100),
email: SchemaTypes.string().required().email(),
};
// Create collections
const collection = await db1.createCollection("testCollection", schema);
const collection2 = await db1.createCollection(
"testCollection2",
schema,
true,
);
const collection3 = await db1.createCollection(
"testCollection3",
schema,
"myKey",
);
// Insert data
const saveStatus = await collection.insert({
name: "Ankan",
age: 21,
email: "ankan@example.com",
});
console.log(saveStatus);
// Query data
const totalDocuments = await collection
.query({})
.Limit(1)
.Skip(0)
.Sort({ name: 1 })
.setCount(true)
.setProject({ name: 1, age: 1 })
.exec();
console.log(totalDocuments);
const FastDocument = await collection
.query({ documentId: "S4ACDVS6SZ4S6VS" })
.exec(); // By using documentId you can get the document in Lightning Fast Speed, no matter how many documents are in the collection (Tested with 1000000+ documents)
console.log(FastDocument);
const ArrayFirstDocument = await collection
.query({ documentId: ["S4ACDVS6SZ4S6VS", "VESV61Z6VS16VSE6V1S"] })
.exec(); // query using an array of documentId to get multiple documents in lightning fast speed, no matter how many documents are in the collection (Tested with 1000000+ documents)
console.log(ArrayFirstDocument);
// Update data
const updatedDocuments = await collection
.update({ name: { $regex: "Ankan" } })
.UpdateOne({ name: "Ankan Saha", age: 22 });
console.log(updatedDocuments);
// Delete data
const deletedDocuments = await collection
.delete({ name: { $regex: "Ankan" } })
.deleteOne();
console.log(deletedDocuments);
// Aggregation
const response = await collection
.aggregate([
{ $match: { age: { $gt: 20 }, name: { $regex: "Ankan" } } },
{ $group: { _id: "$age", count: { $sum: 1 } } },
{ $sort: { count: -1 } },
{ $project: { _id: 0, age: "$_id", count: 1 } },
{ $limit: 10 },
{ $skip: 0 },
])
.exec();
console.log(response);
};
main();
import { AxioDB, SchemaTypes } from "axiodb";
const main = async () => {
const db = new AxioDB();
// Create a database with schema validation (default)
const db1 = await db.createDB("testDB");
// Create a database without schema validation
const db2 = await db.createDB("testDB2", false);
// Define a schema
const schema = {
name: SchemaTypes.string().required(),
age: SchemaTypes.number().required().min(1).max(100),
email: SchemaTypes.string().required().email(),
};
// Create collections
const collection = await db1.createCollection("testCollection", schema);
const collection2 = await db1.createCollection(
"testCollection2",
schema,
true,
);
const collection3 = await db1.createCollection(
"testCollection3",
schema,
"myKey",
);
// Insert data
const saveStatus = await collection.insert({
name: "Ankan",
age: 21,
email: "ankan@example.com",
});
console.log(saveStatus);
// Query data
const totalDocuments = await collection
.query({})
.Limit(1)
.Skip(0)
.Sort({ name: 1 })
.setCount(true)
.setProject({ name: 1, age: 1 })
.exec();
console.log(totalDocuments);
const FastDocument = await collection
.query({ documentId: "S4ACDVS6SZ4S6VS" })
.exec(); // By using documentId you can get the document in Lightning Fast Speed, no matter how many documents are in the collection (Tested with 1000000+ documents)
console.log(FastDocument);
const ArrayFirstDocument = await collection
.query({ documentId: ["S4ACDVS6SZ4S6VS", "VESV61Z6VS16VSE6V1S"] })
.exec(); // query using an array of documentId to get multiple documents in lightning fast speed, no matter how many documents are in the collection (Tested with 1000000+ documents)
console.log(ArrayFirstDocument);
// Update data
const updatedDocuments = await collection
.update({ name: { $regex: "Ankan" } })
.UpdateOne({ name: "Ankan Saha", age: 22 });
console.log(updatedDocuments);
// Delete data
const deletedDocuments = await collection
.delete({ name: { $regex: "Ankan" } })
.deleteOne();
console.log(deletedDocuments);
// Aggregation
const response = await collection
.aggregate([
{ $match: { age: { $gt: 20 }, name: { $regex: "Ankan" } } },
{ $group: { _id: "$age", count: { $sum: 1 } } },
{ $sort: { count: -1 } },
{ $project: { _id: 0, age: "$_id", count: 1 } },
{ $limit: 10 },
{ $skip: 0 },
])
.exec();
console.log(response);
};
main();
const { AxioDB, SchemaTypes } = require("axiodb");
const db = new AxioDB();
const setup = async () => {
const schema = {
name: SchemaTypes.string().required().max(15),
age: SchemaTypes.number().required().min(18),
};
const DB1 = await db.createDB("DB1");
const collection1 = await DB1.createCollection(
"collection1",
schema,
true,
"secretKey",
);
// Insert data
for (let i = 0; i < 300; i++) {
await collection1.insert({ name: `User${i}`, age: i + 18 });
}
// Query data
const results = await collection1
.query({})
.Sort({ age: -1 })
.Limit(10)
.exec();
console.log("Query Results:", results);
// Delete collection
await DB1.deleteCollection("collection1");
};
setup();
Perform advanced operations like filtering, sorting, grouping, and projecting data.
const aggregationResult = await collection1
.aggregate([
{ $match: { name: { $regex: "User" } } },
{ $project: { name: 1, age: 1 } },
{ $sort: { age: -1 } },
{ $limit: 10 },
])
.exec();
console.log("Aggregation Result:", aggregationResult);
Enable encryption for sensitive data by providing a secret key during collection creation.
const encryptedCollection = await DB1.createCollection(
"secureCollection",
schema,
true,
"mySecretKey",
);
// Insert encrypted data
await encryptedCollection.insert({ name: "Encrypted User", age: 25 });
// Query encrypted data
const encryptedResult = await encryptedCollection.query({ age: 25 }).exec();
console.log("Encrypted Query Result:", encryptedResult);
// Update a single document
await collection1
.update({ age: 20 })
.UpdateOne({ name: "Updated User", gender: "Male" });
// Update multiple documents
await collection1
.update({ name: { $regex: "User" } })
.UpdateMany({ isActive: true });
// Delete a single document
await collection1.delete({ name: "User1" }).deleteOne();
// Delete multiple documents
await collection1.delete({ age: { $lt: 25 } }).deleteMany();
createDB(dbName: string, schemaValidation: boolean = true): Promise<Database>
Creates a new database. The optional schemaValidation
parameter (default: true) determines whether schema validation will be enforced for collections in this database.
deleteDatabase(dbName: string): Promise<SuccessInterface | ErrorInterface>
Deletes a database.
createCollection(name: string, schema: object, crypto?: boolean, key?: string): Promise<Collection>
Creates a collection with an optional schema and encryption.
deleteCollection(name: string): Promise<SuccessInterface | ErrorInterface>
Deletes a collection.
getCollectionInfo(): Promise<SuccessInterface>
Retrieves information about all collections.
insert(data: object): Promise<SuccessInterface | ErrorInterface>
Inserts a document into the collection.
query(query: object): Reader
Queries documents in the collection.
aggregate(pipeline: object[]): Aggregation
Performs aggregation operations.
Limit(limit: number): Reader
Sets a limit on the number of documents.
Skip(skip: number): Reader
Skips a number of documents.
Sort(sort: object): Reader
Sorts the query results.
exec(): Promise<SuccessInterface | ErrorInterface>
Executes the query.
AxioDB prioritizes data security with features like:
.axiodb
file-based storage.We welcome contributions from the community! Whether it's code improvements, documentation updates, bug reports, or feature suggestions, your input helps make AxioDB better. Please read the CONTRIBUTING.md file for guidelines on how to get started.
This project is licensed under the MIT License. See the LICENSE file for details.
Special thanks to all contributors and supporters of AxioDB. Your feedback and contributions make this project better!
FAQs
A blazing-fast, lightweight, and scalable nodejs package based DBMS for modern applications. Supports schemas, encryption, and advanced query capabilities.
The npm package axiodb receives a total of 16 weekly downloads. As such, axiodb popularity was classified as not popular.
We found that axiodb demonstrated a healthy version release cadence and project activity because the last version was released less than 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
Vite releases Rolldown-Vite, a Rust-based bundler preview offering faster builds and lower memory usage as a drop-in replacement for Vite.
Research
Security News
A malicious npm typosquat uses remote commands to silently delete entire project directories after a single mistyped install.
Research
Security News
Malicious PyPI package semantic-types steals Solana private keys via transitive dependency installs using monkey patching and blockchain exfiltration.