![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
promised-sqlite3
Advanced tools
sqlite3 is a callback-based SQLite3 binding for Node.js.
Promise is a cool javascript feature.
The goal of promised-sqlite3 is to provide a wrapper arround sqlite3 to provide Promise-friendly methods.
npm install promised-sqlite3
const { PromisedDatabase } = require("promised-sqlite3"); // import the class
const db = new PromisedDatabase(); // create a instance of PromisedDatabase
// note: at this stade, the wrapped sqlite3.Database object is not created.
async function init() {
try {
await db.open("./db.sqlite"); // create a sqlite3.Database object & open the database on the passed filepath.
// run some sql request.
await db.run("CREATE TABLE IF NOT EXISTS foo (id INTEGER PRIMARY KEY AUTOINCREMENT, a TEXT NOT NULL, b TEXT)");
await db.run("INSERT INTO foo (a, b) VALUES (?, ?)", "alpha", "beta");
await db.run("INSERT INTO foo (a, b) VALUES ($goo, $hoo)", { $goo: "GOO !", $hoo: "HOO :" });
await db.run("INSERT INTO foo (a, b) VALUES (?, ?)", ["Value of a", "Value of b"]);
// read database
const row = await db.get("SELECT * FROM foo WHERE id = ?", 2);
console.log(row2);
const rows = await db.all("SELECT * FROM foo");
console.log(rows);
await db.each("SELECT * FROM foo WHERE id > ?", 5,
function(row) {
console.log(row);
}
);
// get the wrapped sqlite3.Database object
const sqliteDB = db.db;
// close the database
await db.close();
} catch(err) {
console.error(err);
}
}
init();
FAQs
A wrapper arround sqlite3 node.js package to use promise
The npm package promised-sqlite3 receives a total of 1,196 weekly downloads. As such, promised-sqlite3 popularity was classified as popular.
We found that promised-sqlite3 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
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.