Comparing version 0.0.6 to 0.0.7
@@ -46,5 +46,2 @@ const mysql = require('../mysql') | ||
} | ||
if (this.conditions['sort']) { | ||
SQL = SQL + ' order by ' + this.conditions['sort'].map(d => `${d.key} ${d.rule}`).join(',') | ||
} | ||
break | ||
@@ -85,2 +82,5 @@ case 'like': | ||
} | ||
if ((this.type === 'select' || this.type === 'like') && this.conditions['sort']) { | ||
SQL = SQL + ' order by ' + this.conditions['sort'].map(d => `${d.key} ${d.rule}`).join(',') | ||
} | ||
mysql.query(SQL) | ||
@@ -90,3 +90,3 @@ .then(res => { | ||
// limit | ||
if (this.type = 'select' && this.conditions['limit']) { | ||
if (this.type === 'select' && this.conditions['limit']) { | ||
if (!this.conditions['limit'].count) { | ||
@@ -93,0 +93,0 @@ result = result.slice(0, Number(this.conditions['limit'].num)) |
{ | ||
"name": "h-orm", | ||
"version": "0.0.6", | ||
"version": "0.0.7", | ||
"main": "index.js", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/yuanhaoyu/h-orm.git", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
22252