
Research
2025 Report: Destructive Malware in Open Source Packages
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.
@dbcube/query-builder
Advanced tools
The DBCube Query Builder is a lightweight, flexible, and fluent library for building queries across multiple database engines, including MySQL, PostgreSQL, SQLite, and MongoDB, using JavaScript/Node.js. Its agnostic design allows you to generate data man
The DBCube Query Builder is a lightweight, flexible, and fluent library for building queries across multiple database engines, including MySQL, PostgreSQL, SQLite, and MongoDB, using JavaScript/Node.js.
Its agnostic design allows you to generate data manipulation (DML) and data definition (DDL) operations with a clean, chainable syntax—without sacrificing power or expressiveness.
It’s designed to work seamlessly in both SQL and NoSQL environments, providing a consistent abstraction layer across different storage technologies while still leveraging the native capabilities of each engine.
npm install @dbcube/query-builder
import Database from "@dbcube/query-builder";
const db = new Database("my_database");
// Select all users
const users = await db.table("users").get();
// Select users with conditions
const activeUsers = await db
.table("users")
.where("status", "=", "active")
.orderBy("created_at", "DESC")
.limit(10)
.get();
// Insert new users
await db
.table("users")
.insert([{ name: "John", email: "john@example.com", age: 30 }]);
// Update a user
await db.table("users").where("id", "=", 1).update({ status: "inactive" });
// Delete users
await db.table("users").where("status", "=", "deleted").delete();
new Database(name: string)Creates a new database connection instance.
table(tableName: string): TableReturns a Table instance for building queries on the specified table.
select(fields?: string[]): Specify columns to select.where(column, operator, value): Add a WHERE condition.orWhere(column, operator, value): Add an OR WHERE condition.whereGroup(callback): Grouped WHERE conditions.whereBetween(column, [min, max]): WHERE BETWEEN condition.whereIn(column, values): WHERE IN condition.whereNull(column): WHERE IS NULL condition.whereNotNull(column): WHERE IS NOT NULL condition.join(table, column1, operator, column2): INNER JOIN.leftJoin(table, column1, operator, column2): LEFT JOIN.rightJoin(table, column1, operator, column2): RIGHT JOIN.orderBy(column, direction): ORDER BY clause.groupBy(column): GROUP BY clause.distinct(): DISTINCT clause.count(column?): COUNT aggregation.sum(column): SUM aggregation.avg(column): AVG aggregation.max(column): MAX aggregation.min(column): MIN aggregation.limit(number): LIMIT clause.page(number): Pagination (requires limit).get(): Execute and return all matching rows.first(): Execute and return the first matching row.find(value, column?): Find a row by column value (default: id).insert(data): Insert one or more rows.update(data): Update rows matching the conditions.delete(): Delete rows matching the conditions.// Complex query with joins, grouping, and aggregation
const results = await db
.table("orders")
.join("users", "orders.user_id", "=", "users.id")
.where("orders.status", "=", "completed")
.groupBy("users.country")
.sum("orders.total")
.orderBy("sum", "DESC")
.limit(5)
.get();
All methods throw descriptive errors for invalid usage, such as missing WHERE conditions on update/delete, or invalid data types.
This project is licensed under the MIT License.
Contributions are welcome! Please see CONTRIBUTING.md for guidelines.
dbcube-query-builder is part of the dbcube ecosystem, designed to provide a robust and flexible query building experience for modern Node.js applications.
FAQs
The Dbcube Query Builder is a lightweight, flexible, and fluent library for building queries across multiple database engines, including MySQL, PostgreSQL, SQLite, and MongoDB, using JavaScript/Node.js. Its agnostic design allows you to generate data man
The npm package @dbcube/query-builder receives a total of 13 weekly downloads. As such, @dbcube/query-builder popularity was classified as not popular.
We found that @dbcube/query-builder 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.

Research
Destructive malware is rising across open source registries, using delays and kill switches to wipe code, break builds, and disrupt CI/CD.

Security News
Socket CTO Ahmad Nassri shares practical AI coding techniques, tools, and team workflows, plus what still feels noisy and why shipping remains human-led.

Research
/Security News
A five-month operation turned 27 npm packages into durable hosting for browser-run lures that mimic document-sharing portals and Microsoft sign-in, targeting 25 organizations across manufacturing, industrial automation, plastics, and healthcare for credential theft.