w-serv-orm 1.0.0

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.
Files changed (56) hide show
  1. package/.editorconfig +9 -0
  2. package/.eslintignore +3 -0
  3. package/.eslintrc.js +54 -0
  4. package/.jsdoc +25 -0
  5. package/LICENSE +21 -0
  6. package/README.md +74 -0
  7. package/SECURITY.md +5 -0
  8. package/babel.config.js +14 -0
  9. package/dist/w-serv-orm.umd.js +7 -0
  10. package/dist/w-serv-orm.umd.js.map +1 -0
  11. package/docs/WServOrm.html +582 -0
  12. package/docs/WServOrm.mjs.html +171 -0
  13. package/docs/fonts/Montserrat/Montserrat-Bold.eot +0 -0
  14. package/docs/fonts/Montserrat/Montserrat-Bold.ttf +0 -0
  15. package/docs/fonts/Montserrat/Montserrat-Bold.woff +0 -0
  16. package/docs/fonts/Montserrat/Montserrat-Bold.woff2 +0 -0
  17. package/docs/fonts/Montserrat/Montserrat-Regular.eot +0 -0
  18. package/docs/fonts/Montserrat/Montserrat-Regular.ttf +0 -0
  19. package/docs/fonts/Montserrat/Montserrat-Regular.woff +0 -0
  20. package/docs/fonts/Montserrat/Montserrat-Regular.woff2 +0 -0
  21. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  22. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.svg +978 -0
  23. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  24. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  25. package/docs/fonts/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  26. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  27. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +1049 -0
  28. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  29. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  30. package/docs/fonts/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  31. package/docs/index.html +81 -0
  32. package/docs/scripts/collapse.js +20 -0
  33. package/docs/scripts/linenumber.js +25 -0
  34. package/docs/scripts/nav.js +12 -0
  35. package/docs/scripts/polyfill.js +4 -0
  36. package/docs/scripts/prettify/Apache-License-2.0.txt +202 -0
  37. package/docs/scripts/prettify/lang-css.js +2 -0
  38. package/docs/scripts/prettify/prettify.js +28 -0
  39. package/docs/scripts/search.js +83 -0
  40. package/docs/styles/jsdoc.css +765 -0
  41. package/docs/styles/prettify.css +79 -0
  42. package/g.mOrm.mjs +54 -0
  43. package/package.json +37 -0
  44. package/schema/gi.mjs +8 -0
  45. package/schema/index.mjs +16 -0
  46. package/schema/tables/tests.mjs +78 -0
  47. package/src/WServOrm.mjs +102 -0
  48. package/src/getDbBackupAndRecover.mjs +90 -0
  49. package/src/getMapOrm.mjs +298 -0
  50. package/src/getProc.mjs +176 -0
  51. package/src/getWoItems.mjs +69 -0
  52. package/test/all.test.mjs +10 -0
  53. package/toolg/addVersion.mjs +4 -0
  54. package/toolg/cleanFolder.mjs +4 -0
  55. package/toolg/gDistRollup.mjs +21 -0
  56. package/toolg/modifyReadme.mjs +4 -0
