UNPKG

1.06 kBJavaScriptView Raw
1/*!
2 * Dependencies
3 */
4
5'use strict';
6
7const StateMachine = require('./statemachine');
8const ActiveRoster = StateMachine.ctor('require', 'modify', 'init', 'default', 'ignore');
9
10module.exports = exports = InternalCache;
11
12function InternalCache() {
13 this.strictMode = undefined;
14 this.selected = undefined;
15 this.shardval = undefined;
16 this.saveError = undefined;
17 this.validationError = undefined;
18 this.adhocPaths = undefined;
19 this.removing = undefined;
20 this.inserting = undefined;
21 this.saving = undefined;
22 this.version = undefined;
23 this.getters = {};
24 this._id = undefined;
25 this.populate = undefined; // what we want to populate in this doc
26 this.populated = undefined;// the _ids that have been populated
27 this.wasPopulated = false; // if this doc was the result of a population
28 this.scope = undefined;
29 this.activePaths = new ActiveRoster;
30 this.pathsToScopes = {};
31 this.cachedRequired = {};
32 this.session = null;
33 this.$setCalled = new Set();
34
35 // embedded docs
36 this.ownerDocument = undefined;
37 this.fullPath = undefined;
38}