Socket
Socket
Sign inDemoInstall

mg-dbop

Package Overview
Dependencies
18
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.0.12 to 0.0.13

7

dbOp.js

@@ -293,3 +293,8 @@ /**

async count() {
const sql = "SELECT count(*) as t " + generateFromStatement(this.fromTables) + " " + this.whereSql;
let sql;
if ( this.selectSql.toLowerCase().indexOf(" distinct " ) != -1 ){
sql = "SELECT DISTINCT count(*) as t " + generateFromStatement(this.fromTables) + " " + this.whereSql;
}else {
sql = "SELECT count(*) as t " + generateFromStatement(this.fromTables) + " " + this.whereSql;
}
const row = await this.dbConn.query(sql, this.values);

@@ -296,0 +301,0 @@ return (row == null || row.length == 0) ? 0 : row[0].t;

2

package.json
{
"name": "mg-dbop",
"private" : false,
"version": "0.0.12",
"version": "0.0.13",
"homepage": "https://github.com/MacLaurinGroup/dbOp",

@@ -6,0 +6,0 @@ "description": "Query builder, and validator, for MySQL and node that utilizes the underlying table to provide a level of checking",

@@ -260,2 +260,4 @@ ## dbOp

* 2019-04-08
* Fixed the count() ignoring a 'distinct' in the SELECT
* 2019-03-30

@@ -262,0 +264,0 @@ * Added in setOptions() for cleaning up rows

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