mirror of
https://github.com/wekan/wekan.git
synced 2025-12-16 23:40:13 +01:00
ReactiveMiniMongoIndex created, Javascript Index of MiniMongo Client Database
- I didn't find a solution to have indexes in MiniMongo on client. As i see / believe there isn't this feature yet in Meteor (v2.10). - I got this and many more results while looking for an solution: https://forums.meteor.com/t/adding-indexing-to-minimongo/9130/12 https://github.com/meteor/meteor-feature-requests/issues/66 So to speed up the MiniMongo i decided to create a own class for this, currently per query. Of course, this isn't the best solution, but works for now good.
This commit is contained in:
parent
726fd5d60d
commit
40a5422e75
2 changed files with 32 additions and 12 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { ReactiveCache } from '/imports/reactiveCache';
|
||||
import { ReactiveCache, ReactiveMiniMongoIndex } from '/imports/reactiveCache';
|
||||
import moment from 'moment/min/moment-with-locales';
|
||||
import {
|
||||
ALLOWED_COLORS,
|
||||
|
|
@ -861,12 +861,9 @@ Cards.helpers({
|
|||
},
|
||||
|
||||
subtasks() {
|
||||
const ret = ReactiveCache.getCards(
|
||||
{
|
||||
parentId: this._id,
|
||||
const ret = ReactiveMiniMongoIndex.getSubTasksWithParentId(this._id, {
|
||||
archived: false,
|
||||
},
|
||||
{
|
||||
}, {
|
||||
sort: {
|
||||
sort: 1,
|
||||
},
|
||||
|
|
@ -876,17 +873,14 @@ Cards.helpers({
|
|||
},
|
||||
|
||||
subtasksFinished() {
|
||||
const ret = ReactiveCache.getCards({
|
||||
parentId: this._id,
|
||||
const ret = ReactiveMiniMongoIndex.getSubTasksWithParentId(this._id, {
|
||||
archived: true,
|
||||
});
|
||||
return ret;
|
||||
},
|
||||
|
||||
allSubtasks() {
|
||||
const ret = ReactiveCache.getCards({
|
||||
parentId: this._id,
|
||||
});
|
||||
const ret = ReactiveMiniMongoIndex.getSubTasksWithParentId(this._id);
|
||||
return ret;
|
||||
},
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue