Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mysql-simple-query

Package Overview
Dependencies
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mysql-simple-query - npm Package Compare versions

Comparing version 1.0.7 to 1.0.8

2

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

@@ -5,0 +5,0 @@ "main": "mysqlSimpleQuery.js",

@@ -12,2 +12,3 @@ const dbQuery = require('./util/dbQuery');

this.whereLikeStatement = {};
this.whereBetweenStatement = {};
this.whereLikeCondition = null;

@@ -70,2 +71,10 @@ this.groupByStatement = '';

parseWhereBetween() {
if(!isEmpty(this.whereBetweenStatement)) {
return dbQuery.parseWhereBetween(this.whereBetweenStatement);
}
return '';
}
groupBy(key) {

@@ -123,2 +132,6 @@ if(key)

if(this.parseWhereBetween() !== '') {
queryStatement += ` ${this.parseWhereBetween()}`;
}
if(this.groupByStatement !== '') {

@@ -125,0 +138,0 @@ queryStatement += ` ${this.groupByStatement}`;

@@ -73,2 +73,13 @@ const select = (select) => {

const parseWhereBetween = (whereObject) => {
let whereStatement = [];
for (let key of Object.keys(whereObject)) {
const value = whereObject[key];
whereStatement.push(`${key} BETWEEN "${value}"`);
}
return `${whereStatement.join(' AND ')}`;
};
const groupBy = (key) => {

@@ -127,2 +138,3 @@ if(key)

parseWhereLike,
parseWhereBetween,
groupBy,

@@ -129,0 +141,0 @@ orderBy,

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc