
Security News
Feross on TBPN: How North Korea Hijacked Axios
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.
simple-sql-get
Advanced tools
Simple SQL Query Tool for Select statements. A very thin wrapper over Sequelize.
Get data from a SQL databases (select statements only).
A very thin wrapper for the excellent sequelize library.
$ npm install --save simple-sql-get
import SimpleSQLGet from 'simple-sql-get';
import settings from './settings';
// create a connection to your SQL database
const db = new SimpleSQLGet(settings.db);
// simple query
const sql = `
select id_num as idNum
, first_name as firstName
, last_name as lastName
from users
`;
db.get(sql)
.then((data) => {
console.log(data);
})
.catch(console.error);
/*
[
{
idNum: 1,
firstName: 'Cosmo',
lastName: 'Kramer'
},
{
idNum: 2,
firstName: 'Elaine',
lastName: 'Benes'
}
]
*/
// query with named parameters
const emailListSql = `
select first_name as firstName
, last_name as lastName
, email
from users
where last_name like :lastName
`;
db.get(emailListSql, {lastName: 'Benes'})
.then((data) => {
console.log(data);
})
.catch(console.error);
/*
[{
firstName: 'Elaine',
lastName: 'Benes',
email: 'ebenes@jpeterman.com'
}]
*/
See Sequelize docs for more information.
// settings.js
{
db: {
{
dbName: 'MyDB',
username: 'root',
password: 'root',
config: {
host: 'localhost',
dialect: 'mssql',
pool: {
max: 5,
min: 0,
idle: 10000,
},
// global defaults for define method
define: {
timestamps: false,
freezeTableName: true,
},
// turn off logging sql queries to console.log
// remove this line if you are interested in this
logging: null,
},
}
}
}
FAQs
Simple SQL Query Tool for Select statements. A very thin wrapper over Sequelize.
We found that simple-sql-get 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
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.

Security News
OpenSSF has issued a high-severity advisory warning open source developers of an active Slack-based campaign using impersonation to deliver malware.

Research
/Security News
Malicious packages published to npm, PyPI, Go Modules, crates.io, and Packagist impersonate developer tooling to fetch staged malware, steal credentials and wallets, and enable remote access.