feat: test psql without defineProperty (#7815)

* feat: test psql without defineProperty

* feat: refactor psql

remove .bind calls, use module.pool.query directly
move requires to top of file
move promisify to bottom so .init etc are promisified

* feat: mongodb

move requires to bottom

* feat: redis
This commit is contained in:
Barış Soner Uşaklı
2019-08-05 09:20:00 -04:00
committed by GitHub
parent 52a2e5d61d
commit af1f7249a7
33 changed files with 301 additions and 341 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
module.exports = function (redisClient, module) {
module.exports = function (module) {
const helpers = require('../helpers');
module.sortedSetIntersectCard = async function (keys) {
if (!Array.isArray(keys) || !keys.length) {
@@ -11,7 +11,7 @@ module.exports = function (redisClient, module) {
var interParams = [tempSetName, keys.length].concat(keys);
var multi = redisClient.multi();
var multi = module.client.multi();
multi.zinterstore(interParams);
multi.zcard(tempSetName);
multi.del(tempSetName);
@@ -51,7 +51,7 @@ module.exports = function (redisClient, module) {
rangeParams.push('WITHSCORES');
}
var multi = redisClient.multi();
var multi = module.client.multi();
multi.zinterstore(interParams);
multi[params.method](rangeParams);
multi.del(tempSetName);