Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
sqlite3-promisify
Advanced tools
Readme
Promisifying node-sqlite3 functions
npm i sqlite3-promisify
const SQLiteCrud = require('sqlite3-promisify');
const DB_PATH = __dirname + '/sqlite3.db';
const DB_NAME = 'sqlite3_test';
(async () => {
const Db = new SQLiteCrud(DB_PATH);
const rows = await Db.all(`SELECT * FROM ${DB_NAME};`);
console.log(rows);
////////// OUTPUT ////////////
// [
// { id: 1, name: 'Arshad', email: 'arshadkazmi42@gmail.com' },
// { id: 2, name: 'Sqlite3', email: 'sqlite3@db.com' }
// ]
const row = await Db.get(`SELECT * FROM ${DB_NAME} WHERE id = ?;`, [1]);
console.log(row);
////////// OUTPUT ////////////
// { id: 1, name: 'Arshad', email: 'arshadkazmi42@gmail.com' }
})();
connect(path)
Takes SQLite DB path
as input and returns sqlite3 object.
serialize()
Serialize consecutive db calls.
get(query, values={Optional})
Executes select queries and returns only first result row.
all(query, values={Optional})
Executes any query and returns all the result rows
run(query, values={Optional})
Executes query which does not returns any results
close()
Closes the db connection
Interested in contributing to this project? You can log any issues or suggestion related to this library here
Read our contributing guide on getting started with contributing to the codebase
Thank you to all the contributors who have helped us in making this project better :raised_hands:
FAQs
Promisify all node-sqlite3 functions
The npm package sqlite3-promisify receives a total of 4 weekly downloads. As such, sqlite3-promisify popularity was classified as not popular.
We found that sqlite3-promisify 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.