
Company News
/Security News
Socket Selected for OpenAI's Cybersecurity Grant Program
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.
A lightweight SQL helper for Node.js Easily perform CRUD operations, joins, where clauses, ordering, limits, and offsets without writing raw SQL.
npm install qeasy
const qeasy = require("qeasy");
// 1️⃣ Connect to Database
qeasy.connectDB({
host: "localhost",
user: "root",
password: "password",
database: "mydb",
port: 3306,
});
// 2️⃣ Check Connection
qeasy.checkConnection()
.then(() => console.log("✅ Database connected"))
.catch(err => console.error("❌ Connection error:", err));
await qeasy.insert("users", {
name: "John Doe",
email: "john@example.com",
age: 25,
});
const users = await qeasy.findAll("users");
console.log(users);
const user = await qeasy.findById("users", "id", 1);
console.log(user);
await qeasy.findByIdAndUpdate("users", "id", 1, { age: 26 });
await qeasy.findByIdAndDelete("users", "id", 1);
const results = await qeasy.findWithJoins({
table: "orders",
as: "o",
selectedColumns: ["o.id", "o.total", "u.name"],
joins: [
{
table: "users",
as: "u",
type: "INNER",
on: { "u.id": "o.user_id" },
},
],
where: [
{ column: "u.age", operator: ">", value: 18 },
],
orderBy: [
{ column: "o.total", direction: "DESC" },
],
limit: 10,
offset: 0,
});
console.log(results);
## Joins
interface JoinOption {
table: string; // table name
as?: string; // alias
type?: "INNER" | "LEFT" | "RIGHT";
on: { [key: string]: string }; // join condition
}
interface WhereCondition {
column: string; // e.g., "u.id"
operator?: string; // '=', '>', '<', 'LIKE'
value: any;
}
interface OrderByOption {
column: string; // e.g., "u.name"
direction?: "ASC" | "DESC";
}
const qeasy = require("qeasy");
async function run() {
qeasy.connectDB({
host: "localhost",
user: "root",
password: "password",
database: "shopdb",
});
// Insert a product
await qeasy.insert("products", { name: "Laptop", price: 50000 });
// Get all products
const products = await qeasy.findAll("products");
console.log(products);
// Join example: Orders + Users
const orders = await qeasy.findWithJoins({
table: "orders",
as: "o",
selectedColumns: ["o.id", "u.name", "o.total"],
joins: [{ table: "users", as: "u", on: { "u.id": "o.user_id" } }],
});
console.log(orders);
}
run();
✅ Simple, mongoose-like syntax ✅ No need to write raw SQL queries ✅ Supports CRUD + complex joins ✅ Beginner-friendly
✨ That’s it! With just npm i qeasy, you can start querying your SQL DB easily.
FAQs
Query Easy: Simple SQL helper like Mongoose for MySQL/MariaDB
The npm package qeasy receives a total of 2 weekly downloads. As such, qeasy popularity was classified as not popular.
We found that qeasy 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.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.

Security News
Socket CEO Feross Aboukhadijeh joins 10 Minutes or Less, a podcast by Ali Rohde, to discuss the recent surge in open source supply chain attacks.

Research
/Security News
Campaign of 108 extensions harvests identities, steals sessions, and adds backdoors to browsers, all tied to the same C2 infrastructure.