@ocap/indexdb-elasticsearch 1.18.96 → 1.18.98
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/db.js +6 -0
- package/lib/model/tx.js +1 -0
- package/package.json +5 -5
package/lib/db.js
CHANGED
@@ -109,6 +109,7 @@ class ESIndexDB extends BaseIndexDB {
|
|
109
109
|
txFilter = {},
|
110
110
|
rollupFilter = {},
|
111
111
|
stakeFilter = {},
|
112
|
+
delegationFilter = {},
|
112
113
|
} = {}) {
|
113
114
|
const pagination = formatPagination({ paging, defaultSortField: 'time' });
|
114
115
|
|
@@ -121,6 +122,7 @@ class ESIndexDB extends BaseIndexDB {
|
|
121
122
|
const { txs = [] } = txFilter;
|
122
123
|
const { rollups = [] } = rollupFilter;
|
123
124
|
const { stakes = [] } = stakeFilter;
|
125
|
+
const { delegations = [] } = delegationFilter;
|
124
126
|
|
125
127
|
// OR is spelled should
|
126
128
|
// AND is spelled must
|
@@ -189,6 +191,10 @@ class ESIndexDB extends BaseIndexDB {
|
|
189
191
|
conditions.push({ terms: { stakes } });
|
190
192
|
}
|
191
193
|
|
194
|
+
if (delegations.length) {
|
195
|
+
conditions.push({ terms: { delegations } });
|
196
|
+
}
|
197
|
+
|
192
198
|
const condition = getTimeCondition(timeFilter, ['time'], 'time');
|
193
199
|
if (condition) {
|
194
200
|
conditions.push(condition);
|
package/lib/model/tx.js
CHANGED
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ocap/indexdb-elasticsearch",
|
3
3
|
"description": "OCAP indexdb adapter that uses elasticsearch as backend",
|
4
|
-
"version": "1.18.
|
4
|
+
"version": "1.18.98",
|
5
5
|
"author": "wangshijun <shijun@arcblock.io> (https://www.arcblock.io)",
|
6
6
|
"bugs": {
|
7
7
|
"url": "https://github.com/ArcBlock/blockchain/issues",
|
@@ -38,12 +38,12 @@
|
|
38
38
|
"test": "jest --forceExit --detectOpenHandles",
|
39
39
|
"coverage": "npm run test -- --coverage"
|
40
40
|
},
|
41
|
-
"gitHead": "
|
41
|
+
"gitHead": "41138be9ecae27624397a8b5ee270e2101944560",
|
42
42
|
"dependencies": {
|
43
|
-
"@arcblock/did": "1.18.
|
43
|
+
"@arcblock/did": "1.18.98",
|
44
44
|
"@elastic/elasticsearch": "7.13.0",
|
45
|
-
"@ocap/indexdb": "1.18.
|
46
|
-
"@ocap/util": "1.18.
|
45
|
+
"@ocap/indexdb": "1.18.98",
|
46
|
+
"@ocap/util": "1.18.98",
|
47
47
|
"axios": "^0.27.2",
|
48
48
|
"bn.js": "^5.2.1",
|
49
49
|
"debug": "^4.3.4",
|