1 | <!DOCTYPE html>
|
2 | <html lang="en">
|
3 | <head>
|
4 | <meta charset="utf-8">
|
5 | <title>JSDoc: Class: LokiMemoryAdapter</title>
|
6 |
|
7 | <script src="scripts/prettify/prettify.js"> </script>
|
8 | <script src="scripts/prettify/lang-css.js"> </script>
|
9 | |
10 |
|
11 |
|
12 | <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
|
13 | <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
|
14 | </head>
|
15 |
|
16 | <body>
|
17 |
|
18 | <div id="main">
|
19 |
|
20 | <h1 class="page-title">Class: LokiMemoryAdapter</h1>
|
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 |
|
27 | <section>
|
28 |
|
29 | <header>
|
30 |
|
31 | <h2>LokiMemoryAdapter</h2>
|
32 |
|
33 |
|
34 | </header>
|
35 |
|
36 | <article>
|
37 | <div class="container-overview">
|
38 |
|
39 |
|
40 |
|
41 |
|
42 |
|
43 | <h4 class="name" id="LokiMemoryAdapter"><span class="type-signature"></span>new LokiMemoryAdapter<span class="signature">()</span><span class="type-signature"></span></h4>
|
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 | <div class="description">
|
50 | <p>In in-memory persistence adapter for an in-memory database.<br>This simple 'key/value' adapter is intended for unit testing and diagnostics.</p>
|
51 | </div>
|
52 |
|
53 |
|
54 |
|
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 | <dl class="details">
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 |
|
85 |
|
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 | <dt class="tag-source">Source:</dt>
|
93 | <dd class="tag-source"><ul class="dummy"><li>
|
94 | <a href="lokijs.js.html">lokijs.js</a>, <a href="lokijs.js.html#line1598">line 1598</a>
|
95 | </li></ul></dd>
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 | </dl>
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 |
|
110 |
|
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 | </div>
|
122 |
|
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 | <h3 class="subsection-title">Methods</h3>
|
137 |
|
138 |
|
139 |
|
140 |
|
141 |
|
142 |
|
143 | <h4 class="name" id="loadDatabase"><span class="type-signature"></span>loadDatabase<span class="signature">(dbname, callback)</span><span class="type-signature"></span></h4>
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 | <div class="description">
|
150 | <p>Loads a serialized database from its in-memory store.
|
151 | (Loki persistence adapter interface function)</p>
|
152 | </div>
|
153 |
|
154 |
|
155 |
|
156 |
|
157 |
|
158 |
|
159 |
|
160 |
|
161 |
|
162 | <h5>Parameters:</h5>
|
163 |
|
164 |
|
165 | <table class="params">
|
166 | <thead>
|
167 | <tr>
|
168 |
|
169 | <th>Name</th>
|
170 |
|
171 |
|
172 | <th>Type</th>
|
173 |
|
174 |
|
175 |
|
176 |
|
177 |
|
178 | <th class="last">Description</th>
|
179 | </tr>
|
180 | </thead>
|
181 |
|
182 | <tbody>
|
183 |
|
184 |
|
185 | <tr>
|
186 |
|
187 | <td class="name"><code>dbname</code></td>
|
188 |
|
189 |
|
190 | <td class="type">
|
191 |
|
192 |
|
193 | <span class="param-type">string</span>
|
194 |
|
195 |
|
196 |
|
197 | </td>
|
198 |
|
199 |
|
200 |
|
201 |
|
202 |
|
203 | <td class="description last"><p>name of the database (filename/keyname)</p></td>
|
204 | </tr>
|
205 |
|
206 |
|
207 |
|
208 | <tr>
|
209 |
|
210 | <td class="name"><code>callback</code></td>
|
211 |
|
212 |
|
213 | <td class="type">
|
214 |
|
215 |
|
216 | <span class="param-type">function</span>
|
217 |
|
218 |
|
219 |
|
220 | </td>
|
221 |
|
222 |
|
223 |
|
224 |
|
225 |
|
226 | <td class="description last"><p>adapter callback to return load result to caller</p></td>
|
227 | </tr>
|
228 |
|
229 |
|
230 | </tbody>
|
231 | </table>
|
232 |
|
233 |
|
234 |
|
235 |
|
236 |
|
237 |
|
238 | <dl class="details">
|
239 |
|
240 |
|
241 |
|
242 |
|
243 |
|
244 |
|
245 |
|
246 |
|
247 |
|
248 |
|
249 |
|
250 |
|
251 |
|
252 |
|
253 |
|
254 |
|
255 |
|
256 |
|
257 |
|
258 |
|
259 |
|
260 |
|
261 |
|
262 |
|
263 |
|
264 |
|
265 | <dt class="tag-source">Source:</dt>
|
266 | <dd class="tag-source"><ul class="dummy"><li>
|
267 | <a href="lokijs.js.html">lokijs.js</a>, <a href="lokijs.js.html#line1616">line 1616</a>
|
268 | </li></ul></dd>
|
269 |
|
270 |
|
271 |
|
272 |
|
273 |
|
274 |
|
275 |
|
276 | </dl>
|
277 |
|
278 |
|
279 |
|
280 |
|
281 |
|
282 |
|
283 |
|
284 |
|
285 |
|
286 |
|
287 |
|
288 |
|
289 |
|
290 |
|
291 |
|
292 |
|
293 |
|
294 |
|
295 |
|
296 |
|
297 |
|
298 | <h4 class="name" id="saveDatabase"><span class="type-signature"></span>saveDatabase<span class="signature">(dbname, callback)</span><span class="type-signature"></span></h4>
|
299 |
|
300 |
|
301 |
|
302 |
|
303 |
|
304 | <div class="description">
|
305 | <p>Saves a serialized database to its in-memory store.
|
306 | (Loki persistence adapter interface function)</p>
|
307 | </div>
|
308 |
|
309 |
|
310 |
|
311 |
|
312 |
|
313 |
|
314 |
|
315 |
|
316 |
|
317 | <h5>Parameters:</h5>
|
318 |
|
319 |
|
320 | <table class="params">
|
321 | <thead>
|
322 | <tr>
|
323 |
|
324 | <th>Name</th>
|
325 |
|
326 |
|
327 | <th>Type</th>
|
328 |
|
329 |
|
330 |
|
331 |
|
332 |
|
333 | <th class="last">Description</th>
|
334 | </tr>
|
335 | </thead>
|
336 |
|
337 | <tbody>
|
338 |
|
339 |
|
340 | <tr>
|
341 |
|
342 | <td class="name"><code>dbname</code></td>
|
343 |
|
344 |
|
345 | <td class="type">
|
346 |
|
347 |
|
348 | <span class="param-type">string</span>
|
349 |
|
350 |
|
351 |
|
352 | </td>
|
353 |
|
354 |
|
355 |
|
356 |
|
357 |
|
358 | <td class="description last"><p>name of the database (filename/keyname)</p></td>
|
359 | </tr>
|
360 |
|
361 |
|
362 |
|
363 | <tr>
|
364 |
|
365 | <td class="name"><code>callback</code></td>
|
366 |
|
367 |
|
368 | <td class="type">
|
369 |
|
370 |
|
371 | <span class="param-type">function</span>
|
372 |
|
373 |
|
374 |
|
375 | </td>
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 | <td class="description last"><p>adapter callback to return load result to caller</p></td>
|
382 | </tr>
|
383 |
|
384 |
|
385 | </tbody>
|
386 | </table>
|
387 |
|
388 |
|
389 |
|
390 |
|
391 |
|
392 |
|
393 | <dl class="details">
|
394 |
|
395 |
|
396 |
|
397 |
|
398 |
|
399 |
|
400 |
|
401 |
|
402 |
|
403 |
|
404 |
|
405 |
|
406 |
|
407 |
|
408 |
|
409 |
|
410 |
|
411 |
|
412 |
|
413 |
|
414 |
|
415 |
|
416 |
|
417 |
|
418 |
|
419 |
|
420 | <dt class="tag-source">Source:</dt>
|
421 | <dd class="tag-source"><ul class="dummy"><li>
|
422 | <a href="lokijs.js.html">lokijs.js</a>, <a href="lokijs.js.html#line1633">line 1633</a>
|
423 | </li></ul></dd>
|
424 |
|
425 |
|
426 |
|
427 |
|
428 |
|
429 |
|
430 |
|
431 | </dl>
|
432 |
|
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 | </article>
|
455 |
|
456 | </section>
|
457 |
|
458 |
|
459 |
|
460 |
|
461 | </div>
|
462 |
|
463 | <nav>
|
464 | <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Collection.html">Collection</a></li><li><a href="DynamicView.html">DynamicView</a></li><li><a href="Loki.html">Loki</a></li><li><a href="LokiEventEmitter.html">LokiEventEmitter</a></li><li><a href="LokiFsAdapter.html">LokiFsAdapter</a></li><li><a href="LokiFsStructuredAdapter.html">LokiFsStructuredAdapter</a></li><li><a href="LokiIndexedAdapter.html">LokiIndexedAdapter</a></li><li><a href="LokiLocalStorageAdapter.html">LokiLocalStorageAdapter</a></li><li><a href="LokiMemoryAdapter.html">LokiMemoryAdapter</a></li><li><a href="LokiPartitioningAdapter.html">LokiPartitioningAdapter</a></li><li><a href="Resultset.html">Resultset</a></li></ul><h3>Tutorials</h3><ul><li><a href="tutorial-Autoupdating Collections.html">Autoupdating Collections</a></li><li><a href="tutorial-Changes API.html">Changes API</a></li><li><a href="tutorial-Collection Transforms.html">Collection Transforms</a></li><li><a href="tutorial-Indexing and Query performance.html">Indexing and Query performance</a></li><li><a href="tutorial-Loki Angular.html">Loki Angular</a></li><li><a href="tutorial-Persistence Adapters.html">Persistence Adapters</a></li><li><a href="tutorial-Query Examples.html">Query Examples</a></li></ul>
|
465 | </nav>
|
466 |
|
467 | <br class="clear">
|
468 |
|
469 | <footer>
|
470 | Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.4.0</a> on Sun Dec 18 2016 19:39:52 GMT-0500 (Eastern Standard Time)
|
471 | </footer>
|
472 |
|
473 | <script> prettyPrint(); </script>
|
474 | <script src="scripts/linenumber.js"> </script>
|
475 | </body>
|
476 | </html> |
\ | No newline at end of file |