zeanium-node
Advanced tools
Comparing version 0.8.4 to 0.8.5
{ | ||
"name": "zeanium-node", | ||
"version": "0.8.4", | ||
"version": "0.8.5", | ||
"description": "Zeanium for Node.js, simple http server and custome your business.", | ||
@@ -36,2 +36,3 @@ "main": "index.js", | ||
"mysql": "^2.13.0", | ||
"redis": "^2.8.0", | ||
"zeanium": "^1.1.29" | ||
@@ -38,0 +39,0 @@ }, |
@@ -42,3 +42,3 @@ /** | ||
zn.error('mysql.createConnection query error: ', err.stack); | ||
console.log(err.stack); | ||
console.error(err.stack); | ||
_defer.reject(err); | ||
@@ -68,3 +68,3 @@ }else { | ||
zn.error('ConnectionPool connection query error: ', err.stack); | ||
console.log(err.stack); | ||
console.error(err.stack); | ||
_defer.reject(err); | ||
@@ -87,3 +87,3 @@ }else { | ||
zn.error('ConnectionPool getConnection error: ', err.message); | ||
console.log(err.stack); | ||
console.error(err.stack); | ||
error && error(err); | ||
@@ -90,0 +90,0 @@ }else { |
@@ -41,2 +41,11 @@ /** | ||
} | ||
}, | ||
__getSessionGroup = function (){ | ||
if(zn._request){ | ||
return zn._request.getSessionValueByKey('zn_plugin_admin_group'); | ||
}else if(zn._oldRequest) { | ||
return zn._oldRequest.getSessionValueByKey('zn_plugin_admin_group'); | ||
}else { | ||
return 0; | ||
} | ||
}; | ||
@@ -160,2 +169,3 @@ | ||
_values = []; | ||
data.zn_plugin_admin_group = data.zn_plugin_admin_group || __getSessionGroup(); | ||
data.zn_create_user = data.zn_create_user || __getSessionId(); | ||
@@ -312,3 +322,3 @@ zn.each(data, function (value, key){ | ||
if(_return && addKeyWord !== false){ | ||
_return = 'where ' + _return; | ||
_return = "where zn_plugin_admin_group=" + __getSessionGroup() + " and " + _return; | ||
} | ||
@@ -315,0 +325,0 @@ |
@@ -6,2 +6,20 @@ /** | ||
var __getSessionId = function (){ | ||
if(zn._request){ | ||
return zn._request.getSessionValueByKey('id'); | ||
}else if(zn._oldRequest) { | ||
return zn._oldRequest.getSessionValueByKey('id'); | ||
}else { | ||
return 0; | ||
} | ||
}, __getSessionGroup = function (){ | ||
if(zn._request){ | ||
return zn._request.getSessionValueByKey('zn_plugin_admin_group'); | ||
}else if(zn._oldRequest) { | ||
return zn._oldRequest.getSessionValueByKey('zn_plugin_admin_group'); | ||
}else { | ||
return 0; | ||
} | ||
}; | ||
var __slice = Array.prototype.slice; | ||
@@ -13,13 +31,5 @@ var SQLS = { | ||
select : "select {fields} from {table} {where} {order} {group} {limit};", | ||
paging: "select {fields} from {table} {where} {order} {group} {limit};select count(*) as count from {table} {where};" | ||
paging: "select {fields} from {table} {where} {order} {group} {limit};select count(id) as count from {table} {where};" | ||
}, SQLS_DEFAULT = { | ||
fields: '*' | ||
}, __getSessionId = function (){ | ||
if(zn._request){ | ||
return zn._request.getSessionValueByKey('id'); | ||
}else if(zn._oldRequest) { | ||
return zn._oldRequest.getSessionValueByKey('id'); | ||
}else { | ||
return 0; | ||
} | ||
}; | ||
@@ -36,2 +46,5 @@ | ||
}, | ||
groupQuerySql: function (_group){ | ||
return " zn_plugin_admin_group={0} ".format(_group || __getSessionGroup()); | ||
}, | ||
paging: function (){ | ||
@@ -38,0 +51,0 @@ return __slice.call(arguments).map(function (data){ |
@@ -199,3 +199,3 @@ /** | ||
zn.error('Request.js: formidable.IncomingForm parse error, ' + error.toString()); | ||
console.log(error.stack || error); | ||
console.error(error.stack || error); | ||
} else { | ||
@@ -202,0 +202,0 @@ _data = _request.data = { |
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
283464
126
6644
5
+ Addedredis@^2.8.0
+ Addeddouble-ended-queue@2.1.0-0(transitive)
+ Addedredis@2.8.0(transitive)
+ Addedredis-commands@1.7.0(transitive)
+ Addedredis-parser@2.6.0(transitive)