
Security News
GitHub Actions Pricing Whiplash: Self-Hosted Actions Billing Change Postponed
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.
anydb-sql combines node-anydb and node-sql into a single package.
Initializing an instance also creates a connection pool. The url argument is the same as in node-anydb
var anydbsql = require('anydb-sql');
var db = anydbsql({
url: 'postgres://user:pass@host:port/database',
connections: { min: 2, max: 20 }
});
Defining a table for that database is the same as in node-sql:
var user = db.define({
name: 'Users',
columns: ['id', 'email', 'password']
});
Queries have the addtional methods:
Use regular node-sql queries then chain one of the additional methods at the end:
user.where({email: user.email}).get(function(err, users) {
// users[0].name,
});
Join queries have somewhat different results at the moment. The format of the result is the same as with anydb
user.select(user.name, post.content)
.from(user.join(post).on(user.id.equals(post.userId)))
.where(post.date.gt(yesterday))
.where(user.id.equals(id))
.get(function(err, res) {
// res['user.name'] and res['post.content']
});
Create a transactions and execute queries within it
var tx = db.begin()
user.insert({name: 'blah'}).returning(user.id).execWithin(tx);
user.insert({name: 'bleh'}).returning(user.id).execWithin(tx);
tx.commit();
Transactions have the same API as anydb tranactions
Finally you can close the connection pool
db.close();
Or execute custom queries
db.query(...anydb arguments...)
MIT
FAQs
Minimal ORM for mysql, postgresql and sqlite with complete arbitrary SQL query support (based on brianc's query builder sql)
The npm package anydb-sql receives a total of 61 weekly downloads. As such, anydb-sql popularity was classified as not popular.
We found that anydb-sql demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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
GitHub postponed a new billing model for self-hosted Actions after developer pushback, but moved forward with hosted runner price cuts on January 1.

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.