@@ -0,0 +1,582 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>WServOrm - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
+ </head>
19
+ <body>
20
+
21
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
+ <label for="nav-trigger" class="navicon-button x">
23
+ <div class="navicon"></div>
24
+ </label>
25
+
26
+ <label for="nav-trigger" class="overlay"></label>
27
+
28
+ <nav >
29
+
30
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WServOrm.html">WServOrm</a></li></ul>
31
+ </nav>
32
+
33
+ <div id="main">
34
+
35
+ <h1 class="page-title">WServOrm</h1>
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ <section>
44
+
45
+ <header>
46
+
47
+ <h2>
48
+ WServOrm
49
+ </h2>
50
+
51
+
52
+ </header>
53
+
54
+ <article>
55
+
56
+ <div class="container-overview">
57
+
58
+
59
+
60
+
61
+
62
+ <h4 class="name" id="WServOrm"><span class="type-signature"></span>new WServOrm<span class="signature">(ds, WOrm, opt<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {Object}</span></h4>
63
+
64
+
65
+
66
+
67
+
68
+
69
+ <dl class="details">
70
+
71
+
72
+ <dt class="tag-source">Source:</dt>
73
+ <dd class="tag-source"><ul class="dummy"><li>
74
+ <a href="WServOrm.mjs.html">WServOrm.mjs</a>, <a href="WServOrm.mjs.html#line74">line 74</a>
75
+ </li></ul></dd>
76
+
77
+
78
+
79
+
80
+
81
+
82
+
83
+
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+ </dl>
108
+
109
+
110
+
111
+
112
+
113
+ <div class="description usertext">
114
+ <p>產生伺服器ORM的支援物件</p>
115
+ </div>
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h5>Example</h5>
126
+
127
+ <pre class="prettyprint"><code>import WOrm from 'w-orm-mongodb/src/WOrmMongodb.mjs' //自行選擇引用ORM
128
  dbUsername: 'username',
1
129
  dbPassword: 'password',
2
130
  dbName: 'wservorm',
3
131
  dbIP: 'localhost',
4
132
  dbPort: 27017,
5
133
  url: `mongodb://${st.dbUsername}:${st.dbPassword}@${st.dbIP}:${st.dbPort}`,
6
134
  db: st.dbName,
7
135
  getUserById: null,
8
136
  bCheckUser: false,
9
137
  bExcludeWhenNotAdmin: false,
138
+
139
+
140
+
141
+
142
+ <h5>Parameters:</h5>
143
+
144
+
145
+ <table class="params">
146
+ <thead>
147
+ <tr>
148
+
149
+ <th>Name</th>
150
+
151
+
152
+ <th>Type</th>
153
+
154
+
155
+ <th>Attributes</th>
156
+
157
+
158
+
159
+ <th>Default</th>
160
+
161
+
162
+ <th class="last">Description</th>
163
+ </tr>
164
+ </thead>
165
+
166
+ <tbody>
167
+
168
+
169
+ <tr>
170
+
171
+ <td class="name"><code>ds</code></td>
172
+
173
+
174
+ <td class="type">
175
+
176
+
177
+ <span class="param-type">Object</span>
178
+
179
+
180
+
181
+ </td>
182
+
183
+
184
+ <td class="attributes">
185
+
186
+
187
+
188
+
189
+
190
+ </td>
191
+
192
+
193
+
194
+ <td class="default">
195
+
196
+ </td>
197
+
198
+
199
+ <td class="description last"><p>輸入資料表設定物件</p></td>
200
+ </tr>
201
+
202
+
203
+
204
+ <tr>
205
+
206
+ <td class="name"><code>WOrm</code></td>
207
+
208
+
209
+ <td class="type">
210
+
211
+
212
+ <span class="param-type">Object</span>
213
+
214
+
215
+
216
+ </td>
217
+
218
+
219
+ <td class="attributes">
220
+
221
+
222
+
223
+
224
+
225
+ </td>
226
+
227
+
228
+
229
+ <td class="default">
230
+
231
+ </td>
232
+
233
+
234
+ <td class="description last"><p>輸入資料庫ORM物件</p></td>
235
+ </tr>
236
+
237
+
238
+
239
+ <tr>
240
+
241
+ <td class="name"><code>opt</code></td>
242
+
243
+
244
+ <td class="type">
245
+
246
+
247
+ <span class="param-type">Object</span>
248
+
249
+
250
+
251
+ </td>
252
+
253
+
254
+ <td class="attributes">
255
+
256
+ &lt;optional><br>
257
+
258
+
259
+
260
+
261
+
262
+ </td>
263
+
264
+
265
+
266
+ <td class="default">
267
+
268
+ <code>{}</code>
269
+
270
+ </td>
271
+
272
+
273
+ <td class="description last"><p>輸入設定物件,預設{}</p>
274
+ <h6>Properties</h6>
275
+
276
+
277
+ <table class="params">
278
+ <thead>
279
+ <tr>
280
+
281
+ <th>Name</th>
282
+
283
+
284
+ <th>Type</th>
285
+
286
+
287
+ <th>Attributes</th>
288
+
289
+
290
+
291
+ <th>Default</th>
292
+
293
+
294
+ <th class="last">Description</th>
295
+ </tr>
296
+ </thead>
297
+
298
+ <tbody>
299
+
300
+
301
+ <tr>
302
+
303
+ <td class="name"><code>url</code></td>
304
+
305
+
306
+ <td class="type">
307
+
308
+
309
+ <span class="param-type">String</span>
310
+
311
+
312
+
313
+ </td>
314
+
315
+
316
+ <td class="attributes">
317
+
318
+ &lt;optional><br>
319
+
320
+
321
+
322
+
323
+
324
+ </td>
325
+
326
+
327
+
328
+ <td class="default">
329
+
330
+ <code>''</code>
331
+
332
+ </td>
333
+
334
+
335
+ <td class="description last"><p>輸入資料庫連線位址字串,預設''</p></td>
336
+ </tr>
337
+
338
+
339
+
340
+ <tr>
341
+
342
+ <td class="name"><code>db</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
+ <td class="attributes">
356
+
357
+ &lt;optional><br>
358
+
359
+
360
+
361
+
362
+
363
+ </td>
364
+
365
+
366
+
367
+ <td class="default">
368
+
369
+ <code>''</code>
370
+
371
+ </td>
372
+
373
+
374
+ <td class="description last"><p>輸入資料庫名稱字串,預設''</p></td>
375
+ </tr>
376
+
377
+
378
+
379
+ <tr>
380
+
381
+ <td class="name"><code>bCheckUser</code></td>
382
+
383
+
384
+ <td class="type">
385
+
386
+
387
+ <span class="param-type">Boolean</span>
388
+
389
+
390
+
391
+ </td>
392
+
393
+
394
+ <td class="attributes">
395
+
396
+ &lt;optional><br>
397
+
398
+
399
+
400
+
401
+
402
+ </td>
403
+
404
+
405
+
406
+ <td class="default">
407
+
408
+ <code>true</code>
409
+
410
+ </td>
411
+
412
+
413
+ <td class="description last"><p>輸入是否檢查使用者資訊布林值,預設true</p></td>
414
+ </tr>
415
+
416
+
417
+
418
+ <tr>
419
+
420
+ <td class="name"><code>getUserById</code></td>
421
+
422
+
423
+ <td class="type">
424
+
425
+
426
+ <span class="param-type">function</span>
427
+
428
+
429
+
430
+ </td>
431
+
432
+
433
+ <td class="attributes">
434
+
435
+ &lt;optional><br>
436
+
437
+
438
+
439
+
440
+
441
+ </td>
442
+
443
+
444
+
445
+ <td class="default">
446
+
447
+ <code>null</code>
448
+
449
+ </td>
450
+
451
+
452
+ <td class="description last"><p>輸入當bCheckUser=true時依照使用者ID取得使用者資訊物件函數,預設null</p></td>
453
+ </tr>
454
+
455
+
456
+
457
+ <tr>
458
+
459
+ <td class="name"><code>bExcludeWhenNotAdmin</code></td>
460
+
461
+
462
+ <td class="type">
463
+
464
+
465
+ <span class="param-type">Boolean</span>
466
+
467
+
468
+
469
+ </td>
470
+
471
+
472
+ <td class="attributes">
473
+
474
+ &lt;optional><br>
475
+
476
+
477
+
478
+
479
+
480
+ </td>
481
+
482
+
483
+
484
+ <td class="default">
485
+
486
+ <code>true</code>
487
+
488
+ </td>
489
+
490
+
491
+ <td class="description last"><p>輸入使用ORM的select方法時是否自動刪除數據內isActive欄位之布林值,預設true</p></td>
492
+ </tr>
493
+
494
+
495
+ </tbody>
496
+ </table>
497
+
498
+ </td>
499
+ </tr>
500
+
501
+
502
+ </tbody>
503
+ </table>
504
+
505
+
506
+
507
+
508
+
509
+
510
+
511
+
512
+
513
+
514
+
515
+
516
+
517
+
518
+
519
+
520
+ <h5>Returns:</h5>
521
+
522
+
523
+ <div class="param-desc">
524
+ <p>回傳通訊物件,可監聽事件open、error、clientChange、execute、broadcast、deliver,可使用函數broadcast</p>
525
+ </div>
526
+
527
+
528
+
529
+ <dl class="param-type">
530
+ <dt>
531
+ Type
532
+ </dt>
533
+ <dd>
534
+
535
+ <span class="param-type">Object</span>
536
+
537
+
538
+ </dd>
539
+ </dl>
540
+
541
+
542
+
543
+
544
+
545
+
546
+ </div>
547
+
548
+
549
+
550
+
551
+
552
+
553
+
554
+
555
+
556
+
557
+
558
+
559
+
560
+
561
+
562
+
563
+
564
+
565
+
566
+
567
+
568
+ </article>
569
+
570
+ </section>
571
+
572
+
573
+
574
+
575
+
576
+
577
+ </div>
578
+
579
+ <br class="clear">
580
+
581
+ <footer>
582
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.10</a> on Tue Apr 12 2022 16:54:25 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
583
+ </footer>
584
+
585
+ <script>prettyPrint();</script>
586
+ <script src="scripts/polyfill.js"></script>
587
+ <script src="scripts/linenumber.js"></script>
588
+
589
+
590
+
591
+ </body>
592
+ </html>