Socket
Socket
Sign inDemoInstall

mysql-simple-query

Package Overview
Dependencies
0
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

notes.md

8

package.json
{
"name": "mysql-simple-query",
"version": "1.0.1",
"version": "1.0.2",
"description": "Simple query wrapper for mysql-promise to make querying, inserting, updating, and deleting easier for developers.",

@@ -18,3 +18,7 @@ "main": "mysqlSimpleQuery.js",

"mysql helper",
"sql helper"
"sql helper",
"MySQL Query Builder",
"Mysql Query Builder",
"MySql",
"MySQL"
],

@@ -21,0 +25,0 @@ "author": "Corey Shaw",

@@ -144,14 +144,2 @@ MySQL Simple Query

### Overriding mysql-promise
On the `query`, `insert`, `update`, and `delete` methods, mysql-promise can be ignored by passing a `true` in the last param. This will return the raw sql syntax.
IE:
```js
db.select('id, name');
db.from('users');
db.where('name', 'foo');
const results = db.query(true);
````
### Component Definitions

@@ -158,0 +146,0 @@ #### db.select()

@@ -15,3 +15,3 @@ const expect = require('chai').expect;

test.orderBy('key');
const testResults = test.query(true);
const testResults = test.query();

@@ -62,3 +62,3 @@ expect(testResults).to.equal('SELECT * FROM table INNER JOIN table ON table_1 = table_2 WHERE key="value" GROUP BY key ORDER BY key ASC;');

test.where('product_id', 2222);
const results = test.delete('product_option_set', true);
const results = test.delete('product_option_set');
console.log(results);

@@ -65,0 +65,0 @@ expect(results).to.equal('DELETE FROM product_option_set WHERE product_id="2222"');

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc