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.8 to 1.0.9

13

lib/mysqlSimpleQuery.js

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

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

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

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

@@ -120,2 +129,6 @@ if (key) {

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

@@ -122,0 +135,0 @@ queryStatement += ` ${this.groupByStatement}`;

@@ -68,2 +68,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 => {

@@ -118,2 +129,3 @@ if (key) {

parseWhereLike,
parseWhereBetween,
groupBy,

@@ -120,0 +132,0 @@ orderBy,

2

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

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

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