|
@@ -1,5 +1,4 @@
|
|
import { DataCache } from '@wekanteam/meteor-reactive-cache';
|
|
import { DataCache } from '@wekanteam/meteor-reactive-cache';
|
|
-import { Jsons } from './jsons';
|
|
|
|
|
|
|
|
// Server isn't reactive, so search for the data always.
|
|
// Server isn't reactive, so search for the data always.
|
|
ReactiveCacheServer = {
|
|
ReactiveCacheServer = {
|
|
@@ -266,19 +265,19 @@ ReactiveCacheClient = {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__board) {
|
|
if (!this.__board) {
|
|
this.__board = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__board = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Boards.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Boards.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__board.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__board.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getBoards(selector = {}, options = {}, getQuery = false) {
|
|
getBoards(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__boards) {
|
|
if (!this.__boards) {
|
|
this.__boards = new DataCache(_select => {
|
|
this.__boards = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Boards.find(__select.selector, __select.options);
|
|
let _ret = Boards.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -286,26 +285,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__boards.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__boards.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getList(idOrFirstObjectSelector = {}, options = {}) {
|
|
getList(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__list) {
|
|
if (!this.__list) {
|
|
this.__list = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__list = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Lists.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Lists.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__list.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__list.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getLists(selector = {}, options = {}, getQuery = false) {
|
|
getLists(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__lists) {
|
|
if (!this.__lists) {
|
|
this.__lists = new DataCache(_select => {
|
|
this.__lists = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Lists.find(__select.selector, __select.options);
|
|
let _ret = Lists.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -313,26 +312,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__lists.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__lists.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getSwimlane(idOrFirstObjectSelector = {}, options = {}) {
|
|
getSwimlane(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__swimlane) {
|
|
if (!this.__swimlane) {
|
|
this.__swimlane = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__swimlane = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Swimlanes.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Swimlanes.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__swimlane.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__swimlane.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getSwimlanes(selector = {}, options = {}, getQuery = false) {
|
|
getSwimlanes(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__swimlanes) {
|
|
if (!this.__swimlanes) {
|
|
this.__swimlanes = new DataCache(_select => {
|
|
this.__swimlanes = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Swimlanes.find(__select.selector, __select.options);
|
|
let _ret = Swimlanes.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -340,26 +339,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__swimlanes.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__swimlanes.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getChecklist(idOrFirstObjectSelector = {}, options = {}) {
|
|
getChecklist(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__checklist) {
|
|
if (!this.__checklist) {
|
|
this.__checklist = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__checklist = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Checklists.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Checklists.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__checklist.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__checklist.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getChecklists(selector = {}, options = {}, getQuery = false) {
|
|
getChecklists(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__checklists) {
|
|
if (!this.__checklists) {
|
|
this.__checklists = new DataCache(_select => {
|
|
this.__checklists = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Checklists.find(__select.selector, __select.options);
|
|
let _ret = Checklists.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -367,26 +366,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__checklists.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__checklists.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getChecklistItem(idOrFirstObjectSelector = {}, options = {}) {
|
|
getChecklistItem(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__checklistItem) {
|
|
if (!this.__checklistItem) {
|
|
this.__checklistItem = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__checklistItem = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = ChecklistItems.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = ChecklistItems.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__checklistItem.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__checklistItem.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getChecklistItems(selector = {}, options = {}, getQuery = false) {
|
|
getChecklistItems(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__checklistItems) {
|
|
if (!this.__checklistItems) {
|
|
this.__checklistItems = new DataCache(_select => {
|
|
this.__checklistItems = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = ChecklistItems.find(__select.selector, __select.options);
|
|
let _ret = ChecklistItems.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -394,26 +393,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__checklistItems.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__checklistItems.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCard(idOrFirstObjectSelector = {}, options = {}) {
|
|
getCard(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__card) {
|
|
if (!this.__card) {
|
|
this.__card = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__card = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Cards.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Cards.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__card.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__card.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCards(selector = {}, options = {}, getQuery = false) {
|
|
getCards(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__cards) {
|
|
if (!this.__cards) {
|
|
this.__cards = new DataCache(_select => {
|
|
this.__cards = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Cards.find(__select.selector, __select.options);
|
|
let _ret = Cards.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -421,26 +420,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__cards.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__cards.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCardComment(idOrFirstObjectSelector = {}, options = {}) {
|
|
getCardComment(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__cardComment) {
|
|
if (!this.__cardComment) {
|
|
this.__cardComment = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__cardComment = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = CardComments.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = CardComments.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__cardComment.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__cardComment.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCardComments(selector = {}, options = {}, getQuery = false) {
|
|
getCardComments(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__cardComments) {
|
|
if (!this.__cardComments) {
|
|
this.__cardComments = new DataCache(_select => {
|
|
this.__cardComments = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = CardComments.find(__select.selector, __select.options);
|
|
let _ret = CardComments.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -448,26 +447,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__cardComments.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__cardComments.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCardCommentReaction(idOrFirstObjectSelector = {}, options = {}) {
|
|
getCardCommentReaction(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__cardCommentReaction) {
|
|
if (!this.__cardCommentReaction) {
|
|
this.__cardCommentReaction = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__cardCommentReaction = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = CardCommentReactions.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = CardCommentReactions.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__cardCommentReaction.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__cardCommentReaction.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCardCommentReactions(selector = {}, options = {}, getQuery = false) {
|
|
getCardCommentReactions(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__cardCommentReactions) {
|
|
if (!this.__cardCommentReactions) {
|
|
this.__cardCommentReactions = new DataCache(_select => {
|
|
this.__cardCommentReactions = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = CardCommentReactions.find(__select.selector, __select.options);
|
|
let _ret = CardCommentReactions.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -475,26 +474,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__cardCommentReactions.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__cardCommentReactions.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCustomField(idOrFirstObjectSelector = {}, options = {}) {
|
|
getCustomField(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__customField) {
|
|
if (!this.__customField) {
|
|
this.__customField = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__customField = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = CustomFields.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = CustomFields.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__customField.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__customField.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCustomFields(selector = {}, options = {}, getQuery = false) {
|
|
getCustomFields(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__customFields) {
|
|
if (!this.__customFields) {
|
|
this.__customFields = new DataCache(_select => {
|
|
this.__customFields = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = CustomFields.find(__select.selector, __select.options);
|
|
let _ret = CustomFields.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -502,26 +501,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__customFields.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__customFields.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getAttachment(idOrFirstObjectSelector = {}, options = {}) {
|
|
getAttachment(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__attachment) {
|
|
if (!this.__attachment) {
|
|
this.__attachment = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__attachment = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Attachments.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Attachments.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__attachment.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__attachment.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getAttachments(selector = {}, options = {}, getQuery = false) {
|
|
getAttachments(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__attachments) {
|
|
if (!this.__attachments) {
|
|
this.__attachments = new DataCache(_select => {
|
|
this.__attachments = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Attachments.find(__select.selector, __select.options);
|
|
let _ret = Attachments.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -529,26 +528,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__attachments.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__attachments.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getAvatar(idOrFirstObjectSelector = {}, options = {}) {
|
|
getAvatar(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__avatar) {
|
|
if (!this.__avatar) {
|
|
this.__avatar = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__avatar = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Avatars.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Avatars.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__avatar.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__avatar.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getAvatars(selector = {}, options = {}, getQuery = false) {
|
|
getAvatars(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__avatars) {
|
|
if (!this.__avatars) {
|
|
this.__avatars = new DataCache(_select => {
|
|
this.__avatars = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Avatars.find(__select.selector, __select.options);
|
|
let _ret = Avatars.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -556,26 +555,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__avatars.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__avatars.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getUser(idOrFirstObjectSelector = {}, options = {}) {
|
|
getUser(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__user) {
|
|
if (!this.__user) {
|
|
this.__user = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__user = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Users.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Users.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__user.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__user.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getUsers(selector = {}, options = {}, getQuery = false) {
|
|
getUsers(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__users) {
|
|
if (!this.__users) {
|
|
this.__users = new DataCache(_select => {
|
|
this.__users = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Users.find(__select.selector, __select.options);
|
|
let _ret = Users.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -583,26 +582,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__users.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__users.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getOrg(idOrFirstObjectSelector = {}, options = {}) {
|
|
getOrg(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__org) {
|
|
if (!this.__org) {
|
|
this.__org = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__org = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Org.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Org.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__org.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__org.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getOrgs(selector = {}, options = {}, getQuery = false) {
|
|
getOrgs(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__orgs) {
|
|
if (!this.__orgs) {
|
|
this.__orgs = new DataCache(_select => {
|
|
this.__orgs = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Org.find(__select.selector, __select.options);
|
|
let _ret = Org.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -610,26 +609,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__orgs.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__orgs.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getTeam(idOrFirstObjectSelector = {}, options = {}) {
|
|
getTeam(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__team) {
|
|
if (!this.__team) {
|
|
this.__team = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__team = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Team.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Team.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__team.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__team.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getTeams(selector = {}, options = {}, getQuery = false) {
|
|
getTeams(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__teams) {
|
|
if (!this.__teams) {
|
|
this.__teams = new DataCache(_select => {
|
|
this.__teams = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Team.find(__select.selector, __select.options);
|
|
let _ret = Team.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -637,26 +636,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__teams.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__teams.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getActivity(idOrFirstObjectSelector = {}, options = {}) {
|
|
getActivity(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__activity) {
|
|
if (!this.__activity) {
|
|
this.__activity = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__activity = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Activities.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Activities.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__activity.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__activity.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getActivities(selector = {}, options = {}, getQuery = false) {
|
|
getActivities(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__activities) {
|
|
if (!this.__activities) {
|
|
this.__activities = new DataCache(_select => {
|
|
this.__activities = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Activities.find(__select.selector, __select.options);
|
|
let _ret = Activities.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -664,26 +663,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__activities.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__activities.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getRule(idOrFirstObjectSelector = {}, options = {}) {
|
|
getRule(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__rule) {
|
|
if (!this.__rule) {
|
|
this.__rule = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__rule = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Rules.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Rules.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__rule.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__rule.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getRules(selector = {}, options = {}, getQuery = false) {
|
|
getRules(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__rules) {
|
|
if (!this.__rules) {
|
|
this.__rules = new DataCache(_select => {
|
|
this.__rules = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Rules.find(__select.selector, __select.options);
|
|
let _ret = Rules.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -691,26 +690,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__rules.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__rules.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getAction(idOrFirstObjectSelector = {}, options = {}) {
|
|
getAction(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__action) {
|
|
if (!this.__action) {
|
|
this.__action = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__action = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Actions.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Actions.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__action.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__action.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getActions(selector = {}, options = {}, getQuery = false) {
|
|
getActions(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__actions) {
|
|
if (!this.__actions) {
|
|
this.__actions = new DataCache(_select => {
|
|
this.__actions = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Actions.find(__select.selector, __select.options);
|
|
let _ret = Actions.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -718,26 +717,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__actions.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__actions.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getTrigger(idOrFirstObjectSelector = {}, options = {}) {
|
|
getTrigger(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__trigger) {
|
|
if (!this.__trigger) {
|
|
this.__trigger = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__trigger = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Triggers.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Triggers.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__trigger.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__trigger.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getTriggers(selector = {}, options = {}, getQuery = false) {
|
|
getTriggers(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__triggers) {
|
|
if (!this.__triggers) {
|
|
this.__triggers = new DataCache(_select => {
|
|
this.__triggers = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Triggers.find(__select.selector, __select.options);
|
|
let _ret = Triggers.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -745,26 +744,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__triggers.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__triggers.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getImpersonatedUser(idOrFirstObjectSelector = {}, options = {}) {
|
|
getImpersonatedUser(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__impersonatedUser) {
|
|
if (!this.__impersonatedUser) {
|
|
this.__impersonatedUser = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__impersonatedUser = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = ImpersonatedUsers.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = ImpersonatedUsers.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__impersonatedUser.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__impersonatedUser.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getImpersonatedUsers(selector = {}, options = {}, getQuery = false) {
|
|
getImpersonatedUsers(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__impersonatedUsers) {
|
|
if (!this.__impersonatedUsers) {
|
|
this.__impersonatedUsers = new DataCache(_select => {
|
|
this.__impersonatedUsers = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = ImpersonatedUsers.find(__select.selector, __select.options);
|
|
let _ret = ImpersonatedUsers.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -772,26 +771,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__impersonatedUsers.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__impersonatedUsers.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getIntegration(idOrFirstObjectSelector = {}, options = {}) {
|
|
getIntegration(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__integration) {
|
|
if (!this.__integration) {
|
|
this.__integration = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__integration = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = Integrations.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = Integrations.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__integration.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__integration.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getIntegrations(selector = {}, options = {}, getQuery = false) {
|
|
getIntegrations(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__integrations) {
|
|
if (!this.__integrations) {
|
|
this.__integrations = new DataCache(_select => {
|
|
this.__integrations = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = Integrations.find(__select.selector, __select.options);
|
|
let _ret = Integrations.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -799,26 +798,26 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__integrations.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__integrations.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getInvitationCode(idOrFirstObjectSelector = {}, options = {}) {
|
|
getInvitationCode(idOrFirstObjectSelector = {}, options = {}) {
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
const idOrFirstObjectSelect = {idOrFirstObjectSelector, options}
|
|
if (!this.__invitationCode) {
|
|
if (!this.__invitationCode) {
|
|
this.__invitationCode = new DataCache(_idOrFirstObjectSelect => {
|
|
this.__invitationCode = new DataCache(_idOrFirstObjectSelect => {
|
|
- const __select = Jsons.parse(_idOrFirstObjectSelect);
|
|
|
|
|
|
+ const __select = EJSON.parse(_idOrFirstObjectSelect);
|
|
const _ret = InvitationCodes.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
const _ret = InvitationCodes.findOne(__select.idOrFirstObjectSelector, __select.options);
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__invitationCode.get(Jsons.stringify(idOrFirstObjectSelect));
|
|
|
|
|
|
+ const ret = this.__invitationCode.get(EJSON.stringify(idOrFirstObjectSelect));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getInvitationCodes(selector = {}, options = {}, getQuery = false) {
|
|
getInvitationCodes(selector = {}, options = {}, getQuery = false) {
|
|
const select = {selector, options, getQuery}
|
|
const select = {selector, options, getQuery}
|
|
if (!this.__invitationCodes) {
|
|
if (!this.__invitationCodes) {
|
|
this.__invitationCodes = new DataCache(_select => {
|
|
this.__invitationCodes = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
let _ret = InvitationCodes.find(__select.selector, __select.options);
|
|
let _ret = InvitationCodes.find(__select.selector, __select.options);
|
|
if (__select.getQuery !== true) {
|
|
if (__select.getQuery !== true) {
|
|
_ret = _ret.fetch();
|
|
_ret = _ret.fetch();
|
|
@@ -826,7 +825,7 @@ ReactiveCacheClient = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- const ret = this.__invitationCodes.get(Jsons.stringify(select));
|
|
|
|
|
|
+ const ret = this.__invitationCodes.get(EJSON.stringify(select));
|
|
return ret;
|
|
return ret;
|
|
},
|
|
},
|
|
getCurrentSetting() {
|
|
getCurrentSetting() {
|
|
@@ -1285,7 +1284,7 @@ ReactiveMiniMongoIndex = {
|
|
const select = {addSelect, options}
|
|
const select = {addSelect, options}
|
|
if (!this.__subTasksWithId) {
|
|
if (!this.__subTasksWithId) {
|
|
this.__subTasksWithId = new DataCache(_select => {
|
|
this.__subTasksWithId = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
const _subTasks = ReactiveCache.getCards(
|
|
const _subTasks = ReactiveCache.getCards(
|
|
{ parentId: { $exists: true },
|
|
{ parentId: { $exists: true },
|
|
...__select.addSelect,
|
|
...__select.addSelect,
|
|
@@ -1294,7 +1293,7 @@ ReactiveMiniMongoIndex = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- ret = this.__subTasksWithId.get(Jsons.stringify(select));
|
|
|
|
|
|
+ ret = this.__subTasksWithId.get(EJSON.stringify(select));
|
|
if (ret) {
|
|
if (ret) {
|
|
ret = ret[parentId] || [];
|
|
ret = ret[parentId] || [];
|
|
}
|
|
}
|
|
@@ -1307,7 +1306,7 @@ ReactiveMiniMongoIndex = {
|
|
const select = {addSelect, options}
|
|
const select = {addSelect, options}
|
|
if (!this.__checklistsWithId) {
|
|
if (!this.__checklistsWithId) {
|
|
this.__checklistsWithId = new DataCache(_select => {
|
|
this.__checklistsWithId = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
const _checklists = ReactiveCache.getChecklists(
|
|
const _checklists = ReactiveCache.getChecklists(
|
|
{ cardId: { $exists: true },
|
|
{ cardId: { $exists: true },
|
|
...__select.addSelect,
|
|
...__select.addSelect,
|
|
@@ -1316,7 +1315,7 @@ ReactiveMiniMongoIndex = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- ret = this.__checklistsWithId.get(Jsons.stringify(select));
|
|
|
|
|
|
+ ret = this.__checklistsWithId.get(EJSON.stringify(select));
|
|
if (ret) {
|
|
if (ret) {
|
|
ret = ret[cardId] || [];
|
|
ret = ret[cardId] || [];
|
|
}
|
|
}
|
|
@@ -1329,7 +1328,7 @@ ReactiveMiniMongoIndex = {
|
|
const select = {addSelect, options}
|
|
const select = {addSelect, options}
|
|
if (!this.__checklistItemsWithId) {
|
|
if (!this.__checklistItemsWithId) {
|
|
this.__checklistItemsWithId = new DataCache(_select => {
|
|
this.__checklistItemsWithId = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
const _checklistItems = ReactiveCache.getChecklistItems(
|
|
const _checklistItems = ReactiveCache.getChecklistItems(
|
|
{ checklistId: { $exists: true },
|
|
{ checklistId: { $exists: true },
|
|
...__select.addSelect,
|
|
...__select.addSelect,
|
|
@@ -1338,7 +1337,7 @@ ReactiveMiniMongoIndex = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- ret = this.__checklistItemsWithId.get(Jsons.stringify(select));
|
|
|
|
|
|
+ ret = this.__checklistItemsWithId.get(EJSON.stringify(select));
|
|
if (ret) {
|
|
if (ret) {
|
|
ret = ret[checklistId] || [];
|
|
ret = ret[checklistId] || [];
|
|
}
|
|
}
|
|
@@ -1351,7 +1350,7 @@ ReactiveMiniMongoIndex = {
|
|
const select = {addSelect, options}
|
|
const select = {addSelect, options}
|
|
if (!this.__cardCommentsWithId) {
|
|
if (!this.__cardCommentsWithId) {
|
|
this.__cardCommentsWithId = new DataCache(_select => {
|
|
this.__cardCommentsWithId = new DataCache(_select => {
|
|
- const __select = Jsons.parse(_select);
|
|
|
|
|
|
+ const __select = EJSON.parse(_select);
|
|
const _cardComments = ReactiveCache.getCardComments(
|
|
const _cardComments = ReactiveCache.getCardComments(
|
|
{ cardId: { $exists: true },
|
|
{ cardId: { $exists: true },
|
|
...__select.addSelect,
|
|
...__select.addSelect,
|
|
@@ -1360,7 +1359,7 @@ ReactiveMiniMongoIndex = {
|
|
return _ret;
|
|
return _ret;
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- ret = this.__cardCommentsWithId.get(Jsons.stringify(select));
|
|
|
|
|
|
+ ret = this.__cardCommentsWithId.get(EJSON.stringify(select));
|
|
if (ret) {
|
|
if (ret) {
|
|
ret = ret[cardId] || [];
|
|
ret = ret[cardId] || [];
|
|
}
|
|
}
|