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');
// Example: Select data
const rows = await conn.select('users', 'id, name', 'id = ?', [1]);
// Example: Insert data (use prepared statements!)
await conn.insert('users', { name: 'Alice', email: 'alice@example.com' });
// Example: Update data
await conn.update('users', { email: 'alice@highsql.com' }, 'id = ?', [1]);
// Example: Delete data
await conn.delete('users', 'id = ?', [1]);
}
main();
Function | Description | Parameters | Returns |
---|---|---|---|
select(table, columns, where?, params?) | Executes a SELECT query. | table , columns , optional where condition, optional array of params for prepared statements | Promise<RowDataPacket[]> |
insert(table, values) | Executes an INSERT query. | table , an object of values to insert | Promise<ResultSetHeader> |
update(table, values, where, params?) | Executes an UPDATE query. | table , an object of values to update, where condition, optional array of params | Promise<ResultSetHeader> |
delete(table, where, params?) | Executes a DELETE query. | table , where condition, optional array of params | Promise<ResultSetHeader> |
query(sql, values?) | Executes an arbitrary SQL statement (use with caution!). | sql statement, optional array of values for prepared statements | `Promise<ResultSetHeader |
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.