Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
A simple and secure Node.js module for managing MySQL database connections.
mysql2/promise
for a modern asynchronous interface.npm install highsql
import Connection from 'highsql';
async function main() {
const conn = new Connection('your_host', 'your_user', 'your_password', 'your_database');
await conn.connect();
// Example: Select data
const [rows, fields] = await conn.select('*', 'users', 'id = 1');
// Example: Insert data (use prepared statements!)
await conn.insert('users', '(name, email)', '("Alice", "email@highsql.com")');
// Example: Update data
await conn.update('users', 'email = "email@highsql.com"', 'id = 1');
// Example: Delete data
await conn.delete('users', 'id = 1');
await conn.close();
}
main();
Function | Description | Parameters | Returns |
---|---|---|---|
connect() | Establishes a connection to the MySQL database. | None | None |
close() | Closes the connection to the MySQL database. | None | None |
select() | Executes a SELECT query. | columns , table , where | [rows, fields] |
insert() | Executes an INSERT query. | table , columns , values | None |
update() | Executes an UPDATE query. | table , set , where | None |
delete() | Executes a DELETE query. | table , where | None |
query() | Executes an arbitrary SQL statement. | sql | [rows, fields] |
This project is licensed under the MIT License - see the LICENSE file for details.
FAQs
High level MySQL utility
The npm package highsql receives a total of 9 weekly downloads. As such, highsql popularity was classified as not popular.
We found that highsql demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.