mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-27 00:56:13 +01:00
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:
committed by
GitHub
parent
52a2e5d61d
commit
af1f7249a7
@@ -1,12 +1,12 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function (db, module) {
|
||||
module.exports = function (module) {
|
||||
module.sortedSetIntersectCard = async function (keys) {
|
||||
if (!Array.isArray(keys) || !keys.length) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
const res = await db.query({
|
||||
const res = await module.pool.query({
|
||||
name: 'sortedSetIntersectCard',
|
||||
text: `
|
||||
WITH A AS (SELECT z."value" v,
|
||||
@@ -55,7 +55,7 @@ SELECT COUNT(*) c
|
||||
limit = null;
|
||||
}
|
||||
|
||||
const res = await db.query({
|
||||
const res = await module.pool.query({
|
||||
name: 'getSortedSetIntersect' + aggregate + (params.sort > 0 ? 'Asc' : 'Desc') + 'WithScores',
|
||||
text: `
|
||||
WITH A AS (SELECT z."value",
|
||||
|
||||
Reference in New Issue
Block a user