w-orm-reladb 1.0.47 → 1.0.49
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/README.md +106 -50
- package/dist/w-orm-reladb.umd.js +2 -2
- package/dist/w-orm-reladb.umd.js.map +1 -1
- package/docs/WOrmReladb.html +802 -73
- package/docs/WOrmReladb.mjs.html +988 -298
- package/docs/index.html +2 -2
- package/g-genModelsByTabs.mjs +1 -1
- package/g-mssql-concurrency.mjs +1 -1
- package/g-mssql-timerQuery.mjs +3 -3
- package/g-mssql-transaction-commit.mjs +7 -7
- package/g-mssql-transaction-rollback.mjs +7 -7
- package/g-mssql.mjs +7 -7
- package/g-sqlite-concurrency.mjs +1 -1
- package/g-sqlite-encryption-transaction-commit.mjs +3 -3
- package/g-sqlite-encryption.mjs +7 -7
- package/g-sqlite-transaction-commit.mjs +7 -7
- package/g-sqlite-transaction-rollback.mjs +7 -7
- package/g-sqlite.mjs +7 -7
- package/package.json +1 -1
- package/script.txt +0 -1
- package/src/WOrmReladb.mjs +986 -296
- package/test/api-mssql.test.mjs +4 -201
- package/test/api-sqlite.test.mjs +12 -206
- package/test/api-suite.mjs +874 -0
- package/toolg/gDistRollup.mjs +1 -0
- package/worm.sqlite +0 -0
- package/test/api-fixtures.mjs +0 -48
package/docs/WOrmReladb.html
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<nav >
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WOrmReladb.html">WOrmReladb</a><ul class='methods'><li data-type='method'><a href="WOrmReladb.html#.closeSequelize">closeSequelize</a></li><li data-type='method'><a href="WOrmReladb.html#.createStorage">createStorage</a></li><li data-type='method'><a href="WOrmReladb.html#.del">del</a></li><li data-type='method'><a href="WOrmReladb.html#.delAll">delAll</a></li><li data-type='method'><a href="WOrmReladb.html#.genModelsByDB">genModelsByDB</a></li><li data-type='method'><a href="WOrmReladb.html#.genModelsByTabs">genModelsByTabs</a></li><li data-type='method'><a href="WOrmReladb.html#.genTransaction">genTransaction</a></li><li data-type='method'><a href="WOrmReladb.html#.initSequelize">initSequelize</a></li><li data-type='method'><a href="WOrmReladb.html#.insert">insert</a></li><li data-type='method'><a href="WOrmReladb.html#.save">save</a></li><li data-type='method'><a href="WOrmReladb.html#.select">select</a></li></ul></li></ul>
|
|
32
|
+
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="WOrmReladb.html">WOrmReladb</a><ul class='methods'><li data-type='method'><a href="WOrmReladb.html#.closeSequelize">closeSequelize</a></li><li data-type='method'><a href="WOrmReladb.html#.createStorage">createStorage</a></li><li data-type='method'><a href="WOrmReladb.html#.del">del</a></li><li data-type='method'><a href="WOrmReladb.html#.delAll">delAll</a></li><li data-type='method'><a href="WOrmReladb.html#.genModelsByDB">genModelsByDB</a></li><li data-type='method'><a href="WOrmReladb.html#.genModelsByTabs">genModelsByTabs</a></li><li data-type='method'><a href="WOrmReladb.html#.genTransaction">genTransaction</a></li><li data-type='method'><a href="WOrmReladb.html#.initSequelize">initSequelize</a></li><li data-type='method'><a href="WOrmReladb.html#.insert">insert</a></li><li data-type='method'><a href="WOrmReladb.html#.insertBulk">insertBulk</a></li><li data-type='method'><a href="WOrmReladb.html#.save">save</a></li><li data-type='method'><a href="WOrmReladb.html#.select">select</a></li><li data-type='method'><a href="WOrmReladb.html#.selectByPk">selectByPk</a></li></ul></li></ul>
|
|
33
33
|
|
|
34
34
|
</nav>
|
|
35
35
|
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
|
|
82
82
|
<dt class="tag-source">Source:</dt>
|
|
83
83
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
84
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
84
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line56">line 56</a>
|
|
85
85
|
</li></ul></dd>
|
|
86
86
|
|
|
87
87
|
|
|
@@ -580,7 +580,7 @@
|
|
|
580
580
|
|
|
581
581
|
<tr>
|
|
582
582
|
|
|
583
|
-
<td class="name"><code>
|
|
583
|
+
<td class="name"><code>autoGenPk</code></td>
|
|
584
584
|
|
|
585
585
|
|
|
586
586
|
<td class="type">
|
|
@@ -750,7 +750,7 @@
|
|
|
750
750
|
|
|
751
751
|
<dt class="tag-source">Source:</dt>
|
|
752
752
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
753
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
753
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line443">line 443</a>
|
|
754
754
|
</li></ul></dd>
|
|
755
755
|
|
|
756
756
|
|
|
@@ -858,7 +858,7 @@
|
|
|
858
858
|
|
|
859
859
|
<dt class="tag-source">Source:</dt>
|
|
860
860
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
861
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
861
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line1618">line 1618</a>
|
|
862
862
|
</li></ul></dd>
|
|
863
863
|
|
|
864
864
|
|
|
@@ -960,13 +960,18 @@
|
|
|
960
960
|
<dl class="details">
|
|
961
961
|
|
|
962
962
|
<dt class="tag-description">Description:</dt>
|
|
963
|
-
<dd class="tag-description"><ul class="dummy"><li><p>刪除數據</p
|
|
963
|
+
<dd class="tag-description"><ul class="dummy"><li><p>刪除數據</p>
|
|
964
|
+
<p>註: 回傳陣列恆與輸入等長,各筆之n與nDeleted皆為主鍵命中筆數,值為0或1,未命中為0且屬正常結果
|
|
965
|
+
註: 判斷某筆是否真的被刪除一律以nDeleted為準
|
|
966
|
+
註: 未帶有效主鍵者為該筆之輸入問題,回ok為0與err且不送查詢條件(以免無效值被轉為null而誤中其他數據),
|
|
967
|
+
不中斷其餘筆數,以此與[主鍵未命中]之ok為1區辨
|
|
968
|
+
註: 本函數不受opt.autoGenPk影響,於任一設定下皆不補值</p></li></ul></dd>
|
|
964
969
|
|
|
965
970
|
|
|
966
971
|
|
|
967
972
|
<dt class="tag-source">Source:</dt>
|
|
968
973
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
969
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
974
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line1359">line 1359</a>
|
|
970
975
|
</li></ul></dd>
|
|
971
976
|
|
|
972
977
|
|
|
@@ -1250,7 +1255,7 @@
|
|
|
1250
1255
|
|
|
1251
1256
|
|
|
1252
1257
|
<div class="param-desc">
|
|
1253
|
-
<p>回傳Promise,resolve
|
|
1258
|
+
<p>回傳Promise,resolve回傳與輸入等長之刪除結果陣列[{n,nDeleted,ok}],reject回傳錯誤訊息</p>
|
|
1254
1259
|
</div>
|
|
1255
1260
|
|
|
1256
1261
|
|
|
@@ -1287,13 +1292,15 @@
|
|
|
1287
1292
|
<dl class="details">
|
|
1288
1293
|
|
|
1289
1294
|
<dt class="tag-description">Description:</dt>
|
|
1290
|
-
<dd class="tag-description"><ul class="dummy"><li><p
|
|
1295
|
+
<dd class="tag-description"><ul class="dummy"><li><p>依條件刪除多筆數據,需與del分開,避免未傳數據導致直接刪除全表</p>
|
|
1296
|
+
<p>註: n與nDeleted皆為實際刪除筆數,兩者恆相等,n不得取全表筆數
|
|
1297
|
+
註: find未給或為空物件時刪除全部數據;條件無命中時回{n:0,nDeleted:0,ok:1},不視為錯誤</p></li></ul></dd>
|
|
1291
1298
|
|
|
1292
1299
|
|
|
1293
1300
|
|
|
1294
1301
|
<dt class="tag-source">Source:</dt>
|
|
1295
1302
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1296
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
1303
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line1522">line 1522</a>
|
|
1297
1304
|
</li></ul></dd>
|
|
1298
1305
|
|
|
1299
1306
|
|
|
@@ -1578,7 +1585,7 @@
|
|
|
1578
1585
|
|
|
1579
1586
|
|
|
1580
1587
|
<div class="param-desc">
|
|
1581
|
-
<p>回傳Promise,resolve
|
|
1588
|
+
<p>回傳Promise,resolve回傳刪除結果{n,nDeleted,ok},reject回傳錯誤訊息</p>
|
|
1582
1589
|
</div>
|
|
1583
1590
|
|
|
1584
1591
|
|
|
@@ -1623,7 +1630,7 @@
|
|
|
1623
1630
|
|
|
1624
1631
|
<dt class="tag-source">Source:</dt>
|
|
1625
1632
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
1626
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
1633
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line1660">line 1660</a>
|
|
1627
1634
|
</li></ul></dd>
|
|
1628
1635
|
|
|
1629
1636
|
|
|
@@ -2151,7 +2158,7 @@
|
|
|
2151
2158
|
|
|
2152
2159
|
<dt class="tag-source">Source:</dt>
|
|
2153
2160
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2154
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
2161
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line1708">line 1708</a>
|
|
2155
2162
|
</li></ul></dd>
|
|
2156
2163
|
|
|
2157
2164
|
|
|
@@ -2456,7 +2463,7 @@
|
|
|
2456
2463
|
|
|
2457
2464
|
<dt class="tag-source">Source:</dt>
|
|
2458
2465
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2459
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
2466
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line459">line 459</a>
|
|
2460
2467
|
</li></ul></dd>
|
|
2461
2468
|
|
|
2462
2469
|
|
|
@@ -2564,7 +2571,7 @@
|
|
|
2564
2571
|
|
|
2565
2572
|
<dt class="tag-source">Source:</dt>
|
|
2566
2573
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2567
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
2574
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line376">line 376</a>
|
|
2568
2575
|
</li></ul></dd>
|
|
2569
2576
|
|
|
2570
2577
|
|
|
@@ -2736,13 +2743,21 @@
|
|
|
2736
2743
|
<dl class="details">
|
|
2737
2744
|
|
|
2738
2745
|
<dt class="tag-description">Description:</dt>
|
|
2739
|
-
<dd class="tag-description"><ul class="dummy"><li><p
|
|
2746
|
+
<dd class="tag-description"><ul class="dummy"><li><p>插入數據,僅於主鍵不存在時寫入,已存在者跳過且不覆寫</p>
|
|
2747
|
+
<p>由資料庫於主鍵之唯一約束上原子完成[檢查主鍵不存在]與[寫入],併發時同一主鍵僅有一次成功</p>
|
|
2748
|
+
<p>註: n為輸入筆數即本次嘗試插入之基準,nInserted為實際插入筆數,全數已存在而nInserted為0屬正常結果
|
|
2749
|
+
註: 同批含重複主鍵時僅首筆計入nInserted,其餘視為已存在
|
|
2750
|
+
註: opt.autoGenPk為true(預設)時未帶有效主鍵者自動產生,為false時未帶有效主鍵即reject且同批皆不寫入
|
|
2751
|
+
註: option.returnList開啟時改回與輸入等長且保序之逐筆結果陣列[{n,nInserted,ok}],
|
|
2752
|
+
聚合計數只答得出[有幾筆是新的]而答不出[是哪幾筆],而後者正是去重之產出物;
|
|
2753
|
+
逐筆元素之n與ok恆為1,資訊由nInserted承載,不變式為
|
|
2754
|
+
陣列長度等於輸入筆數且filter(v => v.nInserted === 1).length等於聚合模式之nInserted</p></li></ul></dd>
|
|
2740
2755
|
|
|
2741
2756
|
|
|
2742
2757
|
|
|
2743
2758
|
<dt class="tag-source">Source:</dt>
|
|
2744
2759
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
2745
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
2760
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line752">line 752</a>
|
|
2746
2761
|
</li></ul></dd>
|
|
2747
2762
|
|
|
2748
2763
|
|
|
@@ -2997,6 +3012,46 @@
|
|
|
2997
3012
|
</tr>
|
|
2998
3013
|
|
|
2999
3014
|
|
|
3015
|
+
|
|
3016
|
+
<tr>
|
|
3017
|
+
|
|
3018
|
+
<td class="name"><code>returnList</code></td>
|
|
3019
|
+
|
|
3020
|
+
|
|
3021
|
+
<td class="type">
|
|
3022
|
+
|
|
3023
|
+
|
|
3024
|
+
<span class="param-type">Boolean</span>
|
|
3025
|
+
|
|
3026
|
+
|
|
3027
|
+
|
|
3028
|
+
|
|
3029
|
+
</td>
|
|
3030
|
+
|
|
3031
|
+
|
|
3032
|
+
<td class="attributes">
|
|
3033
|
+
|
|
3034
|
+
<optional><br>
|
|
3035
|
+
|
|
3036
|
+
|
|
3037
|
+
|
|
3038
|
+
|
|
3039
|
+
|
|
3040
|
+
</td>
|
|
3041
|
+
|
|
3042
|
+
|
|
3043
|
+
|
|
3044
|
+
<td class="default">
|
|
3045
|
+
|
|
3046
|
+
<code>false</code>
|
|
3047
|
+
|
|
3048
|
+
</td>
|
|
3049
|
+
|
|
3050
|
+
|
|
3051
|
+
<td class="description last"><p>輸入是否改回逐筆結果陣列布林值,預設false</p></td>
|
|
3052
|
+
</tr>
|
|
3053
|
+
|
|
3054
|
+
|
|
3000
3055
|
</tbody>
|
|
3001
3056
|
</table>
|
|
3002
3057
|
|
|
@@ -3026,7 +3081,7 @@
|
|
|
3026
3081
|
|
|
3027
3082
|
|
|
3028
3083
|
<div class="param-desc">
|
|
3029
|
-
<p>回傳Promise,resolve
|
|
3084
|
+
<p>回傳Promise,resolve回傳插入結果{n,nInserted,ok},或於returnList開啟時回傳[{n,nInserted,ok}],reject回傳錯誤訊息</p>
|
|
3030
3085
|
</div>
|
|
3031
3086
|
|
|
3032
3087
|
|
|
@@ -3053,7 +3108,7 @@
|
|
|
3053
3108
|
|
|
3054
3109
|
|
|
3055
3110
|
|
|
3056
|
-
<h4 class="name" id=".
|
|
3111
|
+
<h4 class="name" id=".insertBulk"><span class="type-signature type-signature-async, static">(async, static) </span>insertBulk<span class="signature">(data, option<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise}</span></h4>
|
|
3057
3112
|
|
|
3058
3113
|
|
|
3059
3114
|
|
|
@@ -3063,13 +3118,24 @@
|
|
|
3063
3118
|
<dl class="details">
|
|
3064
3119
|
|
|
3065
3120
|
<dt class="tag-description">Description:</dt>
|
|
3066
|
-
<dd class="tag-description"><ul class="dummy"><li><p
|
|
3121
|
+
<dd class="tag-description"><ul class="dummy"><li><p>批次插入數據,全批視為一個單位:全部插入成功,或一筆都不寫入</p>
|
|
3122
|
+
<p>本函數非insert之加速版,兩者衝突政策不同:insert於主鍵已存在時跳過該筆且整批ok為1,
|
|
3123
|
+
本函數則整批reject且不寫入任何一筆,同批含重複主鍵者亦視為衝突。
|
|
3124
|
+
確無衝突時兩者之可觀察結果完全相同,差異僅於有衝突時顯現。</p>
|
|
3125
|
+
<p>註: n為輸入筆數即本次嘗試插入之基準;nInserted於成功時恆等於n,雖無額外資訊仍保留,
|
|
3126
|
+
令呼叫端得與insert共用同一段結果處理程式碼
|
|
3127
|
+
註: 不提供逐筆結果,故不出現ok為0與err;需要逐筆處置者改用insert
|
|
3128
|
+
註: opt.autoGenPk為true(預設)時未帶有效主鍵者自動產生,為false時未帶有效主鍵即reject且同批皆不寫入
|
|
3129
|
+
註: [全有全無]為獨立於T7之額外要求——T7僅保證每筆之[檢查主鍵不存在]與[寫入]為原子,不保證整批。
|
|
3130
|
+
mssql因綁定參數數量上限會由驅動層自動拆為多語句送出,實測1000筆之批次於末筆撞主鍵時已有946筆落盤,
|
|
3131
|
+
故一律以交易包覆並於失敗時回滾;呼叫端已給transaction時改以巢狀交易(SAVEPOINT)包覆,
|
|
3132
|
+
令回滾範圍限於本次呼叫而不影響呼叫端交易內先前之寫入</p></li></ul></dd>
|
|
3067
3133
|
|
|
3068
3134
|
|
|
3069
3135
|
|
|
3070
3136
|
<dt class="tag-source">Source:</dt>
|
|
3071
3137
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3072
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
3138
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line922">line 922</a>
|
|
3073
3139
|
</li></ul></dd>
|
|
3074
3140
|
|
|
3075
3141
|
|
|
@@ -3324,46 +3390,6 @@
|
|
|
3324
3390
|
</tr>
|
|
3325
3391
|
|
|
3326
3392
|
|
|
3327
|
-
|
|
3328
|
-
<tr>
|
|
3329
|
-
|
|
3330
|
-
<td class="name"><code>autoInsert</code></td>
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
<td class="type">
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
<span class="param-type">boolean</span>
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
</td>
|
|
3342
|
-
|
|
3343
|
-
|
|
3344
|
-
<td class="attributes">
|
|
3345
|
-
|
|
3346
|
-
<optional><br>
|
|
3347
|
-
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3352
|
-
</td>
|
|
3353
|
-
|
|
3354
|
-
|
|
3355
|
-
|
|
3356
|
-
<td class="default">
|
|
3357
|
-
|
|
3358
|
-
<code>true</code>
|
|
3359
|
-
|
|
3360
|
-
</td>
|
|
3361
|
-
|
|
3362
|
-
|
|
3363
|
-
<td class="description last"><p>輸入是否於儲存時發現原本無數據,則自動改以插入處理,預設為true</p></td>
|
|
3364
|
-
</tr>
|
|
3365
|
-
|
|
3366
|
-
|
|
3367
3393
|
</tbody>
|
|
3368
3394
|
</table>
|
|
3369
3395
|
|
|
@@ -3393,7 +3419,7 @@
|
|
|
3393
3419
|
|
|
3394
3420
|
|
|
3395
3421
|
<div class="param-desc">
|
|
3396
|
-
<p>回傳Promise,resolve
|
|
3422
|
+
<p>回傳Promise,resolve回傳插入結果{n,nInserted,ok},reject回傳錯誤訊息</p>
|
|
3397
3423
|
</div>
|
|
3398
3424
|
|
|
3399
3425
|
|
|
@@ -3420,7 +3446,7 @@
|
|
|
3420
3446
|
|
|
3421
3447
|
|
|
3422
3448
|
|
|
3423
|
-
<h4 class="name" id=".
|
|
3449
|
+
<h4 class="name" id=".save"><span class="type-signature type-signature-async, static">(async, static) </span>save<span class="signature">(data, option<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise}</span></h4>
|
|
3424
3450
|
|
|
3425
3451
|
|
|
3426
3452
|
|
|
@@ -3430,13 +3456,19 @@
|
|
|
3430
3456
|
<dl class="details">
|
|
3431
3457
|
|
|
3432
3458
|
<dt class="tag-description">Description:</dt>
|
|
3433
|
-
<dd class="tag-description"><ul class="dummy"><li><p
|
|
3459
|
+
<dd class="tag-description"><ul class="dummy"><li><p>儲存數據,以主鍵為準更新既有數據,未給之欄位保留;主鍵不存在且option.autoInsert為true(預設)時改為插入</p>
|
|
3460
|
+
<p>註: 回傳陣列恆與輸入等長,輸入單一物件亦回傳長度1之陣列
|
|
3461
|
+
註: n為主鍵命中筆數,值為0或1,命中(不論內容有無變更)或經插入而產生皆為1;nInserted與nModified恆同時出現
|
|
3462
|
+
註: [內容相同]之判定基準為將待寫入物件合併進現值後與現值相同,非待寫入物件與現值全等,
|
|
3463
|
+
故只給部份欄位且該些欄位值皆與現值相同時,合併結果等於現值,nModified為0
|
|
3464
|
+
註: 本筆失敗不中斷整批,該筆以ok為0並附err回報
|
|
3465
|
+
註: opt.autoGenPk為true(預設)時未帶有效主鍵者自動產生,為false時未帶有效主鍵即reject且同批皆不寫入</p></li></ul></dd>
|
|
3434
3466
|
|
|
3435
3467
|
|
|
3436
3468
|
|
|
3437
3469
|
<dt class="tag-source">Source:</dt>
|
|
3438
3470
|
<dd class="tag-source"><ul class="dummy"><li>
|
|
3439
|
-
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#
|
|
3471
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line1249">line 1249</a>
|
|
3440
3472
|
</li></ul></dd>
|
|
3441
3473
|
|
|
3442
3474
|
|
|
@@ -3512,13 +3544,16 @@
|
|
|
3512
3544
|
|
|
3513
3545
|
<tr>
|
|
3514
3546
|
|
|
3515
|
-
<td class="name"><code>
|
|
3547
|
+
<td class="name"><code>data</code></td>
|
|
3516
3548
|
|
|
3517
3549
|
|
|
3518
3550
|
<td class="type">
|
|
3519
3551
|
|
|
3520
3552
|
|
|
3521
3553
|
<span class="param-type">Object</span>
|
|
3554
|
+
|
|
|
3555
|
+
|
|
3556
|
+
<span class="param-type">Array</span>
|
|
3522
3557
|
|
|
3523
3558
|
|
|
3524
3559
|
|
|
@@ -3528,8 +3563,6 @@
|
|
|
3528
3563
|
|
|
3529
3564
|
<td class="attributes">
|
|
3530
3565
|
|
|
3531
|
-
<optional><br>
|
|
3532
|
-
|
|
3533
3566
|
|
|
3534
3567
|
|
|
3535
3568
|
|
|
@@ -3540,12 +3573,10 @@
|
|
|
3540
3573
|
|
|
3541
3574
|
<td class="default">
|
|
3542
3575
|
|
|
3543
|
-
<code>{}</code>
|
|
3544
|
-
|
|
3545
3576
|
</td>
|
|
3546
3577
|
|
|
3547
3578
|
|
|
3548
|
-
<td class="description last"><p
|
|
3579
|
+
<td class="description last"><p>輸入數據物件或陣列</p></td>
|
|
3549
3580
|
</tr>
|
|
3550
3581
|
|
|
3551
3582
|
|
|
@@ -3692,6 +3723,46 @@
|
|
|
3692
3723
|
</tr>
|
|
3693
3724
|
|
|
3694
3725
|
|
|
3726
|
+
|
|
3727
|
+
<tr>
|
|
3728
|
+
|
|
3729
|
+
<td class="name"><code>autoInsert</code></td>
|
|
3730
|
+
|
|
3731
|
+
|
|
3732
|
+
<td class="type">
|
|
3733
|
+
|
|
3734
|
+
|
|
3735
|
+
<span class="param-type">boolean</span>
|
|
3736
|
+
|
|
3737
|
+
|
|
3738
|
+
|
|
3739
|
+
|
|
3740
|
+
</td>
|
|
3741
|
+
|
|
3742
|
+
|
|
3743
|
+
<td class="attributes">
|
|
3744
|
+
|
|
3745
|
+
<optional><br>
|
|
3746
|
+
|
|
3747
|
+
|
|
3748
|
+
|
|
3749
|
+
|
|
3750
|
+
|
|
3751
|
+
</td>
|
|
3752
|
+
|
|
3753
|
+
|
|
3754
|
+
|
|
3755
|
+
<td class="default">
|
|
3756
|
+
|
|
3757
|
+
<code>true</code>
|
|
3758
|
+
|
|
3759
|
+
</td>
|
|
3760
|
+
|
|
3761
|
+
|
|
3762
|
+
<td class="description last"><p>輸入是否於儲存時發現原本無數據,則自動改以插入處理,預設為true</p></td>
|
|
3763
|
+
</tr>
|
|
3764
|
+
|
|
3765
|
+
|
|
3695
3766
|
</tbody>
|
|
3696
3767
|
</table>
|
|
3697
3768
|
|
|
@@ -3721,7 +3792,665 @@
|
|
|
3721
3792
|
|
|
3722
3793
|
|
|
3723
3794
|
<div class="param-desc">
|
|
3724
|
-
<p>回傳Promise,resolve
|
|
3795
|
+
<p>回傳Promise,resolve回傳與輸入等長之儲存結果陣列[{n,nInserted,nModified,ok}],reject回傳錯誤訊息</p>
|
|
3796
|
+
</div>
|
|
3797
|
+
|
|
3798
|
+
|
|
3799
|
+
|
|
3800
|
+
<dl class="param-type">
|
|
3801
|
+
<dt>
|
|
3802
|
+
Type
|
|
3803
|
+
</dt>
|
|
3804
|
+
<dd>
|
|
3805
|
+
|
|
3806
|
+
<span class="param-type">Promise</span>
|
|
3807
|
+
|
|
3808
|
+
|
|
3809
|
+
|
|
3810
|
+
</dd>
|
|
3811
|
+
</dl>
|
|
3812
|
+
|
|
3813
|
+
|
|
3814
|
+
|
|
3815
|
+
|
|
3816
|
+
|
|
3817
|
+
|
|
3818
|
+
|
|
3819
|
+
|
|
3820
|
+
|
|
3821
|
+
|
|
3822
|
+
<h4 class="name" id=".select"><span class="type-signature type-signature-async, static">(async, static) </span>select<span class="signature">(find<span class="signature-attributes">opt</span>, option<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise}</span></h4>
|
|
3823
|
+
|
|
3824
|
+
|
|
3825
|
+
|
|
3826
|
+
|
|
3827
|
+
|
|
3828
|
+
|
|
3829
|
+
<dl class="details">
|
|
3830
|
+
|
|
3831
|
+
<dt class="tag-description">Description:</dt>
|
|
3832
|
+
<dd class="tag-description"><ul class="dummy"><li><p>查詢數據</p></li></ul></dd>
|
|
3833
|
+
|
|
3834
|
+
|
|
3835
|
+
|
|
3836
|
+
<dt class="tag-source">Source:</dt>
|
|
3837
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
3838
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line484">line 484</a>
|
|
3839
|
+
</li></ul></dd>
|
|
3840
|
+
|
|
3841
|
+
|
|
3842
|
+
|
|
3843
|
+
|
|
3844
|
+
|
|
3845
|
+
|
|
3846
|
+
|
|
3847
|
+
|
|
3848
|
+
|
|
3849
|
+
|
|
3850
|
+
|
|
3851
|
+
|
|
3852
|
+
|
|
3853
|
+
|
|
3854
|
+
|
|
3855
|
+
|
|
3856
|
+
|
|
3857
|
+
|
|
3858
|
+
|
|
3859
|
+
|
|
3860
|
+
|
|
3861
|
+
|
|
3862
|
+
|
|
3863
|
+
|
|
3864
|
+
|
|
3865
|
+
|
|
3866
|
+
|
|
3867
|
+
|
|
3868
|
+
|
|
3869
|
+
|
|
3870
|
+
|
|
3871
|
+
</dl>
|
|
3872
|
+
|
|
3873
|
+
|
|
3874
|
+
|
|
3875
|
+
|
|
3876
|
+
|
|
3877
|
+
|
|
3878
|
+
|
|
3879
|
+
|
|
3880
|
+
|
|
3881
|
+
|
|
3882
|
+
|
|
3883
|
+
|
|
3884
|
+
|
|
3885
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
3886
|
+
|
|
3887
|
+
|
|
3888
|
+
<table class="params">
|
|
3889
|
+
<thead>
|
|
3890
|
+
<tr>
|
|
3891
|
+
|
|
3892
|
+
<th>Name</th>
|
|
3893
|
+
|
|
3894
|
+
|
|
3895
|
+
<th>Type</th>
|
|
3896
|
+
|
|
3897
|
+
|
|
3898
|
+
<th>Attributes</th>
|
|
3899
|
+
|
|
3900
|
+
|
|
3901
|
+
|
|
3902
|
+
<th>Default</th>
|
|
3903
|
+
|
|
3904
|
+
|
|
3905
|
+
<th class="last">Description</th>
|
|
3906
|
+
</tr>
|
|
3907
|
+
</thead>
|
|
3908
|
+
|
|
3909
|
+
<tbody>
|
|
3910
|
+
|
|
3911
|
+
|
|
3912
|
+
<tr>
|
|
3913
|
+
|
|
3914
|
+
<td class="name"><code>find</code></td>
|
|
3915
|
+
|
|
3916
|
+
|
|
3917
|
+
<td class="type">
|
|
3918
|
+
|
|
3919
|
+
|
|
3920
|
+
<span class="param-type">Object</span>
|
|
3921
|
+
|
|
3922
|
+
|
|
3923
|
+
|
|
3924
|
+
|
|
3925
|
+
</td>
|
|
3926
|
+
|
|
3927
|
+
|
|
3928
|
+
<td class="attributes">
|
|
3929
|
+
|
|
3930
|
+
<optional><br>
|
|
3931
|
+
|
|
3932
|
+
|
|
3933
|
+
|
|
3934
|
+
|
|
3935
|
+
|
|
3936
|
+
</td>
|
|
3937
|
+
|
|
3938
|
+
|
|
3939
|
+
|
|
3940
|
+
<td class="default">
|
|
3941
|
+
|
|
3942
|
+
<code>{}</code>
|
|
3943
|
+
|
|
3944
|
+
</td>
|
|
3945
|
+
|
|
3946
|
+
|
|
3947
|
+
<td class="description last"><p>輸入查詢條件物件</p></td>
|
|
3948
|
+
</tr>
|
|
3949
|
+
|
|
3950
|
+
|
|
3951
|
+
|
|
3952
|
+
<tr>
|
|
3953
|
+
|
|
3954
|
+
<td class="name"><code>option</code></td>
|
|
3955
|
+
|
|
3956
|
+
|
|
3957
|
+
<td class="type">
|
|
3958
|
+
|
|
3959
|
+
|
|
3960
|
+
<span class="param-type">Object</span>
|
|
3961
|
+
|
|
3962
|
+
|
|
3963
|
+
|
|
3964
|
+
|
|
3965
|
+
</td>
|
|
3966
|
+
|
|
3967
|
+
|
|
3968
|
+
<td class="attributes">
|
|
3969
|
+
|
|
3970
|
+
<optional><br>
|
|
3971
|
+
|
|
3972
|
+
|
|
3973
|
+
|
|
3974
|
+
|
|
3975
|
+
|
|
3976
|
+
</td>
|
|
3977
|
+
|
|
3978
|
+
|
|
3979
|
+
|
|
3980
|
+
<td class="default">
|
|
3981
|
+
|
|
3982
|
+
<code>{}</code>
|
|
3983
|
+
|
|
3984
|
+
</td>
|
|
3985
|
+
|
|
3986
|
+
|
|
3987
|
+
<td class="description last"><p>輸入設定物件,預設為{}</p>
|
|
3988
|
+
<h6>Properties</h6>
|
|
3989
|
+
|
|
3990
|
+
|
|
3991
|
+
<table class="params">
|
|
3992
|
+
<thead>
|
|
3993
|
+
<tr>
|
|
3994
|
+
|
|
3995
|
+
<th>Name</th>
|
|
3996
|
+
|
|
3997
|
+
|
|
3998
|
+
<th>Type</th>
|
|
3999
|
+
|
|
4000
|
+
|
|
4001
|
+
<th>Attributes</th>
|
|
4002
|
+
|
|
4003
|
+
|
|
4004
|
+
|
|
4005
|
+
<th>Default</th>
|
|
4006
|
+
|
|
4007
|
+
|
|
4008
|
+
<th class="last">Description</th>
|
|
4009
|
+
</tr>
|
|
4010
|
+
</thead>
|
|
4011
|
+
|
|
4012
|
+
<tbody>
|
|
4013
|
+
|
|
4014
|
+
|
|
4015
|
+
<tr>
|
|
4016
|
+
|
|
4017
|
+
<td class="name"><code>instance</code></td>
|
|
4018
|
+
|
|
4019
|
+
|
|
4020
|
+
<td class="type">
|
|
4021
|
+
|
|
4022
|
+
|
|
4023
|
+
<span class="param-type">Object</span>
|
|
4024
|
+
|
|
4025
|
+
|
|
4026
|
+
|
|
4027
|
+
|
|
4028
|
+
</td>
|
|
4029
|
+
|
|
4030
|
+
|
|
4031
|
+
<td class="attributes">
|
|
4032
|
+
|
|
4033
|
+
<optional><br>
|
|
4034
|
+
|
|
4035
|
+
|
|
4036
|
+
|
|
4037
|
+
|
|
4038
|
+
|
|
4039
|
+
</td>
|
|
4040
|
+
|
|
4041
|
+
|
|
4042
|
+
|
|
4043
|
+
<td class="default">
|
|
4044
|
+
|
|
4045
|
+
<code>null</code>
|
|
4046
|
+
|
|
4047
|
+
</td>
|
|
4048
|
+
|
|
4049
|
+
|
|
4050
|
+
<td class="description last"><p>輸入實例instance物件,預設為null</p></td>
|
|
4051
|
+
</tr>
|
|
4052
|
+
|
|
4053
|
+
|
|
4054
|
+
|
|
4055
|
+
<tr>
|
|
4056
|
+
|
|
4057
|
+
<td class="name"><code>transaction</code></td>
|
|
4058
|
+
|
|
4059
|
+
|
|
4060
|
+
<td class="type">
|
|
4061
|
+
|
|
4062
|
+
|
|
4063
|
+
<span class="param-type">Object</span>
|
|
4064
|
+
|
|
4065
|
+
|
|
4066
|
+
|
|
4067
|
+
|
|
4068
|
+
</td>
|
|
4069
|
+
|
|
4070
|
+
|
|
4071
|
+
<td class="attributes">
|
|
4072
|
+
|
|
4073
|
+
<optional><br>
|
|
4074
|
+
|
|
4075
|
+
|
|
4076
|
+
|
|
4077
|
+
|
|
4078
|
+
|
|
4079
|
+
</td>
|
|
4080
|
+
|
|
4081
|
+
|
|
4082
|
+
|
|
4083
|
+
<td class="default">
|
|
4084
|
+
|
|
4085
|
+
<code>null</code>
|
|
4086
|
+
|
|
4087
|
+
</td>
|
|
4088
|
+
|
|
4089
|
+
|
|
4090
|
+
<td class="description last"><p>輸入交易(transaction)物件,預設為null</p></td>
|
|
4091
|
+
</tr>
|
|
4092
|
+
|
|
4093
|
+
|
|
4094
|
+
</tbody>
|
|
4095
|
+
</table>
|
|
4096
|
+
|
|
4097
|
+
</td>
|
|
4098
|
+
</tr>
|
|
4099
|
+
|
|
4100
|
+
|
|
4101
|
+
</tbody>
|
|
4102
|
+
</table>
|
|
4103
|
+
|
|
4104
|
+
|
|
4105
|
+
|
|
4106
|
+
|
|
4107
|
+
|
|
4108
|
+
|
|
4109
|
+
|
|
4110
|
+
|
|
4111
|
+
|
|
4112
|
+
|
|
4113
|
+
|
|
4114
|
+
|
|
4115
|
+
|
|
4116
|
+
|
|
4117
|
+
|
|
4118
|
+
|
|
4119
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
4120
|
+
|
|
4121
|
+
|
|
4122
|
+
<div class="param-desc">
|
|
4123
|
+
<p>回傳Promise,resolve回傳數據,reject回傳錯誤訊息</p>
|
|
4124
|
+
</div>
|
|
4125
|
+
|
|
4126
|
+
|
|
4127
|
+
|
|
4128
|
+
<dl class="param-type">
|
|
4129
|
+
<dt>
|
|
4130
|
+
Type
|
|
4131
|
+
</dt>
|
|
4132
|
+
<dd>
|
|
4133
|
+
|
|
4134
|
+
<span class="param-type">Promise</span>
|
|
4135
|
+
|
|
4136
|
+
|
|
4137
|
+
|
|
4138
|
+
</dd>
|
|
4139
|
+
</dl>
|
|
4140
|
+
|
|
4141
|
+
|
|
4142
|
+
|
|
4143
|
+
|
|
4144
|
+
|
|
4145
|
+
|
|
4146
|
+
|
|
4147
|
+
|
|
4148
|
+
|
|
4149
|
+
|
|
4150
|
+
<h4 class="name" id=".selectByPk"><span class="type-signature type-signature-async, static">(async, static) </span>selectByPk<span class="signature">(pk, option<span class="signature-attributes">opt</span>)</span><span class="type-signature"> → {Promise}</span></h4>
|
|
4151
|
+
|
|
4152
|
+
|
|
4153
|
+
|
|
4154
|
+
|
|
4155
|
+
|
|
4156
|
+
|
|
4157
|
+
<dl class="details">
|
|
4158
|
+
|
|
4159
|
+
<dt class="tag-description">Description:</dt>
|
|
4160
|
+
<dd class="tag-description"><ul class="dummy"><li><p>由主鍵查詢單筆數據,因由資料庫依主鍵索引取值且僅回傳單筆,不需如select提取全部符合數據再處理,故數據量大時效能較佳</p>
|
|
4161
|
+
<p>註: 主鍵欄位取自opt.pk,預設為id,支援由呼叫端指定
|
|
4162
|
+
註: 主鍵未命中或主鍵值無效皆回傳null而不reject,[命中]之判定基準與insert、save、del內對既有數據之認定一致
|
|
4163
|
+
註: 本函數不得有副作用,故不創建資料表</p></li></ul></dd>
|
|
4164
|
+
|
|
4165
|
+
|
|
4166
|
+
|
|
4167
|
+
<dt class="tag-source">Source:</dt>
|
|
4168
|
+
<dd class="tag-source"><ul class="dummy"><li>
|
|
4169
|
+
<a href="WOrmReladb.mjs.html">WOrmReladb.mjs</a>, <a href="WOrmReladb.mjs.html#line634">line 634</a>
|
|
4170
|
+
</li></ul></dd>
|
|
4171
|
+
|
|
4172
|
+
|
|
4173
|
+
|
|
4174
|
+
|
|
4175
|
+
|
|
4176
|
+
|
|
4177
|
+
|
|
4178
|
+
|
|
4179
|
+
|
|
4180
|
+
|
|
4181
|
+
|
|
4182
|
+
|
|
4183
|
+
|
|
4184
|
+
|
|
4185
|
+
|
|
4186
|
+
|
|
4187
|
+
|
|
4188
|
+
|
|
4189
|
+
|
|
4190
|
+
|
|
4191
|
+
|
|
4192
|
+
|
|
4193
|
+
|
|
4194
|
+
|
|
4195
|
+
|
|
4196
|
+
|
|
4197
|
+
|
|
4198
|
+
|
|
4199
|
+
|
|
4200
|
+
|
|
4201
|
+
|
|
4202
|
+
</dl>
|
|
4203
|
+
|
|
4204
|
+
|
|
4205
|
+
|
|
4206
|
+
|
|
4207
|
+
|
|
4208
|
+
|
|
4209
|
+
|
|
4210
|
+
|
|
4211
|
+
|
|
4212
|
+
|
|
4213
|
+
|
|
4214
|
+
|
|
4215
|
+
|
|
4216
|
+
<h5 class="h5-parameters">Parameters:</h5>
|
|
4217
|
+
|
|
4218
|
+
|
|
4219
|
+
<table class="params">
|
|
4220
|
+
<thead>
|
|
4221
|
+
<tr>
|
|
4222
|
+
|
|
4223
|
+
<th>Name</th>
|
|
4224
|
+
|
|
4225
|
+
|
|
4226
|
+
<th>Type</th>
|
|
4227
|
+
|
|
4228
|
+
|
|
4229
|
+
<th>Attributes</th>
|
|
4230
|
+
|
|
4231
|
+
|
|
4232
|
+
|
|
4233
|
+
<th>Default</th>
|
|
4234
|
+
|
|
4235
|
+
|
|
4236
|
+
<th class="last">Description</th>
|
|
4237
|
+
</tr>
|
|
4238
|
+
</thead>
|
|
4239
|
+
|
|
4240
|
+
<tbody>
|
|
4241
|
+
|
|
4242
|
+
|
|
4243
|
+
<tr>
|
|
4244
|
+
|
|
4245
|
+
<td class="name"><code>pk</code></td>
|
|
4246
|
+
|
|
4247
|
+
|
|
4248
|
+
<td class="type">
|
|
4249
|
+
|
|
4250
|
+
|
|
4251
|
+
<span class="param-type">String</span>
|
|
4252
|
+
|
|
|
4253
|
+
|
|
4254
|
+
<span class="param-type">Number</span>
|
|
4255
|
+
|
|
4256
|
+
|
|
4257
|
+
|
|
4258
|
+
|
|
4259
|
+
</td>
|
|
4260
|
+
|
|
4261
|
+
|
|
4262
|
+
<td class="attributes">
|
|
4263
|
+
|
|
4264
|
+
|
|
4265
|
+
|
|
4266
|
+
|
|
4267
|
+
|
|
4268
|
+
</td>
|
|
4269
|
+
|
|
4270
|
+
|
|
4271
|
+
|
|
4272
|
+
<td class="default">
|
|
4273
|
+
|
|
4274
|
+
</td>
|
|
4275
|
+
|
|
4276
|
+
|
|
4277
|
+
<td class="description last"><p>輸入主鍵值,即數據內opt.pk欄位之值</p></td>
|
|
4278
|
+
</tr>
|
|
4279
|
+
|
|
4280
|
+
|
|
4281
|
+
|
|
4282
|
+
<tr>
|
|
4283
|
+
|
|
4284
|
+
<td class="name"><code>option</code></td>
|
|
4285
|
+
|
|
4286
|
+
|
|
4287
|
+
<td class="type">
|
|
4288
|
+
|
|
4289
|
+
|
|
4290
|
+
<span class="param-type">Object</span>
|
|
4291
|
+
|
|
4292
|
+
|
|
4293
|
+
|
|
4294
|
+
|
|
4295
|
+
</td>
|
|
4296
|
+
|
|
4297
|
+
|
|
4298
|
+
<td class="attributes">
|
|
4299
|
+
|
|
4300
|
+
<optional><br>
|
|
4301
|
+
|
|
4302
|
+
|
|
4303
|
+
|
|
4304
|
+
|
|
4305
|
+
|
|
4306
|
+
</td>
|
|
4307
|
+
|
|
4308
|
+
|
|
4309
|
+
|
|
4310
|
+
<td class="default">
|
|
4311
|
+
|
|
4312
|
+
<code>{}</code>
|
|
4313
|
+
|
|
4314
|
+
</td>
|
|
4315
|
+
|
|
4316
|
+
|
|
4317
|
+
<td class="description last"><p>輸入設定物件,預設為{}</p>
|
|
4318
|
+
<h6>Properties</h6>
|
|
4319
|
+
|
|
4320
|
+
|
|
4321
|
+
<table class="params">
|
|
4322
|
+
<thead>
|
|
4323
|
+
<tr>
|
|
4324
|
+
|
|
4325
|
+
<th>Name</th>
|
|
4326
|
+
|
|
4327
|
+
|
|
4328
|
+
<th>Type</th>
|
|
4329
|
+
|
|
4330
|
+
|
|
4331
|
+
<th>Attributes</th>
|
|
4332
|
+
|
|
4333
|
+
|
|
4334
|
+
|
|
4335
|
+
<th>Default</th>
|
|
4336
|
+
|
|
4337
|
+
|
|
4338
|
+
<th class="last">Description</th>
|
|
4339
|
+
</tr>
|
|
4340
|
+
</thead>
|
|
4341
|
+
|
|
4342
|
+
<tbody>
|
|
4343
|
+
|
|
4344
|
+
|
|
4345
|
+
<tr>
|
|
4346
|
+
|
|
4347
|
+
<td class="name"><code>instance</code></td>
|
|
4348
|
+
|
|
4349
|
+
|
|
4350
|
+
<td class="type">
|
|
4351
|
+
|
|
4352
|
+
|
|
4353
|
+
<span class="param-type">Object</span>
|
|
4354
|
+
|
|
4355
|
+
|
|
4356
|
+
|
|
4357
|
+
|
|
4358
|
+
</td>
|
|
4359
|
+
|
|
4360
|
+
|
|
4361
|
+
<td class="attributes">
|
|
4362
|
+
|
|
4363
|
+
<optional><br>
|
|
4364
|
+
|
|
4365
|
+
|
|
4366
|
+
|
|
4367
|
+
|
|
4368
|
+
|
|
4369
|
+
</td>
|
|
4370
|
+
|
|
4371
|
+
|
|
4372
|
+
|
|
4373
|
+
<td class="default">
|
|
4374
|
+
|
|
4375
|
+
<code>null</code>
|
|
4376
|
+
|
|
4377
|
+
</td>
|
|
4378
|
+
|
|
4379
|
+
|
|
4380
|
+
<td class="description last"><p>輸入實例instance物件,預設為null</p></td>
|
|
4381
|
+
</tr>
|
|
4382
|
+
|
|
4383
|
+
|
|
4384
|
+
|
|
4385
|
+
<tr>
|
|
4386
|
+
|
|
4387
|
+
<td class="name"><code>transaction</code></td>
|
|
4388
|
+
|
|
4389
|
+
|
|
4390
|
+
<td class="type">
|
|
4391
|
+
|
|
4392
|
+
|
|
4393
|
+
<span class="param-type">Object</span>
|
|
4394
|
+
|
|
4395
|
+
|
|
4396
|
+
|
|
4397
|
+
|
|
4398
|
+
</td>
|
|
4399
|
+
|
|
4400
|
+
|
|
4401
|
+
<td class="attributes">
|
|
4402
|
+
|
|
4403
|
+
<optional><br>
|
|
4404
|
+
|
|
4405
|
+
|
|
4406
|
+
|
|
4407
|
+
|
|
4408
|
+
|
|
4409
|
+
</td>
|
|
4410
|
+
|
|
4411
|
+
|
|
4412
|
+
|
|
4413
|
+
<td class="default">
|
|
4414
|
+
|
|
4415
|
+
<code>null</code>
|
|
4416
|
+
|
|
4417
|
+
</td>
|
|
4418
|
+
|
|
4419
|
+
|
|
4420
|
+
<td class="description last"><p>輸入交易(transaction)物件,預設為null</p></td>
|
|
4421
|
+
</tr>
|
|
4422
|
+
|
|
4423
|
+
|
|
4424
|
+
</tbody>
|
|
4425
|
+
</table>
|
|
4426
|
+
|
|
4427
|
+
</td>
|
|
4428
|
+
</tr>
|
|
4429
|
+
|
|
4430
|
+
|
|
4431
|
+
</tbody>
|
|
4432
|
+
</table>
|
|
4433
|
+
|
|
4434
|
+
|
|
4435
|
+
|
|
4436
|
+
|
|
4437
|
+
|
|
4438
|
+
|
|
4439
|
+
|
|
4440
|
+
|
|
4441
|
+
|
|
4442
|
+
|
|
4443
|
+
|
|
4444
|
+
|
|
4445
|
+
|
|
4446
|
+
|
|
4447
|
+
|
|
4448
|
+
|
|
4449
|
+
<h5 class="h5-returns">Returns:</h5>
|
|
4450
|
+
|
|
4451
|
+
|
|
4452
|
+
<div class="param-desc">
|
|
4453
|
+
<p>回傳Promise,resolve回傳數據物件,若無此主鍵或主鍵值無效則回傳null,reject回傳錯誤訊息</p>
|
|
3725
4454
|
</div>
|
|
3726
4455
|
|
|
3727
4456
|
|
|
@@ -3763,7 +4492,7 @@
|
|
|
3763
4492
|
<br class="clear">
|
|
3764
4493
|
|
|
3765
4494
|
<footer>
|
|
3766
|
-
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on
|
|
4495
|
+
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 4.0.5</a> on Mon Aug 17 2026 19:12:32 GMT+0800 (台北標準時間) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
|
|
3767
4496
|
</footer>
|
|
3768
4497
|
|
|
3769
4498
|
<script>prettyPrint();</script>
|