
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.
Squeakql is a SQL query builder and utility library that combines best practices, security, and a fluent API for effortlessly building SQL queries. Optimized for TypeScript, Squeakql is designed to be simple, efficient, and powerful, making database inter
Squeakql is a SQL query builder and utility library that combines best practices, security, and a fluent API for effortlessly building SQL queries. Optimized for TypeScript, Squeakql is designed to be simple, efficient, and powerful, making database interactions more robust and developer-friendly.
bun add squeakql
# or
npm install squeakql
import { sql } from "squeakql";
const query = sql`SELECT * FROM users WHERE id=${userId}`;
const [queryStr, values] = insert("users", { username: "johndoe", age: 25 });
Generates: INSERT INTO users (username, age) VALUES ($1, $2) RETURNING *
Squeakql uses template string literals to interpolate values safely preventing sql injection while allowing you to write readable sql!
const query = sql`SELECT * FROM table WHERE a=${val} and b=${val2}`;
Squeakql protects against SQL injections both in literals and values.
injectCode = "abc' OR 1=1;--";
const query = sql`SELECT * from tables WHERE col=${injectCode}`.render();
Will return a properly escaped query:
SELECT * from tables WHERE col='abc'' OR 1=1;--'
Use query builder to build sql selects:
import { sql } from "squeakql";
qb = new QueryBuilder("table_name");
console.log(qb.compile().render());
// returns> SELECT t.* FROM ONLY table_name AS t
Use for out-of-order query building
qb = new QueryBuilder("table_name");
qb.addOrderBy(sql`created_ts DESC`);
qb.addWhereClause(sql`a = ${one}`);
qb.addSelectableColumn("created_ts");
console.log(qb.compile().render());
qb.addSelectableColumn(column: string | SqueakqlQuery, as?: string)
qb.addWhereClause(clause: SqueakqlQuery)
qb.addHavingClause(clause: SqueakqlQuery)
qb.addWithClause(name: string, clause: SqueakqlQuery)
qb.addDistinctColumn(column: string | SqueakqlQuery)
qb.addSearchTerm(clause: SqueakqlQuery) // basically a where clause, but gets "OR"d
qb.addOrderBy(orderBy: SqueakqlQuery)
qb.addRawJoin(sqlJoinClause: SqueakqlQuery)
qb.joinTables(
tableA: BaseTable,
tableB: BaseTable,
joinColumnOfTableB: string,
useLeft = true
)
qb.addGroupBy(groupByClause: SqueakqlQuery)
qb.baseTable.tableName // "table_name"
qb.baseTable.alias // "t"
FAQs
Squeakql is a SQL query builder and utility library that combines best practices, security, and a fluent API for effortlessly building SQL queries. Optimized for TypeScript, Squeakql is designed to be simple, efficient, and powerful, making database inter
The npm package squeakql receives a total of 0 weekly downloads. As such, squeakql popularity was classified as not popular.
We found that squeakql 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.