@lossless.org/client 1.18.1 → 1.18.3
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/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/nosqldb/classes.bsonassertion.d.ts +6 -2
- package/dist_ts/nosqldb/classes.bsonassertion.js +9 -7
- package/dist_ts/nosqldb/classes.collection.js +25 -6
- package/dist_ts/nosqldb/classes.exactpersistence.d.ts +41 -5
- package/dist_ts/nosqldb/classes.exactpersistence.js +133 -90
- package/dist_ts/nosqldb/classes.ordinarypersistence.js +2 -2
- package/package.json +4 -4
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/nosqldb/classes.bsonassertion.ts +9 -6
- package/ts/nosqldb/classes.collection.ts +48 -15
- package/ts/nosqldb/classes.exactpersistence.ts +183 -144
- package/ts/nosqldb/classes.ordinarypersistence.ts +2 -1
|
@@ -132,16 +132,52 @@ export declare class SmartdataExactCollection<TModel extends SmartDataDbDoc<any,
|
|
|
132
132
|
* reconciliation read runs on the interrupted call's budget.
|
|
133
133
|
*/
|
|
134
134
|
private interruptedWriteError;
|
|
135
|
+
/** The collection's one BSON encoder: every encoding of a row passes here. */
|
|
136
|
+
private encodeBson;
|
|
137
|
+
/** The collection's one BSON decoder: every decoding of a row passes here. */
|
|
138
|
+
private decodeBson;
|
|
139
|
+
/** Decodes proven canonical bytes into a fresh canonical document. */
|
|
140
|
+
private decodeCanonical;
|
|
141
|
+
/**
|
|
142
|
+
* The exactness proof: the document's sorted encoding must decode and
|
|
143
|
+
* encode again to the same bytes. Returns those canonical bytes and the
|
|
144
|
+
* decoding the proof produced, which no caller has seen yet.
|
|
145
|
+
*/
|
|
135
146
|
private canonicalizeDocument;
|
|
147
|
+
/**
|
|
148
|
+
* Whether a document encodes canonically to bytes an earlier proof
|
|
149
|
+
* produced. Equal bytes carry that proof and its assertion over, so the
|
|
150
|
+
* caller needs neither again; on a mismatch the caller runs the full proof
|
|
151
|
+
* to report what is wrong.
|
|
152
|
+
*/
|
|
153
|
+
private encodesAs;
|
|
136
154
|
private assertAllowedTopLevelKeys;
|
|
137
|
-
|
|
138
|
-
|
|
155
|
+
/**
|
|
156
|
+
* Proves an application body canonical and runs the assertion once, on the
|
|
157
|
+
* proof's own decoding, which is never handed out. Returns the canonical
|
|
158
|
+
* bytes of the body.
|
|
159
|
+
*/
|
|
160
|
+
private provePersistedDocument;
|
|
161
|
+
/**
|
|
162
|
+
* Proves a stored envelope canonical, checks its storage metadata and runs
|
|
163
|
+
* the assertion once on its body. The body is the proof's own decoding with
|
|
164
|
+
* the metadata removed, so the assertion never sees a document a caller
|
|
165
|
+
* receives. Returns the canonical bytes of the envelope and of its body.
|
|
166
|
+
*/
|
|
167
|
+
private proveStoredDocument;
|
|
168
|
+
/** Proves a stored envelope and returns a fresh canonical decoding of it. */
|
|
169
|
+
private readStoredDocument;
|
|
170
|
+
/**
|
|
171
|
+
* The canonical envelope of a proven body. BSON encodes every element on
|
|
172
|
+
* its own, so a proven body with inert metadata is canonical as a whole;
|
|
173
|
+
* only the canonical key order has to be restored.
|
|
174
|
+
*/
|
|
175
|
+
private composeStoredDocument;
|
|
139
176
|
private assertWithoutMutation;
|
|
140
|
-
private getPersistedBody;
|
|
141
|
-
private persistedDocumentsEqual;
|
|
142
|
-
private storedDocumentsEqual;
|
|
143
177
|
private validateReconcileIdentity;
|
|
178
|
+
/** The persisted body a model serializes to, before any proof. */
|
|
144
179
|
private serializeModel;
|
|
180
|
+
/** Proves an insert input and returns the canonical bytes of its body. */
|
|
145
181
|
private createPersistedDocument;
|
|
146
182
|
private hydrateStoredDocument;
|
|
147
183
|
private findByReconcileIdentity;
|