* refactor: start migrating to node-redis
* few more zset fixes
* fix: db.scan
* fix: list methods
* fix set methods
* fix: hash methods
* use hasOwn, remove cloning
* sorted set fixes
* fix: so data is converted to strings before saving
otherwise node-redis throws below error
TypeError: "arguments[2]" must be of type "string | Buffer", got number instead.
* chore: remove comments
* fix: zrank string param
* use new close
* chore: up dbsearch
* test: add log
* test: more log
* test: log failing test
* test: catch errors in formatApiResponse
add await so exception goes to catch
* tetst: add log
* fix: dont set null/undefined values
* test: more fixes
* switch to ioredis
also need this fix in redisearch:
redis-search.js:98
```
redisClient.multi(cmds).exec(function(err, ids) {
if (err) {
return callback(err);
}
var errRes = ids[resultIndex];
if (errRes[0]) {
return callback(errRes[0]);
}
callback(null, errRes[1]);
});
```
* dbsearch compatible with ioredis
* fixed dbsearch?
* 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
Groups.destroy can take an array of groupnames
Groups.leave can take an array of groupnames
db.incrObjectField/decrObjectField can take an array of keys
db.sortedSetRemove can take an array of keys and values
db.setRemove can take an array of keys
-isMemberOfSets returns true/false instead of 1/0
-when loading the posts of a topic only get the userdata for each user
once, before this commit if a topic had 10 posts from 2 different users
we were getting the user data for each user 5 times (drunk)
-getVoteStatusByPostIDs and getFavouritesByPostIDs no longer make
pids.length calls to the db, they use isMemberOfSets now
-getUserInfoForPost renamed to getUserInfoForPosts and doesnt make
uids.length calls to db, uses getMultipleUserFields instead