@maiyunnet/kebab 9.29.5 → 9.29.6

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/doc/kebab-rag.md CHANGED
@@ -1913,7 +1913,7 @@ index/variables/VER.md
1913
1913
 
1914
1914
  # Variable: VER
1915
1915
 
1916
- > `const` **VER**: `"9.29.5"` = `'9.29.5'`
1916
+ > `const` **VER**: `"9.29.6"` = `'9.29.6'`
1917
1917
 
1918
1918
  Defined in: [index.ts:8](https://github.com/maiyunnet/kebab/blob/master/index.ts#L8)
1919
1919
 
@@ -117570,7 +117570,7 @@ Defined in: [lib/db/conn.ts:64](https://github.com/maiyunnet/kebab/blob/master/l
117570
117570
 
117571
117571
  > **beginTransaction**(`logError?`): `Promise`\<`boolean`\>
117572
117572
 
117573
- Defined in: [lib/db/conn.ts:337](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L337)
117573
+ Defined in: [lib/db/conn.ts:347](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L347)
117574
117574
 
117575
117575
  开启事务,只能在独占连接中使用
117576
117576
 
@@ -117594,7 +117594,7 @@ Defined in: [lib/db/conn.ts:337](https://github.com/maiyunnet/kebab/blob/master/
117594
117594
 
117595
117595
  > **commit**(): `Promise`\<`boolean`\>
117596
117596
 
117597
- Defined in: [lib/db/conn.ts:367](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L367)
117597
+ Defined in: [lib/db/conn.ts:377](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L377)
117598
117598
 
117599
117599
  #### Returns
117600
117600
 
@@ -117606,7 +117606,7 @@ Defined in: [lib/db/conn.ts:367](https://github.com/maiyunnet/kebab/blob/master/
117606
117606
 
117607
117607
  > **end**(): `Promise`\<`boolean`\>
117608
117608
 
117609
- Defined in: [lib/db/conn.ts:320](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L320)
117609
+ Defined in: [lib/db/conn.ts:330](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L330)
117610
117610
 
117611
117611
  关闭连接,一般情况下不使用
117612
117612
 
@@ -117620,7 +117620,7 @@ Defined in: [lib/db/conn.ts:320](https://github.com/maiyunnet/kebab/blob/master/
117620
117620
 
117621
117621
  > **execute**(`sql`, `values?`): `Promise`\<[`IPacket`](../../interfaces/IPacket.md)\>
117622
117622
 
117623
- Defined in: [lib/db/conn.ts:246](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L246)
117623
+ Defined in: [lib/db/conn.ts:256](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L256)
117624
117624
 
117625
117625
  执行一条 SQL 并获得影响行数对象 packet
117626
117626
 
@@ -117766,29 +117766,69 @@ Defined in: [lib/db/conn.ts:123](https://github.com/maiyunnet/kebab/blob/master/
117766
117766
 
117767
117767
  ### query()
117768
117768
 
117769
- > **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\>
117769
+ #### Call Signature
117770
+
117771
+ > **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\<`Record`\<`string`, `any`\>\>\>
117770
117772
 
117771
- Defined in: [lib/db/conn.ts:187](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L187)
117773
+ Defined in: [lib/db/conn.ts:188](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L188)
117772
117774
 
117773
117775
  执行一条 SQL 并获得返回数据
117774
117776
 
117775
- #### Parameters
117777
+ ##### Parameters
117776
117778
 
117777
- ##### sql
117779
+ ###### sql
117778
117780
 
117779
117781
  `string`
117780
117782
 
117781
117783
  执行的 SQL 字符串
117782
117784
 
117783
- ##### values?
117785
+ ###### values?
117784
117786
 
117785
117787
  [`DbValue`](../../../../index/type-aliases/DbValue.md)[]
117786
117788
 
117787
- 要替换的 data 数据
117789
+ SQL 占位符绑定的值
117788
117790
 
117789
- #### Returns
117791
+ ##### Returns
117792
+
117793
+ `Promise`\<[`IData`](../../interfaces/IData.md)\<`Record`\<`string`, `any`\>\>\>
117794
+
117795
+ 查询结果,result = -500 表示查询失败
117796
+
117797
+ #### Call Signature
117798
+
117799
+ > **query**\<`TRow`\>(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\<`TRow`\>\>
117800
+
117801
+ Defined in: [lib/db/conn.ts:196](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L196)
117802
+
117803
+ 执行一条 SQL,按指定类型返回数据行
117804
+
117805
+ ##### Type Parameters
117806
+
117807
+ ###### TRow
117808
+
117809
+ `TRow` *extends* `object`
117810
+
117811
+ SQL 返回的行结构,由调用方根据查询字段指定
117812
+
117813
+ ##### Parameters
117814
+
117815
+ ###### sql
117816
+
117817
+ `string`
117818
+
117819
+ 执行的 SQL 字符串
117820
+
117821
+ ###### values?
117822
+
117823
+ [`DbValue`](../../../../index/type-aliases/DbValue.md)[]
117824
+
117825
+ SQL 占位符绑定的值
117826
+
117827
+ ##### Returns
117828
+
117829
+ `Promise`\<[`IData`](../../interfaces/IData.md)\<`TRow`\>\>
117790
117830
 
117791
- `Promise`\<[`IData`](../../interfaces/IData.md)\>
117831
+ 查询结果,result = -500 表示查询失败
117792
117832
 
117793
117833
  ***
117794
117834
 
@@ -117810,7 +117850,7 @@ Defined in: [lib/db/conn.ts:156](https://github.com/maiyunnet/kebab/blob/master/
117810
117850
 
117811
117851
  > **rollback**(): `Promise`\<`boolean`\>
117812
117852
 
117813
- Defined in: [lib/db/conn.ts:387](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L387)
117853
+ Defined in: [lib/db/conn.ts:397](https://github.com/maiyunnet/kebab/blob/master/lib/db/conn.ts#L397)
117814
117854
 
117815
117855
  #### Returns
117816
117856
 
@@ -118024,11 +118064,17 @@ lib/db/interfaces/IData.md
118024
118064
 
118025
118065
  [Documents for @maiyunnet/kebab](../../../index.md) / [lib/db](../index.md) / IData
118026
118066
 
118027
- # Interface: IData
118067
+ # Interface: IData\<TRow\>
118028
118068
 
118029
118069
  Defined in: [lib/db.ts:23](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L23)
118030
118070
 
118031
- query 返回的数据
118071
+ query 返回的数据,未指定行类型时保留动态列访问
118072
+
118073
+ ## Type Parameters
118074
+
118075
+ ### TRow
118076
+
118077
+ `TRow` *extends* `object` = `Record`\<`string`, `any`\>
118032
118078
 
118033
118079
  ## Properties
118034
118080
 
@@ -118072,7 +118118,7 @@ Defined in: [lib/db.ts:36](https://github.com/maiyunnet/kebab/blob/master/lib/db
118072
118118
 
118073
118119
  ### rows
118074
118120
 
118075
- > **rows**: `Record`\<`string`, `any`\>[] \| `null`
118121
+ > **rows**: `TRow`[] \| `null`
118076
118122
 
118077
118123
  Defined in: [lib/db.ts:24](https://github.com/maiyunnet/kebab/blob/master/lib/db.ts#L24)
118078
118124
 
@@ -118206,7 +118252,7 @@ Defined in: [lib/db/pool.ts:138](https://github.com/maiyunnet/kebab/blob/master/
118206
118252
 
118207
118253
  > **beginTransaction**(`ctr`): `Promise`\<[`Transaction`](../../tran/classes/Transaction.md) \| `null`\>
118208
118254
 
118209
- Defined in: [lib/db/pool.ts:206](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L206)
118255
+ Defined in: [lib/db/pool.ts:215](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L215)
118210
118256
 
118211
118257
  开启事务,返回事务对象并锁定连接,别人任何人不可用,有 ctr 的话必传 this,独立执行时可传 null
118212
118258
 
@@ -118226,7 +118272,7 @@ Defined in: [lib/db/pool.ts:206](https://github.com/maiyunnet/kebab/blob/master/
118226
118272
 
118227
118273
  > **execute**(`sql`, `values?`): `Promise`\<[`IPacket`](../../interfaces/IPacket.md)\>
118228
118274
 
118229
- Defined in: [lib/db/pool.ts:186](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L186)
118275
+ Defined in: [lib/db/pool.ts:195](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L195)
118230
118276
 
118231
118277
  执行一条 SQL 并获得影响行数对象 packet,连接失败抛出错误
118232
118278
 
@@ -118268,7 +118314,7 @@ Defined in: [lib/db/pool.ts:152](https://github.com/maiyunnet/kebab/blob/master/
118268
118314
 
118269
118315
  > **getQueries**(): `number`
118270
118316
 
118271
- Defined in: [lib/db/pool.ts:346](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L346)
118317
+ Defined in: [lib/db/pool.ts:355](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L355)
118272
118318
 
118273
118319
  获取 SQL 执行次数
118274
118320
 
@@ -118294,31 +118340,69 @@ Defined in: [lib/db/pool.ts:147](https://github.com/maiyunnet/kebab/blob/master/
118294
118340
 
118295
118341
  ### query()
118296
118342
 
118297
- > **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\>
118343
+ #### Call Signature
118344
+
118345
+ > **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\<`Record`\<`string`, `any`\>\>\>
118298
118346
 
118299
118347
  Defined in: [lib/db/pool.ts:162](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L162)
118300
118348
 
118301
118349
  执行一条 SQL,无视顺序和相同连接,随用随取
118302
118350
 
118303
- #### Parameters
118351
+ ##### Parameters
118304
118352
 
118305
- ##### sql
118353
+ ###### sql
118306
118354
 
118307
118355
  `string`
118308
118356
 
118309
118357
  执行的 SQL 字符串
118310
118358
 
118311
- ##### values?
118359
+ ###### values?
118312
118360
 
118313
118361
  [`DbValue`](../../../../index/type-aliases/DbValue.md)[]
118314
118362
 
118315
- 要替换的 data 数据
118363
+ SQL 占位符绑定的值
118316
118364
 
118317
- #### Returns
118365
+ ##### Returns
118366
+
118367
+ `Promise`\<[`IData`](../../interfaces/IData.md)\<`Record`\<`string`, `any`\>\>\>
118368
+
118369
+ 查询结果,result = -500 表示系统错误
118370
+
118371
+ #### Call Signature
118372
+
118373
+ > **query**\<`TRow`\>(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\<`TRow`\>\>
118374
+
118375
+ Defined in: [lib/db/pool.ts:170](https://github.com/maiyunnet/kebab/blob/master/lib/db/pool.ts#L170)
118376
+
118377
+ 执行一条 SQL,按指定类型返回数据行
118378
+
118379
+ ##### Type Parameters
118380
+
118381
+ ###### TRow
118382
+
118383
+ `TRow` *extends* `object`
118384
+
118385
+ SQL 返回的行结构,由调用方根据查询字段指定
118386
+
118387
+ ##### Parameters
118388
+
118389
+ ###### sql
118390
+
118391
+ `string`
118392
+
118393
+ 执行的 SQL 字符串
118394
+
118395
+ ###### values?
118396
+
118397
+ [`DbValue`](../../../../index/type-aliases/DbValue.md)[]
118398
+
118399
+ SQL 占位符绑定的值
118318
118400
 
118319
- `Promise`\<[`IData`](../../interfaces/IData.md)\>
118401
+ ##### Returns
118320
118402
 
118321
- error.errno = -500 表示系统错误
118403
+ `Promise`\<[`IData`](../../interfaces/IData.md)\<`TRow`\>\>
118404
+
118405
+ 查询结果,result = -500 表示系统错误
118322
118406
 
118323
118407
  lib/db/pool/functions/getConnectionList.md
118324
118408
  ---
@@ -118512,7 +118596,7 @@ Defined in: [lib/db/tran.ts:28](https://github.com/maiyunnet/kebab/blob/master/l
118512
118596
 
118513
118597
  > **commit**(): `Promise`\<`boolean`\>
118514
118598
 
118515
- Defined in: [lib/db/tran.ts:104](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L104)
118599
+ Defined in: [lib/db/tran.ts:114](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L114)
118516
118600
 
118517
118601
  #### Returns
118518
118602
 
@@ -118524,7 +118608,7 @@ Defined in: [lib/db/tran.ts:104](https://github.com/maiyunnet/kebab/blob/master/
118524
118608
 
118525
118609
  > **execute**(`sql`, `values?`): `Promise`\<[`IPacket`](../../interfaces/IPacket.md)\>
118526
118610
 
118527
- Defined in: [lib/db/tran.ts:85](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L85)
118611
+ Defined in: [lib/db/tran.ts:95](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L95)
118528
118612
 
118529
118613
  执行一条 SQL 并获得影响行数对象 packet,连接失败抛出错误
118530
118614
 
@@ -118564,29 +118648,69 @@ Defined in: [lib/db/tran.ts:52](https://github.com/maiyunnet/kebab/blob/master/l
118564
118648
 
118565
118649
  ### query()
118566
118650
 
118567
- > **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\>
118651
+ #### Call Signature
118568
118652
 
118569
- Defined in: [lib/db/tran.ts:61](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L61)
118653
+ > **query**(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\<`Record`\<`string`, `any`\>\>\>
118654
+
118655
+ Defined in: [lib/db/tran.ts:62](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L62)
118570
118656
 
118571
118657
  在事务连接中执行一条 SQL
118572
118658
 
118573
- #### Parameters
118659
+ ##### Parameters
118574
118660
 
118575
- ##### sql
118661
+ ###### sql
118576
118662
 
118577
118663
  `string`
118578
118664
 
118579
118665
  执行的 SQL 字符串
118580
118666
 
118581
- ##### values?
118667
+ ###### values?
118582
118668
 
118583
118669
  [`DbValue`](../../../../index/type-aliases/DbValue.md)[]
118584
118670
 
118585
- 要替换的 data 数据
118671
+ SQL 占位符绑定的值
118586
118672
 
118587
- #### Returns
118673
+ ##### Returns
118674
+
118675
+ `Promise`\<[`IData`](../../interfaces/IData.md)\<`Record`\<`string`, `any`\>\>\>
118676
+
118677
+ 查询结果,result = -500 表示事务已关闭或查询失败
118678
+
118679
+ #### Call Signature
118680
+
118681
+ > **query**\<`TRow`\>(`sql`, `values?`): `Promise`\<[`IData`](../../interfaces/IData.md)\<`TRow`\>\>
118682
+
118683
+ Defined in: [lib/db/tran.ts:70](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L70)
118684
+
118685
+ 在事务连接中执行一条 SQL,按指定类型返回数据行
118686
+
118687
+ ##### Type Parameters
118688
+
118689
+ ###### TRow
118690
+
118691
+ `TRow` *extends* `object`
118692
+
118693
+ SQL 返回的行结构,由调用方根据查询字段指定
118694
+
118695
+ ##### Parameters
118696
+
118697
+ ###### sql
118698
+
118699
+ `string`
118700
+
118701
+ 执行的 SQL 字符串
118702
+
118703
+ ###### values?
118704
+
118705
+ [`DbValue`](../../../../index/type-aliases/DbValue.md)[]
118588
118706
 
118589
- `Promise`\<[`IData`](../../interfaces/IData.md)\>
118707
+ SQL 占位符绑定的值
118708
+
118709
+ ##### Returns
118710
+
118711
+ `Promise`\<[`IData`](../../interfaces/IData.md)\<`TRow`\>\>
118712
+
118713
+ 查询结果,result = -500 表示事务已关闭或查询失败
118590
118714
 
118591
118715
  ***
118592
118716
 
@@ -118594,7 +118718,7 @@ Defined in: [lib/db/tran.ts:61](https://github.com/maiyunnet/kebab/blob/master/l
118594
118718
 
118595
118719
  > **rollback**(): `Promise`\<`boolean`\>
118596
118720
 
118597
- Defined in: [lib/db/tran.ts:126](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L126)
118721
+ Defined in: [lib/db/tran.ts:136](https://github.com/maiyunnet/kebab/blob/master/lib/db/tran.ts#L136)
118598
118722
 
118599
118723
  #### Returns
118600
118724
 
@@ -120058,7 +120182,7 @@ Defined in: [lib/kv.ts:150](https://github.com/maiyunnet/kebab/blob/master/lib/k
120058
120182
 
120059
120183
  > **bLMove**(`sourceKey`, `destKey`, `soo`, `deo`, `timeout`): `Promise`\<`string` \| `false` \| `null`\>
120060
120184
 
120061
- Defined in: [lib/kv.ts:770](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L770)
120185
+ Defined in: [lib/kv.ts:797](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L797)
120062
120186
 
120063
120187
  #### Parameters
120064
120188
 
@@ -120092,7 +120216,7 @@ Defined in: [lib/kv.ts:770](https://github.com/maiyunnet/kebab/blob/master/lib/k
120092
120216
 
120093
120217
  > **bRPop**(`key`, `timeout`): `Promise`\<`false` \| `Record`\<`string`, `string`\>\>
120094
120218
 
120095
- Defined in: [lib/kv.ts:809](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L809)
120219
+ Defined in: [lib/kv.ts:836](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L836)
120096
120220
 
120097
120221
  #### Parameters
120098
120222
 
@@ -120114,7 +120238,7 @@ Defined in: [lib/kv.ts:809](https://github.com/maiyunnet/kebab/blob/master/lib/k
120114
120238
 
120115
120239
  > **decr**(`key`, `num?`): `Promise`\<`number` \| `false`\>
120116
120240
 
120117
- Defined in: [lib/kv.ts:416](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L416)
120241
+ Defined in: [lib/kv.ts:433](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L433)
120118
120242
 
120119
120243
  自减
120120
120244
 
@@ -120140,7 +120264,7 @@ Defined in: [lib/kv.ts:416](https://github.com/maiyunnet/kebab/blob/master/lib/k
120140
120264
 
120141
120265
  > **del**(`keys`): `Promise`\<`boolean`\>
120142
120266
 
120143
- Defined in: [lib/kv.ts:364](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L364)
120267
+ Defined in: [lib/kv.ts:381](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L381)
120144
120268
 
120145
120269
  删除已存在的值
120146
120270
 
@@ -120182,7 +120306,7 @@ Defined in: [lib/kv.ts:202](https://github.com/maiyunnet/kebab/blob/master/lib/k
120182
120306
 
120183
120307
  > **expire**(`key`, `ttl`): `Promise`\<`boolean`\>
120184
120308
 
120185
- Defined in: [lib/kv.ts:444](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L444)
120309
+ Defined in: [lib/kv.ts:461](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L461)
120186
120310
 
120187
120311
  仅修改过期时间不修改值
120188
120312
 
@@ -120206,7 +120330,7 @@ Defined in: [lib/kv.ts:444](https://github.com/maiyunnet/kebab/blob/master/lib/k
120206
120330
 
120207
120331
  > **flushDb**(): `Promise`\<`boolean`\>
120208
120332
 
120209
- Defined in: [lib/kv.ts:511](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L511)
120333
+ Defined in: [lib/kv.ts:528](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L528)
120210
120334
 
120211
120335
  清除当前所选数据库的所有内容
120212
120336
 
@@ -120240,44 +120364,114 @@ Defined in: [lib/kv.ts:226](https://github.com/maiyunnet/kebab/blob/master/lib/k
120240
120364
 
120241
120365
  ### getDelJson()
120242
120366
 
120367
+ #### Call Signature
120368
+
120243
120369
  > **getDelJson**(`key`): `Promise`\<`any`\>
120244
120370
 
120245
- Defined in: [lib/kv.ts:343](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L343)
120371
+ Defined in: [lib/kv.ts:352](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L352)
120246
120372
 
120247
- 原子获取并删除 JSON 对象
120373
+ 原子读取并删除键,再解析 JSON
120248
120374
 
120249
- #### Parameters
120375
+ ##### Parameters
120250
120376
 
120251
- ##### key
120377
+ ###### key
120252
120378
 
120253
120379
  `string`
120254
120380
 
120255
120381
  键
120256
120382
 
120257
- #### Returns
120383
+ ##### Returns
120258
120384
 
120259
120385
  `Promise`\<`any`\>
120260
120386
 
120387
+ 解析结果,键不存在返回 null,Redis 操作或解析失败返回 false
120388
+
120389
+ #### Call Signature
120390
+
120391
+ > **getDelJson**\<`T`\>(`key`): `Promise`\<`false` \| `T` \| `null`\>
120392
+
120393
+ Defined in: [lib/kv.ts:359](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L359)
120394
+
120395
+ 原子读取并删除键,再解析 JSON
120396
+
120397
+ ##### Type Parameters
120398
+
120399
+ ###### T
120400
+
120401
+ `T`
120402
+
120403
+ 预期的结果类型,解析时只检查 JSON 语法
120404
+
120405
+ ##### Parameters
120406
+
120407
+ ###### key
120408
+
120409
+ `string`
120410
+
120411
+ 键
120412
+
120413
+ ##### Returns
120414
+
120415
+ `Promise`\<`false` \| `T` \| `null`\>
120416
+
120417
+ 解析结果,键不存在返回 null,Redis 操作或解析失败返回 false
120418
+
120261
120419
  ***
120262
120420
 
120263
120421
  ### getJson()
120264
120422
 
120423
+ #### Call Signature
120424
+
120265
120425
  > **getJson**(`key`): `Promise`\<`any`\>
120266
120426
 
120267
- Defined in: [lib/kv.ts:330](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L330)
120427
+ Defined in: [lib/kv.ts:331](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L331)
120268
120428
 
120269
- 获取 json 对象
120429
+ 读取并解析键中的 JSON
120270
120430
 
120271
- #### Parameters
120431
+ ##### Parameters
120272
120432
 
120273
- ##### key
120433
+ ###### key
120274
120434
 
120275
120435
  `string`
120276
120436
 
120277
- #### Returns
120437
+ 键
120438
+
120439
+ ##### Returns
120278
120440
 
120279
120441
  `Promise`\<`any`\>
120280
120442
 
120443
+ 解析结果,键不存在或未取得连接返回 null,读取异常或解析失败返回 false
120444
+
120445
+ #### Call Signature
120446
+
120447
+ > **getJson**\<`T`\>(`key`): `Promise`\<`false` \| `T` \| `null`\>
120448
+
120449
+ Defined in: [lib/kv.ts:338](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L338)
120450
+
120451
+ 读取并解析键中的 JSON
120452
+
120453
+ ##### Type Parameters
120454
+
120455
+ ###### T
120456
+
120457
+ `T`
120458
+
120459
+ 预期的结果类型,解析时只检查 JSON 语法
120460
+
120461
+ ##### Parameters
120462
+
120463
+ ###### key
120464
+
120465
+ `string`
120466
+
120467
+ 键
120468
+
120469
+ ##### Returns
120470
+
120471
+ `Promise`\<`false` \| `T` \| `null`\>
120472
+
120473
+ 解析结果,键不存在或未取得连接返回 null,读取异常或解析失败返回 false
120474
+
120281
120475
  ***
120282
120476
 
120283
120477
  ### getPre()
@@ -120300,7 +120494,7 @@ Defined in: [lib/kv.ts:68](https://github.com/maiyunnet/kebab/blob/master/lib/kv
120300
120494
 
120301
120495
  > **hDel**(`key`, `fields`): `Promise`\<`number` \| `false`\>
120302
120496
 
120303
- Defined in: [lib/kv.ts:672](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L672)
120497
+ Defined in: [lib/kv.ts:699](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L699)
120304
120498
 
120305
120499
  删除哈希键
120306
120500
 
@@ -120326,7 +120520,7 @@ Defined in: [lib/kv.ts:672](https://github.com/maiyunnet/kebab/blob/master/lib/k
120326
120520
 
120327
120521
  > **hExists**(`key`, `field`): `Promise`\<`boolean`\>
120328
120522
 
120329
- Defined in: [lib/kv.ts:690](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L690)
120523
+ Defined in: [lib/kv.ts:717](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L717)
120330
120524
 
120331
120525
  判断哈希字段是否存在
120332
120526
 
@@ -120350,7 +120544,7 @@ Defined in: [lib/kv.ts:690](https://github.com/maiyunnet/kebab/blob/master/lib/k
120350
120544
 
120351
120545
  > **hGet**(`key`, `field`): `Promise`\<`string` \| `false` \| `null`\>
120352
120546
 
120353
- Defined in: [lib/kv.ts:602](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L602)
120547
+ Defined in: [lib/kv.ts:619](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L619)
120354
120548
 
120355
120549
  获取哈希值
120356
120550
 
@@ -120374,7 +120568,7 @@ Defined in: [lib/kv.ts:602](https://github.com/maiyunnet/kebab/blob/master/lib/k
120374
120568
 
120375
120569
  > **hGetAll**(`key`): `Promise`\<`false` \| `Record`\<`string`, `string` \| `null`\>\>
120376
120570
 
120377
- Defined in: [lib/kv.ts:654](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L654)
120571
+ Defined in: [lib/kv.ts:681](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L681)
120378
120572
 
120379
120573
  批量获取哈希键值对
120380
120574
 
@@ -120392,33 +120586,77 @@ Defined in: [lib/kv.ts:654](https://github.com/maiyunnet/kebab/blob/master/lib/k
120392
120586
 
120393
120587
  ### hGetJson()
120394
120588
 
120589
+ #### Call Signature
120590
+
120395
120591
  > **hGetJson**(`key`, `field`): `Promise`\<`any`\>
120396
120592
 
120397
- Defined in: [lib/kv.ts:620](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L620)
120593
+ Defined in: [lib/kv.ts:638](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L638)
120398
120594
 
120399
- 获取哈希 json 对象
120595
+ 读取并解析哈希字段中的 JSON
120400
120596
 
120401
- #### Parameters
120597
+ ##### Parameters
120402
120598
 
120403
- ##### key
120599
+ ###### key
120404
120600
 
120405
120601
  `string`
120406
120602
 
120407
- ##### field
120603
+ 键
120604
+
120605
+ ###### field
120408
120606
 
120409
120607
  `string`
120410
120608
 
120411
- #### Returns
120609
+ 哈希字段
120610
+
120611
+ ##### Returns
120412
120612
 
120413
120613
  `Promise`\<`any`\>
120414
120614
 
120615
+ 解析结果,字段不存在、JSON 无效或值为 JSON false 时返回 null;读取失败返回 false
120616
+
120617
+ #### Call Signature
120618
+
120619
+ > **hGetJson**\<`T`\>(`key`, `field`): `Promise`\<`false` \| `T` \| `null`\>
120620
+
120621
+ Defined in: [lib/kv.ts:646](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L646)
120622
+
120623
+ 读取并解析哈希字段中的 JSON
120624
+
120625
+ ##### Type Parameters
120626
+
120627
+ ###### T
120628
+
120629
+ `T`
120630
+
120631
+ 预期的结果类型,解析时只检查 JSON 语法
120632
+
120633
+ ##### Parameters
120634
+
120635
+ ###### key
120636
+
120637
+ `string`
120638
+
120639
+ 键
120640
+
120641
+ ###### field
120642
+
120643
+ `string`
120644
+
120645
+ 哈希字段
120646
+
120647
+ ##### Returns
120648
+
120649
+ `Promise`\<`false` \| `T` \| `null`\>
120650
+
120651
+ 解析结果,字段不存在、JSON 无效或值为 JSON false 时返回 null;读取失败返回 false
120652
+
120415
120653
  ***
120416
120654
 
120417
120655
  ### hIncr()
120418
120656
 
120419
120657
  > **hIncr**(`key`, `field`, `increment`): `Promise`\<`number` \| `false`\>
120420
120658
 
120421
- Defined in: [lib/kv.ts:709](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L709)
120659
+ Defined in: [lib/kv.ts:736](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L736)
120422
120660
 
120423
120661
  设置哈希自增自减
120424
120662
 
@@ -120452,7 +120690,7 @@ key
120452
120690
 
120453
120691
  > **hKeys**(`key`): `Promise`\<`false` \| `string`[]\>
120454
120692
 
120455
- Defined in: [lib/kv.ts:731](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L731)
120693
+ Defined in: [lib/kv.ts:758](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L758)
120456
120694
 
120457
120695
  获取哈希所有字段
120458
120696
 
@@ -120472,7 +120710,7 @@ Defined in: [lib/kv.ts:731](https://github.com/maiyunnet/kebab/blob/master/lib/k
120472
120710
 
120473
120711
  > **hMGet**(`key`, `fields`): `Promise`\<`false` \| `Record`\<`string`, `string` \| `null`\>\>
120474
120712
 
120475
- Defined in: [lib/kv.ts:637](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L637)
120713
+ Defined in: [lib/kv.ts:664](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L664)
120476
120714
 
120477
120715
  批量获取哈希值
120478
120716
 
@@ -120496,7 +120734,7 @@ Defined in: [lib/kv.ts:637](https://github.com/maiyunnet/kebab/blob/master/lib/k
120496
120734
 
120497
120735
  > **hMSet**(`key`, `rows`): `Promise`\<`boolean`\>
120498
120736
 
120499
- Defined in: [lib/kv.ts:574](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L574)
120737
+ Defined in: [lib/kv.ts:591](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L591)
120500
120738
 
120501
120739
  批量设置哈希值
120502
120740
 
@@ -120524,7 +120762,7 @@ key / val 数组
120524
120762
 
120525
120763
  > **hSet**(`key`, `field`, `val`, `mod?`): `Promise`\<`boolean`\>
120526
120764
 
120527
- Defined in: [lib/kv.ts:548](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L548)
120765
+ Defined in: [lib/kv.ts:565](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L565)
120528
120766
 
120529
120767
  设置哈希表值
120530
120768
 
@@ -120564,7 +120802,7 @@ key 名
120564
120802
 
120565
120803
  > **incr**(`key`, `num?`): `Promise`\<`number` \| `false`\>
120566
120804
 
120567
- Defined in: [lib/kv.ts:388](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L388)
120805
+ Defined in: [lib/kv.ts:405](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L405)
120568
120806
 
120569
120807
  自增
120570
120808
 
@@ -120590,7 +120828,7 @@ Defined in: [lib/kv.ts:388](https://github.com/maiyunnet/kebab/blob/master/lib/k
120590
120828
 
120591
120829
  > **keys**(`pattern`): `Promise`\<`false` \| `string`[]\>
120592
120830
 
120593
- Defined in: [lib/kv.ts:461](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L461)
120831
+ Defined in: [lib/kv.ts:478](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L478)
120594
120832
 
120595
120833
  获取服务器上的所有 key 列表
120596
120834
 
@@ -120610,7 +120848,7 @@ Defined in: [lib/kv.ts:461](https://github.com/maiyunnet/kebab/blob/master/lib/k
120610
120848
 
120611
120849
  > **lLen**(`key`): `Promise`\<`number` \| `false`\>
120612
120850
 
120613
- Defined in: [lib/kv.ts:838](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L838)
120851
+ Defined in: [lib/kv.ts:865](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L865)
120614
120852
 
120615
120853
  #### Parameters
120616
120854
 
@@ -120628,7 +120866,7 @@ Defined in: [lib/kv.ts:838](https://github.com/maiyunnet/kebab/blob/master/lib/k
120628
120866
 
120629
120867
  > **lPop**(`key`): `Promise`\<`string` \| `false` \| `null`\>
120630
120868
 
120631
- Defined in: [lib/kv.ts:783](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L783)
120869
+ Defined in: [lib/kv.ts:810](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L810)
120632
120870
 
120633
120871
  #### Parameters
120634
120872
 
@@ -120646,7 +120884,7 @@ Defined in: [lib/kv.ts:783](https://github.com/maiyunnet/kebab/blob/master/lib/k
120646
120884
 
120647
120885
  > **lPush**(`key`, `values`): `Promise`\<`number` \| `false`\>
120648
120886
 
120649
- Defined in: [lib/kv.ts:744](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L744)
120887
+ Defined in: [lib/kv.ts:771](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L771)
120650
120888
 
120651
120889
  #### Parameters
120652
120890
 
@@ -120668,7 +120906,7 @@ Defined in: [lib/kv.ts:744](https://github.com/maiyunnet/kebab/blob/master/lib/k
120668
120906
 
120669
120907
  > **lRange**(`key`, `start`, `stop`): `Promise`\<`false` \| `string`[]\>
120670
120908
 
120671
- Defined in: [lib/kv.ts:825](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L825)
120909
+ Defined in: [lib/kv.ts:852](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L852)
120672
120910
 
120673
120911
  #### Parameters
120674
120912
 
@@ -120738,7 +120976,7 @@ key / val 数组
120738
120976
 
120739
120977
  > **ping**(): `Promise`\<`string` \| `false`\>
120740
120978
 
120741
- Defined in: [lib/kv.ts:528](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L528)
120979
+ Defined in: [lib/kv.ts:545](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L545)
120742
120980
 
120743
120981
  发送 ping
120744
120982
 
@@ -120846,7 +121084,7 @@ Defined in: [lib/kv.ts:137](https://github.com/maiyunnet/kebab/blob/master/lib/k
120846
121084
 
120847
121085
  > **rPop**(`key`): `Promise`\<`string` \| `false` \| `null`\>
120848
121086
 
120849
- Defined in: [lib/kv.ts:796](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L796)
121087
+ Defined in: [lib/kv.ts:823](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L823)
120850
121088
 
120851
121089
  #### Parameters
120852
121090
 
@@ -120864,7 +121102,7 @@ Defined in: [lib/kv.ts:796](https://github.com/maiyunnet/kebab/blob/master/lib/k
120864
121102
 
120865
121103
  > **rPush**(`key`, `values`): `Promise`\<`number` \| `false`\>
120866
121104
 
120867
- Defined in: [lib/kv.ts:757](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L757)
121105
+ Defined in: [lib/kv.ts:784](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L784)
120868
121106
 
120869
121107
  #### Parameters
120870
121108
 
@@ -120886,7 +121124,7 @@ Defined in: [lib/kv.ts:757](https://github.com/maiyunnet/kebab/blob/master/lib/k
120886
121124
 
120887
121125
  > **scan**(`cursor?`, `pattern?`, `count?`): `Promise`\<`false` \| `IScanResult`\<`string`\>\>
120888
121126
 
120889
- Defined in: [lib/kv.ts:487](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L487)
121127
+ Defined in: [lib/kv.ts:504](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L504)
120890
121128
 
120891
121129
  根据条件获取服务器上的 keys
120892
121130
 
@@ -120978,7 +121216,7 @@ Defined in: [lib/kv.ts:243](https://github.com/maiyunnet/kebab/blob/master/lib/k
120978
121216
 
120979
121217
  > **zAdd**(`key`, `score`, `member`): `Promise`\<`boolean`\>
120980
121218
 
120981
- Defined in: [lib/kv.ts:857](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L857)
121219
+ Defined in: [lib/kv.ts:884](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L884)
120982
121220
 
120983
121221
  添加有序集合元素(单个元素)
120984
121222
 
@@ -121010,7 +121248,7 @@ key 名
121010
121248
 
121011
121249
  > **zAdd**(`key`, `elements`, `options`): `Promise`\<`number` \| `false`\>
121012
121250
 
121013
- Defined in: [lib/kv.ts:864](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L864)
121251
+ Defined in: [lib/kv.ts:891](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L891)
121014
121252
 
121015
121253
  添加有序集合元素(多个元素,含 INCR 选项)
121016
121254
 
@@ -121042,7 +121280,7 @@ key 名
121042
121280
 
121043
121281
  > **zAdd**(`key`, `elements`, `options`): `Promise`\<`number` \| `false` \| `null`\>
121044
121282
 
121045
- Defined in: [lib/kv.ts:871](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L871)
121283
+ Defined in: [lib/kv.ts:898](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L898)
121046
121284
 
121047
121285
  添加有序集合元素(多个元素,含 INCR 选项,可空)
121048
121286
 
@@ -121074,7 +121312,7 @@ key 名
121074
121312
 
121075
121313
  > **zAdd**(`key`, `elements`, `options?`): `Promise`\<`number` \| `false`\>
121076
121314
 
121077
- Defined in: [lib/kv.ts:878](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L878)
121315
+ Defined in: [lib/kv.ts:905](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L905)
121078
121316
 
121079
121317
  添加有序集合元素(多个元素)
121080
121318
 
@@ -121108,7 +121346,7 @@ key 名
121108
121346
 
121109
121347
  > **zRangeWithScores**(`key`, `start`, `stop`, `options?`): `Promise`\<`false` \| `object`[]\>
121110
121348
 
121111
- Defined in: [lib/kv.ts:899](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L899)
121349
+ Defined in: [lib/kv.ts:926](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L926)
121112
121350
 
121113
121351
  #### Parameters
121114
121352
 
@@ -121138,7 +121376,7 @@ Defined in: [lib/kv.ts:899](https://github.com/maiyunnet/kebab/blob/master/lib/k
121138
121376
 
121139
121377
  > **zRem**(`key`, `members`): `Promise`\<`number` \| `false`\>
121140
121378
 
121141
- Defined in: [lib/kv.ts:924](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L924)
121379
+ Defined in: [lib/kv.ts:951](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L951)
121142
121380
 
121143
121381
  #### Parameters
121144
121382
 
@@ -121167,7 +121405,7 @@ lib/kv/functions/get.md
121167
121405
 
121168
121406
  > **get**(`ctrEtc`, `oetc?`): [`Kv`](../classes/Kv.md)
121169
121407
 
121170
- Defined in: [lib/kv.ts:985](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L985)
121408
+ Defined in: [lib/kv.ts:1012](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1012)
121171
121409
 
121172
121410
  获取 Kv 对象
121173
121411
 
@@ -121234,7 +121472,7 @@ lib/kv/interfaces/IConnectionInfo.md
121234
121472
 
121235
121473
  # Interface: IConnectionInfo
121236
121474
 
121237
- Defined in: [lib/kv.ts:1001](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1001)
121475
+ Defined in: [lib/kv.ts:1028](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1028)
121238
121476
 
121239
121477
  连接信息
121240
121478
 
@@ -121244,7 +121482,7 @@ Defined in: [lib/kv.ts:1001](https://github.com/maiyunnet/kebab/blob/master/lib/
121244
121482
 
121245
121483
  > **conn**: `ICommandClient`
121246
121484
 
121247
- Defined in: [lib/kv.ts:1005](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1005)
121485
+ Defined in: [lib/kv.ts:1032](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1032)
121248
121486
 
121249
121487
  ***
121250
121488
 
@@ -121252,7 +121490,7 @@ Defined in: [lib/kv.ts:1005](https://github.com/maiyunnet/kebab/blob/master/lib/
121252
121490
 
121253
121491
  > **host**: `string`
121254
121492
 
121255
- Defined in: [lib/kv.ts:1002](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1002)
121493
+ Defined in: [lib/kv.ts:1029](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1029)
121256
121494
 
121257
121495
  ***
121258
121496
 
@@ -121260,7 +121498,7 @@ Defined in: [lib/kv.ts:1002](https://github.com/maiyunnet/kebab/blob/master/lib/
121260
121498
 
121261
121499
  > **index**: `number`
121262
121500
 
121263
- Defined in: [lib/kv.ts:1004](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1004)
121501
+ Defined in: [lib/kv.ts:1031](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1031)
121264
121502
 
121265
121503
  ***
121266
121504
 
@@ -121268,7 +121506,7 @@ Defined in: [lib/kv.ts:1004](https://github.com/maiyunnet/kebab/blob/master/lib/
121268
121506
 
121269
121507
  > **port**: `number`
121270
121508
 
121271
- Defined in: [lib/kv.ts:1003](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1003)
121509
+ Defined in: [lib/kv.ts:1030](https://github.com/maiyunnet/kebab/blob/master/lib/kv.ts#L1030)
121272
121510
 
121273
121511
  lib/kv/interfaces/IZRangeOptions.md
121274
121512
  ---
@@ -128009,7 +128247,7 @@ lib/text/functions/int2str.md
128009
128247
 
128010
128248
  > **int2str**(`int`, `digits?`, `decimal?`): `string`
128011
128249
 
128012
- Defined in: [lib/text.ts:803](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L803)
128250
+ Defined in: [lib/text.ts:828](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L828)
128013
128251
 
128014
128252
  为解决精度问题,将整数转换为小数字符串
128015
128253
  以下几个示例都是当 digits 为 3、decimal 为 2 时
@@ -128142,7 +128380,7 @@ lib/text/functions/isFalsy.md
128142
128380
 
128143
128381
  > **isFalsy**(`val`): `val is TFalsy`
128144
128382
 
128145
- Defined in: [lib/text.ts:754](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L754)
128383
+ Defined in: [lib/text.ts:779](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L779)
128146
128384
 
128147
128385
  判断一个值是否是虚假的(为 null/undefined/空字符串/false/0)
128148
128386
 
@@ -128347,7 +128585,7 @@ lib/text/functions/isTruthy.md
128347
128585
 
128348
128586
  > **isTruthy**\<`T`\>(`val`): `val is Exclude<T, TFalsy>`
128349
128587
 
128350
- Defined in: [lib/text.ts:762](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L762)
128588
+ Defined in: [lib/text.ts:787](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L787)
128351
128589
 
128352
128590
  判断一个值是否是真实的(不为 null/undefined/空字符串/false/0)
128353
128591
 
@@ -128382,7 +128620,7 @@ lib/text/functions/logicalOr.md
128382
128620
 
128383
128621
  > **logicalOr**\<`T`, `T2`\>(`v1`, `v2`): `T` *extends* [`TFalsy`](../type-aliases/TFalsy.md) ? `T2` : `T`
128384
128622
 
128385
- Defined in: [lib/text.ts:771](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L771)
128623
+ Defined in: [lib/text.ts:796](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L796)
128386
128624
 
128387
128625
  类似 || 运算符的效果
128388
128626
 
@@ -128484,6 +128722,37 @@ Defined in: [lib/text.ts:346](https://github.com/maiyunnet/kebab/blob/master/lib
128484
128722
 
128485
128723
  `string`
128486
128724
 
128725
+ lib/text/functions/normalizeJsonObject.md
128726
+ ---
128727
+
128728
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
128729
+
128730
+ ***
128731
+
128732
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / normalizeJsonObject
128733
+
128734
+ # Function: normalizeJsonObject()
128735
+
128736
+ > **normalizeJsonObject**(`value`): `false` \| [`IJsonObject`](../interfaces/IJsonObject.md)
128737
+
128738
+ Defined in: [lib/text.ts:691](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L691)
128739
+
128740
+ 复制严格 JSON 对象,统一各层对象的键序,保留数组元素顺序
128741
+
128742
+ ## Parameters
128743
+
128744
+ ### value
128745
+
128746
+ `unknown`
128747
+
128748
+ 普通对象或无原型对象,各层只接受可枚举的自有字符串数据属性,数组须连续
128749
+
128750
+ ## Returns
128751
+
128752
+ `false` \| [`IJsonObject`](../interfaces/IJsonObject.md)
128753
+
128754
+ 无原型的对象副本;循环引用、非有限数字、访问器或其他非 JSON 值返回 false
128755
+
128487
128756
  lib/text/functions/parseDomain.md
128488
128757
  ---
128489
128758
 
@@ -128565,31 +128834,57 @@ lib/text/functions/parseJson.md
128565
128834
 
128566
128835
  # Function: parseJson()
128567
128836
 
128568
- > **parseJson**\<`T`\>(`str`): `false` \| `T`
128837
+ ## Call Signature
128838
+
128839
+ > **parseJson**(`str`): `any`
128569
128840
 
128570
128841
  Defined in: [lib/text.ts:666](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L666)
128571
128842
 
128572
- 解析 JSON,超出安全整数范围的整数字面量转换为 BigInt
128843
+ 解析 JSON,未指定类型时返回动态值
128573
128844
 
128574
- ## Type Parameters
128845
+ ### Parameters
128575
128846
 
128576
- ### T
128847
+ #### str
128848
+
128849
+ `string`
128850
+
128851
+ 要解析的 JSON 字符串
128852
+
128853
+ ### Returns
128854
+
128855
+ `any`
128856
+
128857
+ 解析结果,无效 JSON 返回 false;超出安全整数范围的整数字面量转换为 BigInt
128858
+
128859
+ ## Call Signature
128860
+
128861
+ > **parseJson**\<`T`\>(`str`): `false` \| `T`
128862
+
128863
+ Defined in: [lib/text.ts:673](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L673)
128864
+
128865
+ 解析 JSON,按调用方指定的类型返回结果
128866
+
128867
+ ### Type Parameters
128868
+
128869
+ #### T
128577
128870
 
128578
128871
  `T`
128579
128872
 
128580
- ## Parameters
128873
+ 预期的结果类型,解析时只检查 JSON 语法
128581
128874
 
128582
- ### str
128875
+ ### Parameters
128876
+
128877
+ #### str
128583
128878
 
128584
128879
  `string`
128585
128880
 
128586
- 要解析的 json 字符串
128881
+ 要解析的 JSON 字符串
128587
128882
 
128588
- ## Returns
128883
+ ### Returns
128589
128884
 
128590
128885
  `false` \| `T`
128591
128886
 
128592
- 解析结果,无效 JSON 返回 false;小数及指数形式仍为 number
128887
+ 解析结果,无效 JSON 返回 false;超出安全整数范围的整数字面量转换为 BigInt,小数及指数形式仍为 number
128593
128888
 
128594
128889
  lib/text/functions/parseUrl.md
128595
128890
  ---
@@ -128766,7 +129061,7 @@ lib/text/functions/redact.md
128766
129061
 
128767
129062
  > **redact**(`value`, `secrets`, `options?`): `string`
128768
129063
 
128769
- Defined in: [lib/text.ts:841](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L841)
129064
+ Defined in: [lib/text.ts:866](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L866)
128770
129065
 
128771
129066
  将文本中的指定敏感字符串替换为占位文本
128772
129067
 
@@ -128856,7 +129151,7 @@ lib/text/functions/str2int.md
128856
129151
 
128857
129152
  > **str2int**(`str`, `digits?`): `number`
128858
129153
 
128859
- Defined in: [lib/text.ts:785](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L785)
129154
+ Defined in: [lib/text.ts:810](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L810)
128860
129155
 
128861
129156
  为解决精度问题,将字符串数字转换为整数显示
128862
129157
  以下几个示例都是当 digits 为 2 时
@@ -128896,7 +129191,7 @@ lib/text/functions/stringifyBuffer.md
128896
129191
 
128897
129192
  > **stringifyBuffer**(`buf`): `string`
128898
129193
 
128899
- Defined in: [lib/text.ts:708](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L708)
129194
+ Defined in: [lib/text.ts:733](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L733)
128900
129195
 
128901
129196
  输出文本格式的 buffer
128902
129197
 
@@ -128925,7 +129220,7 @@ lib/text/functions/stringifyError.md
128925
129220
 
128926
129221
  > **stringifyError**(`error`): `string`
128927
129222
 
128928
- Defined in: [lib/text.ts:685](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L685)
129223
+ Defined in: [lib/text.ts:710](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L710)
128929
129224
 
128930
129225
  将未知异常转换为适合单行日志的文本,Error 优先返回完整堆栈
128931
129226
 
@@ -128956,7 +129251,7 @@ lib/text/functions/stringifyJson.md
128956
129251
 
128957
129252
  > **stringifyJson**(`obj`, `space?`): `string`
128958
129253
 
128959
- Defined in: [lib/text.ts:676](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L676)
129254
+ Defined in: [lib/text.ts:701](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L701)
128960
129255
 
128961
129256
  将对象转换为 JSON 字符串,BigInt 输出为整数字面量
128962
129257
 
@@ -129022,7 +129317,7 @@ lib/text/functions/trimJson.md
129022
129317
 
129023
129318
  > **trimJson**(`json`): `any`
129024
129319
 
129025
- Defined in: [lib/text.ts:716](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L716)
129320
+ Defined in: [lib/text.ts:741](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L741)
129026
129321
 
129027
129322
  递归删除 json 中的字符串首尾空格,会返回一个新的对象
129028
129323
 
@@ -129124,9 +129419,11 @@ lib/text/index.md
129124
129419
  ## Interfaces
129125
129420
 
129126
129421
  - [IDomain](interfaces/IDomain.md)
129422
+ - [IJsonObject](interfaces/IJsonObject.md)
129127
129423
 
129128
129424
  ## Type Aliases
129129
129425
 
129426
+ - [JsonValue](type-aliases/JsonValue.md)
129130
129427
  - [TFalsy](type-aliases/TFalsy.md)
129131
129428
 
129132
129429
  ## Variables
@@ -129158,6 +129455,7 @@ lib/text/index.md
129158
129455
  - [logicalOr](functions/logicalOr.md)
129159
129456
  - [match](functions/match.md)
129160
129457
  - [nlReplace](functions/nlReplace.md)
129458
+ - [normalizeJsonObject](functions/normalizeJsonObject.md)
129161
129459
  - [parseDomain](functions/parseDomain.md)
129162
129460
  - [parseHost](functions/parseHost.md)
129163
129461
  - [parseJson](functions/parseJson.md)
@@ -129223,6 +129521,42 @@ Defined in: [lib/text.ts:362](https://github.com/maiyunnet/kebab/blob/master/lib
129223
129521
 
129224
129522
  Defined in: [lib/text.ts:359](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L359)
129225
129523
 
129524
+ lib/text/interfaces/IJsonObject.md
129525
+ ---
129526
+
129527
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
129528
+
129529
+ ***
129530
+
129531
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / IJsonObject
129532
+
129533
+ # Interface: IJsonObject
129534
+
129535
+ Defined in: [lib/text.ts:682](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L682)
129536
+
129537
+ 字符串键和 JSON 值组成的对象
129538
+
129539
+ ## Indexable
129540
+
129541
+ > \[`key`: `string`\]: [`JsonValue`](../type-aliases/JsonValue.md)
129542
+
129543
+ lib/text/type-aliases/JsonValue.md
129544
+ ---
129545
+
129546
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
129547
+
129548
+ ***
129549
+
129550
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / JsonValue
129551
+
129552
+ # Type Alias: JsonValue
129553
+
129554
+ > **JsonValue** = `string` \| `number` \| `boolean` \| `null` \| `JsonValue`[] \| [`IJsonObject`](../interfaces/IJsonObject.md)
129555
+
129556
+ Defined in: [lib/text.ts:679](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L679)
129557
+
129558
+ 严格 JSON 对象的字段值
129559
+
129226
129560
  lib/text/type-aliases/TFalsy.md
129227
129561
  ---
129228
129562
 
@@ -129236,7 +129570,7 @@ lib/text/type-aliases/TFalsy.md
129236
129570
 
129237
129571
  > **TFalsy** = `false` \| `""` \| `0` \| `null` \| `undefined` \| *typeof* `NaN`
129238
129572
 
129239
- Defined in: [lib/text.ts:748](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L748)
129573
+ Defined in: [lib/text.ts:773](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L773)
129240
129574
 
129241
129575
  虚假值类型
129242
129576
 
@@ -130083,7 +130417,7 @@ lib/undici/functions/fetch.md
130083
130417
 
130084
130418
  > **fetch**(`input`, `init?`): `Promise`\<`Response`\>
130085
130419
 
130086
- Defined in: [lib/undici.ts:294](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L294)
130420
+ Defined in: [lib/undici.ts:331](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L331)
130087
130421
 
130088
130422
  发起一个完全兼容 fetch 的请求
130089
130423
 
@@ -130118,7 +130452,7 @@ lib/undici/functions/getFormData.md
130118
130452
 
130119
130453
  > **getFormData**(): [`FormData`](../formdata/classes/FormData.md)
130120
130454
 
130121
- Defined in: [lib/undici.ts:658](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L658)
130455
+ Defined in: [lib/undici.ts:695](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L695)
130122
130456
 
130123
130457
  创建 FormData 对象
130124
130458
 
@@ -130199,32 +130533,70 @@ lib/undici/functions/getResponseJson.md
130199
130533
 
130200
130534
  # Function: getResponseJson()
130201
130535
 
130536
+ ## Call Signature
130537
+
130202
130538
  > **getResponseJson**(`u`, `opt?`): `Promise`\<`any`\>
130203
130539
 
130204
- Defined in: [lib/undici.ts:282](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L282)
130540
+ Defined in: [lib/undici.ts:310](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L310)
130205
130541
 
130206
130542
  发起 GET 请求并解析 JSON 响应
130207
130543
 
130208
- ## Parameters
130544
+ ### Parameters
130209
130545
 
130210
- ### u
130546
+ #### u
130211
130547
 
130212
130548
  `string`
130213
130549
 
130214
130550
  网址
130215
130551
 
130216
- ### opt?
130552
+ #### opt?
130217
130553
 
130218
- [`IRequestOptions`](../interfaces/IRequestOptions.md) = `{}`
130554
+ [`IRequestOptions`](../interfaces/IRequestOptions.md)
130219
130555
 
130220
130556
  选项
130221
130557
 
130222
- ## Returns
130558
+ ### Returns
130223
130559
 
130224
130560
  `Promise`\<`any`\>
130225
130561
 
130226
130562
  最后一次响应的 JSON 数据,重试验证未通过也保留;请求或读取失败返回 null;JSON 解析失败返回 false
130227
130563
 
130564
+ ## Call Signature
130565
+
130566
+ > **getResponseJson**\<`T`\>(`u`, `opt?`): `Promise`\<`false` \| `T` \| `null`\>
130567
+
130568
+ Defined in: [lib/undici.ts:318](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L318)
130569
+
130570
+ 发起 GET 请求并解析 JSON 响应
130571
+
130572
+ ### Type Parameters
130573
+
130574
+ #### T
130575
+
130576
+ `T`
130577
+
130578
+ 预期的响应类型,解析时只检查 JSON 语法
130579
+
130580
+ ### Parameters
130581
+
130582
+ #### u
130583
+
130584
+ `string`
130585
+
130586
+ 网址
130587
+
130588
+ #### opt?
130589
+
130590
+ [`IRequestOptions`](../interfaces/IRequestOptions.md)
130591
+
130592
+ 选项
130593
+
130594
+ ### Returns
130595
+
130596
+ `Promise`\<`false` \| `T` \| `null`\>
130597
+
130598
+ 最后一次响应的 JSON 数据,重试验证未通过也保留;请求或读取失败返回 null;JSON 解析失败返回 false
130599
+
130228
130600
  lib/undici/functions/mproxyData.md
130229
130601
  ---
130230
130602
 
@@ -130238,7 +130610,7 @@ lib/undici/functions/mproxyData.md
130238
130610
 
130239
130611
  > **mproxyData**(`ctr`): `any`
130240
130612
 
130241
- Defined in: [lib/undici.ts:748](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L748)
130613
+ Defined in: [lib/undici.ts:785](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L785)
130242
130614
 
130243
130615
  获取 mproxy 的附加数据
130244
130616
 
@@ -130267,7 +130639,7 @@ lib/undici/functions/mproxy.md
130267
130639
 
130268
130640
  > **mproxy**(`ctr`, `auth`, `opt?`): `Promise`\<`number`\>
130269
130641
 
130270
- Defined in: [lib/undici.ts:682](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L682)
130642
+ Defined in: [lib/undici.ts:719](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L719)
130271
130643
 
130272
130644
  正向 mproxy 代理,注意提前处理不要自动处理 post 数据,读取 get 的 url 为实际请求地址
130273
130645
  get: url, auth
@@ -130375,38 +130747,82 @@ lib/undici/functions/postJsonResponseJson.md
130375
130747
 
130376
130748
  # Function: postJsonResponseJson()
130377
130749
 
130750
+ ## Call Signature
130751
+
130378
130752
  > **postJsonResponseJson**(`u`, `data`, `opt?`): `Promise`\<`any`\>
130379
130753
 
130380
130754
  Defined in: [lib/undici.ts:254](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L254)
130381
130755
 
130382
130756
  发起 JSON 请求并解析 JSON 响应
130383
130757
 
130384
- ## Parameters
130758
+ ### Parameters
130385
130759
 
130386
- ### u
130760
+ #### u
130387
130761
 
130388
130762
  `string`
130389
130763
 
130390
130764
  网址
130391
130765
 
130392
- ### data
130766
+ #### data
130393
130767
 
130394
130768
  `any`[] \| `Record`\<`string`, `any`\>
130395
130769
 
130396
130770
  数据
130397
130771
 
130398
- ### opt?
130772
+ #### opt?
130399
130773
 
130400
- [`IRequestOptions`](../interfaces/IRequestOptions.md) = `{}`
130774
+ [`IRequestOptions`](../interfaces/IRequestOptions.md)
130401
130775
 
130402
130776
  选项
130403
130777
 
130404
- ## Returns
130778
+ ### Returns
130405
130779
 
130406
130780
  `Promise`\<`any`\>
130407
130781
 
130408
130782
  最后一次响应的 JSON 数据,重试验证未通过也保留;请求或读取失败返回 null;JSON 解析失败返回 false
130409
130783
 
130784
+ ## Call Signature
130785
+
130786
+ > **postJsonResponseJson**\<`T`\>(`u`, `data`, `opt?`): `Promise`\<`false` \| `T` \| `null`\>
130787
+
130788
+ Defined in: [lib/undici.ts:265](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L265)
130789
+
130790
+ 发起 JSON 请求并解析 JSON 响应
130791
+
130792
+ ### Type Parameters
130793
+
130794
+ #### T
130795
+
130796
+ `T`
130797
+
130798
+ 预期的响应类型,解析时只检查 JSON 语法
130799
+
130800
+ ### Parameters
130801
+
130802
+ #### u
130803
+
130804
+ `string`
130805
+
130806
+ 网址
130807
+
130808
+ #### data
130809
+
130810
+ `any`[] \| `Record`\<`string`, `any`\>
130811
+
130812
+ 数据
130813
+
130814
+ #### opt?
130815
+
130816
+ [`IRequestOptions`](../interfaces/IRequestOptions.md)
130817
+
130818
+ 选项
130819
+
130820
+ ### Returns
130821
+
130822
+ `Promise`\<`false` \| `T` \| `null`\>
130823
+
130824
+ 最后一次响应的 JSON 数据,重试验证未通过也保留;请求或读取失败返回 null;JSON 解析失败返回 false
130825
+
130410
130826
  lib/undici/functions/post.md
130411
130827
  ---
130412
130828
 
@@ -130459,38 +130875,82 @@ lib/undici/functions/postResponseJson.md
130459
130875
 
130460
130876
  # Function: postResponseJson()
130461
130877
 
130878
+ ## Call Signature
130879
+
130462
130880
  > **postResponseJson**(`u`, `data`, `opt?`): `Promise`\<`any`\>
130463
130881
 
130464
- Defined in: [lib/undici.ts:269](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L269)
130882
+ Defined in: [lib/undici.ts:283](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L283)
130465
130883
 
130466
130884
  发起 POST 请求并解析 JSON 响应
130467
130885
 
130468
- ## Parameters
130886
+ ### Parameters
130469
130887
 
130470
- ### u
130888
+ #### u
130471
130889
 
130472
130890
  `string`
130473
130891
 
130474
130892
  网址
130475
130893
 
130476
- ### data
130894
+ #### data
130477
130895
 
130478
130896
  `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>
130479
130897
 
130480
130898
  数据
130481
130899
 
130482
- ### opt?
130900
+ #### opt?
130483
130901
 
130484
- [`IRequestOptions`](../interfaces/IRequestOptions.md) = `{}`
130902
+ [`IRequestOptions`](../interfaces/IRequestOptions.md)
130485
130903
 
130486
130904
  选项
130487
130905
 
130488
- ## Returns
130906
+ ### Returns
130489
130907
 
130490
130908
  `Promise`\<`any`\>
130491
130909
 
130492
130910
  最后一次响应的 JSON 数据,重试验证未通过也保留;请求或读取失败返回 null;JSON 解析失败返回 false
130493
130911
 
130912
+ ## Call Signature
130913
+
130914
+ > **postResponseJson**\<`T`\>(`u`, `data`, `opt?`): `Promise`\<`false` \| `T` \| `null`\>
130915
+
130916
+ Defined in: [lib/undici.ts:294](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L294)
130917
+
130918
+ 发起 POST 请求并解析 JSON 响应
130919
+
130920
+ ### Type Parameters
130921
+
130922
+ #### T
130923
+
130924
+ `T`
130925
+
130926
+ 预期的响应类型,解析时只检查 JSON 语法
130927
+
130928
+ ### Parameters
130929
+
130930
+ #### u
130931
+
130932
+ `string`
130933
+
130934
+ 网址
130935
+
130936
+ #### data
130937
+
130938
+ `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>
130939
+
130940
+ 数据
130941
+
130942
+ #### opt?
130943
+
130944
+ [`IRequestOptions`](../interfaces/IRequestOptions.md)
130945
+
130946
+ 选项
130947
+
130948
+ ### Returns
130949
+
130950
+ `Promise`\<`false` \| `T` \| `null`\>
130951
+
130952
+ 最后一次响应的 JSON 数据,重试验证未通过也保留;请求或读取失败返回 null;JSON 解析失败返回 false
130953
+
130494
130954
  lib/undici/functions/request.md
130495
130955
  ---
130496
130956
 
@@ -130504,7 +130964,7 @@ lib/undici/functions/request.md
130504
130964
 
130505
130965
  > **request**(`u`, `data?`, `opt?`): `Promise`\<[`Response`](../response/classes/Response.md)\>
130506
130966
 
130507
- Defined in: [lib/undici.ts:472](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L472)
130967
+ Defined in: [lib/undici.ts:509](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L509)
130508
130968
 
130509
130969
  发起一个请求
130510
130970
 
@@ -130541,7 +131001,7 @@ lib/undici/functions/rproxy.md
130541
131001
 
130542
131002
  > **rproxy**(`ctr`, `route`, `opt?`): `Promise`\<`boolean`\>
130543
131003
 
130544
- Defined in: [lib/undici.ts:778](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L778)
131004
+ Defined in: [lib/undici.ts:815](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L815)
130545
131005
 
130546
131006
  反向代理,将本服务器的某个路由反代到其他网址
130547
131007
 
@@ -130633,7 +131093,7 @@ lib/undici/interfaces/IMproxyOptions.md
130633
131093
 
130634
131094
  # Interface: IMproxyOptions
130635
131095
 
130636
- Defined in: [lib/undici.ts:924](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L924)
131096
+ Defined in: [lib/undici.ts:961](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L961)
130637
131097
 
130638
131098
  正向代理请求的传入参数选项
130639
131099
 
@@ -130643,7 +131103,7 @@ Defined in: [lib/undici.ts:924](https://github.com/maiyunnet/kebab/blob/master/l
130643
131103
 
130644
131104
  > `optional` **filter?**: (`h`) => `boolean`
130645
131105
 
130646
- Defined in: [lib/undici.ts:939](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L939)
131106
+ Defined in: [lib/undici.ts:976](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L976)
130647
131107
 
130648
131108
  过滤 header,返回 true 则留下
130649
131109
 
@@ -130663,7 +131123,7 @@ Defined in: [lib/undici.ts:939](https://github.com/maiyunnet/kebab/blob/master/l
130663
131123
 
130664
131124
  > `optional` **follow?**: `number`
130665
131125
 
130666
- Defined in: [lib/undici.ts:929](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L929)
131126
+ Defined in: [lib/undici.ts:966](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L966)
130667
131127
 
130668
131128
  ***
130669
131129
 
@@ -130671,7 +131131,7 @@ Defined in: [lib/undici.ts:929](https://github.com/maiyunnet/kebab/blob/master/l
130671
131131
 
130672
131132
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
130673
131133
 
130674
- Defined in: [lib/undici.ts:933](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L933)
131134
+ Defined in: [lib/undici.ts:970](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L970)
130675
131135
 
130676
131136
  ***
130677
131137
 
@@ -130679,7 +131139,7 @@ Defined in: [lib/undici.ts:933](https://github.com/maiyunnet/kebab/blob/master/l
130679
131139
 
130680
131140
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
130681
131141
 
130682
- Defined in: [lib/undici.ts:931](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L931)
131142
+ Defined in: [lib/undici.ts:968](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L968)
130683
131143
 
130684
131144
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
130685
131145
 
@@ -130689,7 +131149,7 @@ Defined in: [lib/undici.ts:931](https://github.com/maiyunnet/kebab/blob/master/l
130689
131149
 
130690
131150
  > `optional` **keepAliveTimeout?**: `number`
130691
131151
 
130692
- Defined in: [lib/undici.ts:935](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L935)
131152
+ Defined in: [lib/undici.ts:972](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L972)
130693
131153
 
130694
131154
  空闲连接允许复用的最长秒数;非正数或无效值按未设置处理;默认无服务端提示时为 4 秒,有提示时采用提示值减 2 秒且最多 600 秒
130695
131155
 
@@ -130699,7 +131159,7 @@ Defined in: [lib/undici.ts:935](https://github.com/maiyunnet/kebab/blob/master/l
130699
131159
 
130700
131160
  > `optional` **local?**: `string`
130701
131161
 
130702
- Defined in: [lib/undici.ts:932](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L932)
131162
+ Defined in: [lib/undici.ts:969](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L969)
130703
131163
 
130704
131164
  ***
130705
131165
 
@@ -130707,7 +131167,7 @@ Defined in: [lib/undici.ts:932](https://github.com/maiyunnet/kebab/blob/master/l
130707
131167
 
130708
131168
  > `optional` **proxyMode?**: `"request"` \| `"passthrough"`
130709
131169
 
130710
- Defined in: [lib/undici.ts:926](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L926)
131170
+ Defined in: [lib/undici.ts:963](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L963)
130711
131171
 
130712
131172
  默认 passthrough 保留已有来源头;request 清理来源头;两者均使用目标 Host
130713
131173
 
@@ -130717,7 +131177,7 @@ Defined in: [lib/undici.ts:926](https://github.com/maiyunnet/kebab/blob/master/l
130717
131177
 
130718
131178
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
130719
131179
 
130720
- Defined in: [lib/undici.ts:941](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L941)
131180
+ Defined in: [lib/undici.ts:978](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L978)
130721
131181
 
130722
131182
  默认为 default
130723
131183
 
@@ -130727,7 +131187,7 @@ Defined in: [lib/undici.ts:941](https://github.com/maiyunnet/kebab/blob/master/l
130727
131187
 
130728
131188
  > `optional` **reuseTimeout?**: `number`
130729
131189
 
130730
- Defined in: [lib/undici.ts:937](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L937)
131190
+ Defined in: [lib/undici.ts:974](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L974)
130731
131191
 
130732
131192
  连接建立后允许承接新请求的最长秒数;非正数或无效值按未设置处理;达到后不再复用但不会中断在途请求,默认不限制
130733
131193
 
@@ -130737,7 +131197,7 @@ Defined in: [lib/undici.ts:937](https://github.com/maiyunnet/kebab/blob/master/l
130737
131197
 
130738
131198
  > `optional` **timeout?**: `number`
130739
131199
 
130740
- Defined in: [lib/undici.ts:928](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L928)
131200
+ Defined in: [lib/undici.ts:965](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L965)
130741
131201
 
130742
131202
  秒数,默认 300 秒
130743
131203
 
@@ -130752,7 +131212,7 @@ lib/undici/interfaces/IRequestOptions.md
130752
131212
 
130753
131213
  # Interface: IRequestOptions
130754
131214
 
130755
- Defined in: [lib/undici.ts:881](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L881)
131215
+ Defined in: [lib/undici.ts:918](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L918)
130756
131216
 
130757
131217
  请求的传入参数选项
130758
131218
 
@@ -130762,7 +131222,7 @@ Defined in: [lib/undici.ts:881](https://github.com/maiyunnet/kebab/blob/master/l
130762
131222
 
130763
131223
  > `optional` **cookie?**: `Record`\<`string`, [`ICookie`](../../cookie/interfaces/ICookie.md)\>
130764
131224
 
130765
- Defined in: [lib/undici.ts:916](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L916)
131225
+ Defined in: [lib/undici.ts:953](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L953)
130766
131226
 
130767
131227
  cookie 托管对象
130768
131228
 
@@ -130772,7 +131232,7 @@ cookie 托管对象
130772
131232
 
130773
131233
  > `optional` **follow?**: `number`
130774
131234
 
130775
- Defined in: [lib/undici.ts:893](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L893)
131235
+ Defined in: [lib/undici.ts:930](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L930)
130776
131236
 
130777
131237
  追踪 location 次数,0 为不追踪,默认为 0
130778
131238
 
@@ -130782,7 +131242,7 @@ Defined in: [lib/undici.ts:893](https://github.com/maiyunnet/kebab/blob/master/l
130782
131242
 
130783
131243
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
130784
131244
 
130785
- Defined in: [lib/undici.ts:898](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L898)
131245
+ Defined in: [lib/undici.ts:935](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L935)
130786
131246
 
130787
131247
  ***
130788
131248
 
@@ -130790,7 +131250,7 @@ Defined in: [lib/undici.ts:898](https://github.com/maiyunnet/kebab/blob/master/l
130790
131250
 
130791
131251
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
130792
131252
 
130793
- Defined in: [lib/undici.ts:895](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L895)
131253
+ Defined in: [lib/undici.ts:932](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L932)
130794
131254
 
130795
131255
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
130796
131256
 
@@ -130800,7 +131260,7 @@ Defined in: [lib/undici.ts:895](https://github.com/maiyunnet/kebab/blob/master/l
130800
131260
 
130801
131261
  > `optional` **keep?**: `boolean`
130802
131262
 
130803
- Defined in: [lib/undici.ts:908](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L908)
131263
+ Defined in: [lib/undici.ts:945](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L945)
130804
131264
 
130805
131265
  连接是否保持长连接(即是否允许复用),默认为 true
130806
131266
 
@@ -130810,7 +131270,7 @@ Defined in: [lib/undici.ts:908](https://github.com/maiyunnet/kebab/blob/master/l
130810
131270
 
130811
131271
  > `optional` **keepAliveTimeout?**: `number`
130812
131272
 
130813
- Defined in: [lib/undici.ts:910](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L910)
131273
+ Defined in: [lib/undici.ts:947](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L947)
130814
131274
 
130815
131275
  空闲连接允许复用的最长秒数;非正数或无效值按未设置处理;默认无服务端提示时为 4 秒,有提示时采用提示值减 2 秒且最多 600 秒;自定义 Agent 由其自身配置
130816
131276
 
@@ -130820,7 +131280,7 @@ Defined in: [lib/undici.ts:910](https://github.com/maiyunnet/kebab/blob/master/l
130820
131280
 
130821
131281
  > `optional` **local?**: `string`
130822
131282
 
130823
- Defined in: [lib/undici.ts:897](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L897)
131283
+ Defined in: [lib/undici.ts:934](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L934)
130824
131284
 
130825
131285
  ***
130826
131286
 
@@ -130828,7 +131288,7 @@ Defined in: [lib/undici.ts:897](https://github.com/maiyunnet/kebab/blob/master/l
130828
131288
 
130829
131289
  > `optional` **log?**: `boolean`
130830
131290
 
130831
- Defined in: [lib/undici.ts:918](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L918)
131291
+ Defined in: [lib/undici.ts:955](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L955)
130832
131292
 
130833
131293
  若有异常写入文件日志,默认为 true
130834
131294
 
@@ -130838,7 +131298,7 @@ Defined in: [lib/undici.ts:918](https://github.com/maiyunnet/kebab/blob/master/l
130838
131298
 
130839
131299
  > `optional` **method?**: `"GET"` \| `"POST"` \| `"PUT"` \| `"DELETE"` \| `"OPTIONS"`
130840
131300
 
130841
- Defined in: [lib/undici.ts:882](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L882)
131301
+ Defined in: [lib/undici.ts:919](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L919)
130842
131302
 
130843
131303
  ***
130844
131304
 
@@ -130846,7 +131306,7 @@ Defined in: [lib/undici.ts:882](https://github.com/maiyunnet/kebab/blob/master/l
130846
131306
 
130847
131307
  > `optional` **mproxy?**: `object`
130848
131308
 
130849
- Defined in: [lib/undici.ts:900](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L900)
131309
+ Defined in: [lib/undici.ts:937](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L937)
130850
131310
 
130851
131311
  正向 mproxy 代理,url 如 https://xxx/abc
130852
131312
 
@@ -130874,7 +131334,7 @@ Defined in: [lib/undici.ts:900](https://github.com/maiyunnet/kebab/blob/master/l
130874
131334
 
130875
131335
  > `optional` **retry?**: `number`
130876
131336
 
130877
- Defined in: [lib/undici.ts:887](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L887)
131337
+ Defined in: [lib/undici.ts:924](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L924)
130878
131338
 
130879
131339
  网络异常后的重试次数,默认 0;流式请求体不可重试,非幂等请求需由调用方保证安全
130880
131340
 
@@ -130884,7 +131344,7 @@ Defined in: [lib/undici.ts:887](https://github.com/maiyunnet/kebab/blob/master/l
130884
131344
 
130885
131345
  > `optional` **retryJson?**: `number`
130886
131346
 
130887
- Defined in: [lib/undici.ts:889](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L889)
131347
+ Defined in: [lib/undici.ts:926](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L926)
130888
131348
 
130889
131349
  JSON 解析失败或重试验证未通过后的重试次数,默认 0;仅适用于 ResponseJson 快捷方法,非幂等请求需由调用方保证安全
130890
131350
 
@@ -130894,7 +131354,7 @@ JSON 解析失败或重试验证未通过后的重试次数,默认 0;仅适
130894
131354
 
130895
131355
  > `optional` **retryJsonHandler?**: (`json`) => `boolean`
130896
131356
 
130897
- Defined in: [lib/undici.ts:891](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L891)
131357
+ Defined in: [lib/undici.ts:928](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L928)
130898
131358
 
130899
131359
  JSON 重试验证方法;返回 false 时按 retryJson 的设置重试,耗尽后仍返回最后一次解析结果,业务结果由调用方判断;仅适用于 ResponseJson 快捷方法
130900
131360
 
@@ -130914,7 +131374,7 @@ JSON 重试验证方法;返回 false 时按 retryJson 的设置重试,耗尽
130914
131374
 
130915
131375
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
130916
131376
 
130917
- Defined in: [lib/undici.ts:914](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L914)
131377
+ Defined in: [lib/undici.ts:951](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L951)
130918
131378
 
130919
131379
  复用池名/Agent,默认为 default
130920
131380
 
@@ -130924,7 +131384,7 @@ Defined in: [lib/undici.ts:914](https://github.com/maiyunnet/kebab/blob/master/l
130924
131384
 
130925
131385
  > `optional` **reuseTimeout?**: `number`
130926
131386
 
130927
- Defined in: [lib/undici.ts:912](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L912)
131387
+ Defined in: [lib/undici.ts:949](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L949)
130928
131388
 
130929
131389
  连接建立后允许承接新请求的最长秒数;非正数或无效值按未设置处理;达到后不再复用但不会中断在途请求,默认不限制;自定义 Agent 由其自身配置
130930
131390
 
@@ -130934,7 +131394,7 @@ Defined in: [lib/undici.ts:912](https://github.com/maiyunnet/kebab/blob/master/l
130934
131394
 
130935
131395
  > `optional` **save?**: `string`
130936
131396
 
130937
- Defined in: [lib/undici.ts:896](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L896)
131397
+ Defined in: [lib/undici.ts:933](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L933)
130938
131398
 
130939
131399
  ***
130940
131400
 
@@ -130942,7 +131402,7 @@ Defined in: [lib/undici.ts:896](https://github.com/maiyunnet/kebab/blob/master/l
130942
131402
 
130943
131403
  > `optional` **signal?**: `AbortSignal`
130944
131404
 
130945
- Defined in: [lib/undici.ts:920](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L920)
131405
+ Defined in: [lib/undici.ts:957](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L957)
130946
131406
 
130947
131407
  请求中止信号
130948
131408
 
@@ -130952,7 +131412,7 @@ Defined in: [lib/undici.ts:920](https://github.com/maiyunnet/kebab/blob/master/l
130952
131412
 
130953
131413
  > `optional` **timeout?**: `number`
130954
131414
 
130955
- Defined in: [lib/undici.ts:885](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L885)
131415
+ Defined in: [lib/undici.ts:922](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L922)
130956
131416
 
130957
131417
  秒数,默认 300 秒
130958
131418
 
@@ -130962,7 +131422,7 @@ Defined in: [lib/undici.ts:885](https://github.com/maiyunnet/kebab/blob/master/l
130962
131422
 
130963
131423
  > `optional` **type?**: `"form"` \| `"json"`
130964
131424
 
130965
- Defined in: [lib/undici.ts:883](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L883)
131425
+ Defined in: [lib/undici.ts:920](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L920)
130966
131426
 
130967
131427
  lib/undici/interfaces/IRproxyOptions.md
130968
131428
  ---
@@ -130975,7 +131435,7 @@ lib/undici/interfaces/IRproxyOptions.md
130975
131435
 
130976
131436
  # Interface: IRproxyOptions
130977
131437
 
130978
- Defined in: [lib/undici.ts:945](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L945)
131438
+ Defined in: [lib/undici.ts:982](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L982)
130979
131439
 
130980
131440
  反向代理请求的传入参数选项
130981
131441
 
@@ -130989,7 +131449,7 @@ Defined in: [lib/undici.ts:945](https://github.com/maiyunnet/kebab/blob/master/l
130989
131449
 
130990
131450
  > `optional` **body?**: `string` \| `Buffer`\<`ArrayBufferLike`\> \| `Readable`
130991
131451
 
130992
- Defined in: [lib/undici.ts:968](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L968)
131452
+ Defined in: [lib/undici.ts:1005](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L1005)
130993
131453
 
130994
131454
  手动传入请求体(优先于原始 req 流),用于 req 流已消费后仍需转发 body 的场景
130995
131455
 
@@ -130999,7 +131459,7 @@ Defined in: [lib/undici.ts:968](https://github.com/maiyunnet/kebab/blob/master/l
130999
131459
 
131000
131460
  > `optional` **filter?**: (`h`) => `boolean`
131001
131461
 
131002
- Defined in: [lib/undici.ts:958](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L958)
131462
+ Defined in: [lib/undici.ts:995](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L995)
131003
131463
 
131004
131464
  过滤 header,返回 true 则留下
131005
131465
 
@@ -131019,7 +131479,7 @@ Defined in: [lib/undici.ts:958](https://github.com/maiyunnet/kebab/blob/master/l
131019
131479
 
131020
131480
  > `optional` **follow?**: `number`
131021
131481
 
131022
- Defined in: [lib/undici.ts:948](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L948)
131482
+ Defined in: [lib/undici.ts:985](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L985)
131023
131483
 
131024
131484
  ***
131025
131485
 
@@ -131027,7 +131487,7 @@ Defined in: [lib/undici.ts:948](https://github.com/maiyunnet/kebab/blob/master/l
131027
131487
 
131028
131488
  > `optional` **headers?**: [`THttpHeaders`](../type-aliases/THttpHeaders.md)
131029
131489
 
131030
- Defined in: [lib/undici.ts:952](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L952)
131490
+ Defined in: [lib/undici.ts:989](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L989)
131031
131491
 
131032
131492
  ***
131033
131493
 
@@ -131035,7 +131495,7 @@ Defined in: [lib/undici.ts:952](https://github.com/maiyunnet/kebab/blob/master/l
131035
131495
 
131036
131496
  > `optional` **hosts?**: `string` \| `Record`\<`string`, `string`\>
131037
131497
 
131038
- Defined in: [lib/undici.ts:950](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L950)
131498
+ Defined in: [lib/undici.ts:987](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L987)
131039
131499
 
131040
131500
  自定义 host 映射,如 {'www.maiyun.net': '127.0.0.1'},或全部映射到一个 host
131041
131501
 
@@ -131045,7 +131505,7 @@ Defined in: [lib/undici.ts:950](https://github.com/maiyunnet/kebab/blob/master/l
131045
131505
 
131046
131506
  > `optional` **keepAliveTimeout?**: `number`
131047
131507
 
131048
- Defined in: [lib/undici.ts:954](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L954)
131508
+ Defined in: [lib/undici.ts:991](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L991)
131049
131509
 
131050
131510
  空闲连接允许复用的最长秒数;非正数或无效值按未设置处理;默认无服务端提示时为 4 秒,有提示时采用提示值减 2 秒且最多 600 秒
131051
131511
 
@@ -131055,7 +131515,7 @@ Defined in: [lib/undici.ts:954](https://github.com/maiyunnet/kebab/blob/master/l
131055
131515
 
131056
131516
  > `optional` **local?**: `string`
131057
131517
 
131058
- Defined in: [lib/undici.ts:951](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L951)
131518
+ Defined in: [lib/undici.ts:988](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L988)
131059
131519
 
131060
131520
  ***
131061
131521
 
@@ -131063,7 +131523,7 @@ Defined in: [lib/undici.ts:951](https://github.com/maiyunnet/kebab/blob/master/l
131063
131523
 
131064
131524
  > `optional` **mproxy?**: `object`
131065
131525
 
131066
- Defined in: [lib/undici.ts:960](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L960)
131526
+ Defined in: [lib/undici.ts:997](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L997)
131067
131527
 
131068
131528
  正向 mproxy 代理,url 如 https://xxx/abc
131069
131529
 
@@ -131108,7 +131568,7 @@ reverse 的协议和 IP 仅取实际连接,不信任来路代理头;可信
131108
131568
 
131109
131569
  > `optional` **querys?**: `Record`\<`string`, `any`\>
131110
131570
 
131111
- Defined in: [lib/undici.ts:970](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L970)
131571
+ Defined in: [lib/undici.ts:1007](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L1007)
131112
131572
 
131113
131573
  自定义 GET 查询参数,传入后直接替换代理目标 URL 的整个 query string
131114
131574
 
@@ -131118,7 +131578,7 @@ Defined in: [lib/undici.ts:970](https://github.com/maiyunnet/kebab/blob/master/l
131118
131578
 
131119
131579
  > `optional` **reuse?**: `string` \| `Agent` \| `ProxyAgent`
131120
131580
 
131121
- Defined in: [lib/undici.ts:972](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L972)
131581
+ Defined in: [lib/undici.ts:1009](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L1009)
131122
131582
 
131123
131583
  默认为 default
131124
131584
 
@@ -131128,7 +131588,7 @@ Defined in: [lib/undici.ts:972](https://github.com/maiyunnet/kebab/blob/master/l
131128
131588
 
131129
131589
  > `optional` **reuseTimeout?**: `number`
131130
131590
 
131131
- Defined in: [lib/undici.ts:956](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L956)
131591
+ Defined in: [lib/undici.ts:993](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L993)
131132
131592
 
131133
131593
  连接建立后允许承接新请求的最长秒数;非正数或无效值按未设置处理;达到后不再复用但不会中断在途请求,默认不限制
131134
131594
 
@@ -131138,7 +131598,7 @@ Defined in: [lib/undici.ts:956](https://github.com/maiyunnet/kebab/blob/master/l
131138
131598
 
131139
131599
  > `optional` **timeout?**: `number`
131140
131600
 
131141
- Defined in: [lib/undici.ts:947](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L947)
131601
+ Defined in: [lib/undici.ts:984](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L984)
131142
131602
 
131143
131603
  秒数,默认 300 秒
131144
131604
 
@@ -131673,7 +132133,7 @@ lib/undici/response/classes/Response.md
131673
132133
 
131674
132134
  # Class: Response
131675
132135
 
131676
- Defined in: [lib/undici/response.ts:13](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L13)
132136
+ Defined in: [lib/undici/response.ts:14](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L14)
131677
132137
 
131678
132138
  ## Constructors
131679
132139
 
@@ -131681,7 +132141,7 @@ Defined in: [lib/undici/response.ts:13](https://github.com/maiyunnet/kebab/blob/
131681
132141
 
131682
132142
  > **new Response**(`req`): `Response`
131683
132143
 
131684
- Defined in: [lib/undici/response.ts:26](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L26)
132144
+ Defined in: [lib/undici/response.ts:27](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L27)
131685
132145
 
131686
132146
  #### Parameters
131687
132147
 
@@ -131699,7 +132159,7 @@ Defined in: [lib/undici/response.ts:26](https://github.com/maiyunnet/kebab/blob/
131699
132159
 
131700
132160
  > **error**: `Error` \| `null` = `null`
131701
132161
 
131702
- Defined in: [lib/undici/response.ts:21](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L21)
132162
+ Defined in: [lib/undici/response.ts:22](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L22)
131703
132163
 
131704
132164
  ***
131705
132165
 
@@ -131707,7 +132167,7 @@ Defined in: [lib/undici/response.ts:21](https://github.com/maiyunnet/kebab/blob/
131707
132167
 
131708
132168
  > **headers**: [`THttpHeaders`](../../type-aliases/THttpHeaders.md) \| `null` = `null`
131709
132169
 
131710
- Defined in: [lib/undici/response.ts:19](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L19)
132170
+ Defined in: [lib/undici/response.ts:20](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L20)
131711
132171
 
131712
132172
  返回的 headers
131713
132173
 
@@ -131717,7 +132177,7 @@ Defined in: [lib/undici/response.ts:19](https://github.com/maiyunnet/kebab/blob/
131717
132177
 
131718
132178
  > **getContent**(): `Promise`\<`Buffer`\<`ArrayBufferLike`\> \| `null`\>
131719
132179
 
131720
- Defined in: [lib/undici/response.ts:33](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L33)
132180
+ Defined in: [lib/undici/response.ts:34](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L34)
131721
132181
 
131722
132182
  读取所有内容到内存
131723
132183
 
@@ -131729,23 +132189,49 @@ Defined in: [lib/undici/response.ts:33](https://github.com/maiyunnet/kebab/blob/
131729
132189
 
131730
132190
  ### getJson()
131731
132191
 
132192
+ #### Call Signature
132193
+
131732
132194
  > **getJson**(): `Promise`\<`any`\>
131733
132195
 
131734
- Defined in: [lib/undici/response.ts:67](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L67)
132196
+ Defined in: [lib/undici/response.ts:71](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L71)
131735
132197
 
131736
- 读取所有内容为 JSON,失败返回 null
132198
+ 读取并解析 JSON 响应
131737
132199
 
131738
- #### Returns
132200
+ ##### Returns
131739
132201
 
131740
132202
  `Promise`\<`any`\>
131741
132203
 
132204
+ 解析结果,响应为空或读取失败返回 null,JSON 解析失败返回 false
132205
+
132206
+ #### Call Signature
132207
+
132208
+ > **getJson**\<`T`\>(): `Promise`\<`false` \| `T` \| `null`\>
132209
+
132210
+ Defined in: [lib/undici/response.ts:77](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L77)
132211
+
132212
+ 读取并解析 JSON 响应
132213
+
132214
+ ##### Type Parameters
132215
+
132216
+ ###### T
132217
+
132218
+ `T`
132219
+
132220
+ 预期的响应类型,解析时只检查 JSON 语法
132221
+
132222
+ ##### Returns
132223
+
132224
+ `Promise`\<`false` \| `T` \| `null`\>
132225
+
132226
+ 解析结果,响应为空或读取失败返回 null,JSON 解析失败返回 false
132227
+
131742
132228
  ***
131743
132229
 
131744
132230
  ### getRawStream()
131745
132231
 
131746
132232
  > **getRawStream**(): `BodyReadable` & `BodyMixin` \| `null`
131747
132233
 
131748
- Defined in: [lib/undici/response.ts:127](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L127)
132234
+ Defined in: [lib/undici/response.ts:138](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L138)
131749
132235
 
131750
132236
  获取原生响应读取流对象
131751
132237
 
@@ -131759,7 +132245,7 @@ Defined in: [lib/undici/response.ts:127](https://github.com/maiyunnet/kebab/blob
131759
132245
 
131760
132246
  > **getStream**(): `BrotliDecompress` \| `Gunzip` \| `Inflate` \| `BodyReadable` & `BodyMixin` \| `null`
131761
132247
 
131762
- Defined in: [lib/undici/response.ts:92](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L92)
132248
+ Defined in: [lib/undici/response.ts:103](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L103)
131763
132249
 
131764
132250
  获取响应读取流对象
131765
132251
 
@@ -131773,7 +132259,7 @@ Defined in: [lib/undici/response.ts:92](https://github.com/maiyunnet/kebab/blob/
131773
132259
 
131774
132260
  > **getText**(): `Promise`\<`string` \| `null`\>
131775
132261
 
131776
- Defined in: [lib/undici/response.ts:52](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L52)
132262
+ Defined in: [lib/undici/response.ts:53](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L53)
131777
132263
 
131778
132264
  读取所有内容为文本
131779
132265
 
@@ -131787,7 +132273,7 @@ Defined in: [lib/undici/response.ts:52](https://github.com/maiyunnet/kebab/blob/
131787
132273
 
131788
132274
  > **setContent**(`v`): `void`
131789
132275
 
131790
- Defined in: [lib/undici/response.ts:85](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L85)
132276
+ Defined in: [lib/undici/response.ts:96](https://github.com/maiyunnet/kebab/blob/master/lib/undici/response.ts#L96)
131791
132277
 
131792
132278
  用户自定义的 content 内容
131793
132279
 
@@ -131831,7 +132317,7 @@ lib/undici/type-aliases/THttpHeaders.md
131831
132317
 
131832
132318
  > **THttpHeaders** = `http.IncomingHttpHeaders` & `object`
131833
132319
 
131834
- Defined in: [lib/undici.ts:977](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L977)
132320
+ Defined in: [lib/undici.ts:1014](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L1014)
131835
132321
 
131836
132322
  http headers
131837
132323
 
@@ -131858,7 +132344,7 @@ lib/undici/variables/filterProxyHeaders.md
131858
132344
 
131859
132345
  > `const` **filterProxyHeaders**: (`headers`, `res?`, `filter?`) => `Record`\<`string`, `string` \| `string`[]\> = `lProxy.filterProxyHeaders`
131860
132346
 
131861
- Defined in: [lib/undici.ts:669](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L669)
132347
+ Defined in: [lib/undici.ts:706](https://github.com/maiyunnet/kebab/blob/master/lib/undici.ts#L706)
131862
132348
 
131863
132349
  过滤代理请求或响应的基础头部,不生成或清理来源信息
131864
132350
 
@@ -131899,7 +132385,7 @@ lib/vector/classes/Vector.md
131899
132385
 
131900
132386
  # Class: Vector
131901
132387
 
131902
- Defined in: [lib/vector.ts:25](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L25)
132388
+ Defined in: [lib/vector.ts:47](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L47)
131903
132389
 
131904
132390
  ## Constructors
131905
132391
 
@@ -131907,7 +132393,7 @@ Defined in: [lib/vector.ts:25](https://github.com/maiyunnet/kebab/blob/master/li
131907
132393
 
131908
132394
  > **new Vector**(`etc`): `Vector`
131909
132395
 
131910
- Defined in: [lib/vector.ts:30](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L30)
132396
+ Defined in: [lib/vector.ts:52](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L52)
131911
132397
 
131912
132398
  #### Parameters
131913
132399
 
@@ -131925,7 +132411,7 @@ Defined in: [lib/vector.ts:30](https://github.com/maiyunnet/kebab/blob/master/li
131925
132411
 
131926
132412
  > **delete**(`data`): `Promise`\<`false` \| \{ `deletedCount`: `number`; \}\>
131927
132413
 
131928
- Defined in: [lib/vector.ts:120](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L120)
132414
+ Defined in: [lib/vector.ts:139](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L139)
131929
132415
 
131930
132416
  删除数据
131931
132417
 
@@ -131955,7 +132441,7 @@ Defined in: [lib/vector.ts:120](https://github.com/maiyunnet/kebab/blob/master/l
131955
132441
 
131956
132442
  > **insert**(`data`): `Promise`\<`false` \| \{ `insertCount`: `number`; `insertIds`: (`string` \| `number`)[]; \}\>
131957
132443
 
131958
- Defined in: [lib/vector.ts:89](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L89)
132444
+ Defined in: [lib/vector.ts:108](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L108)
131959
132445
 
131960
132446
  插入数据
131961
132447
 
@@ -131983,55 +132469,57 @@ Defined in: [lib/vector.ts:89](https://github.com/maiyunnet/kebab/blob/master/li
131983
132469
 
131984
132470
  ### search()
131985
132471
 
131986
- > **search**(`data`): `Promise`\<`false` \| `object`[]\>
132472
+ #### Call Signature
131987
132473
 
131988
- Defined in: [lib/vector.ts:35](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L35)
132474
+ > **search**(`data`): `Promise`\<`false` \| ([`ISearchHit`](../interfaces/ISearchHit.md) & `Record`\<`string`, `any`\>)[]\>
131989
132475
 
131990
- 搜索
132476
+ Defined in: [lib/vector.ts:61](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L61)
131991
132477
 
131992
- #### Parameters
132478
+ 搜索相近向量,允许动态访问输出字段
131993
132479
 
131994
- ##### data
132480
+ ##### Parameters
131995
132481
 
131996
- ###### collection
132482
+ ###### data
131997
132483
 
131998
- `string`
132484
+ [`ISearchOptions`](../interfaces/ISearchOptions.md)
131999
132485
 
132000
- 表名
132486
+ 查询向量及搜索选项
132001
132487
 
132002
- ###### data
132488
+ ##### Returns
132003
132489
 
132004
- `number`[]
132490
+ `Promise`\<`false` \| ([`ISearchHit`](../interfaces/ISearchHit.md) & `Record`\<`string`, `any`\>)[]\>
132005
132491
 
132006
- 查询的向量
132492
+ 搜索命中列表,搜索失败时返回 false
132007
132493
 
132008
- ###### fields?
132494
+ #### Call Signature
132009
132495
 
132010
- `string`[]
132496
+ > **search**\<`TExtra`\>(`data`): `Promise`\<`false` \| ([`ISearchHit`](../interfaces/ISearchHit.md) & `Omit`\<`TExtra`, keyof [`ISearchHit`](../interfaces/ISearchHit.md)\>)[]\>
132011
132497
 
132012
- 输出的字段,如 ['book_id', 'word_count'],默认全部
132498
+ Defined in: [lib/vector.ts:68](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L68)
132013
132499
 
132014
- ###### filter?
132500
+ 搜索相近向量,按指定类型返回额外字段
132015
132501
 
132016
- `string`
132502
+ ##### Type Parameters
132017
132503
 
132018
- 过滤器,如 word_count > 0 and book_id in [1, 2, 3]
132504
+ ###### TExtra
132019
132505
 
132020
- ###### limit?
132506
+ `TExtra` *extends* `object`
132021
132507
 
132022
- `number`
132508
+ 由调用方根据输出字段指定的结构,id 和 distance 保持固定类型
132023
132509
 
132024
- 返回的结果数量,默认为 3
132510
+ ##### Parameters
132511
+
132512
+ ###### data
132025
132513
 
132026
- ###### metric?
132514
+ [`ISearchOptions`](../interfaces/ISearchOptions.md)
132027
132515
 
132028
- `"L2"` \| `"IP"` \| `"COSINE"`
132516
+ 查询向量及搜索选项
132029
132517
 
132030
- 计算两个向量相似度的度量,默认 L2
132518
+ ##### Returns
132031
132519
 
132032
- #### Returns
132520
+ `Promise`\<`false` \| ([`ISearchHit`](../interfaces/ISearchHit.md) & `Omit`\<`TExtra`, keyof [`ISearchHit`](../interfaces/ISearchHit.md)\>)[]\>
132033
132521
 
132034
- `Promise`\<`false` \| `object`[]\>
132522
+ 搜索命中列表,搜索失败时返回 false
132035
132523
 
132036
132524
  lib/vector/functions/get.md
132037
132525
  ---
@@ -132046,7 +132534,7 @@ lib/vector/functions/get.md
132046
132534
 
132047
132535
  > **get**(`ctrEtc`): [`Vector`](../classes/Vector.md)
132048
132536
 
132049
- Defined in: [lib/vector.ts:156](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L156)
132537
+ Defined in: [lib/vector.ts:175](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L175)
132050
132538
 
132051
132539
  创建一个 Vector 对象
132052
132540
 
@@ -132080,6 +132568,8 @@ lib/vector/index.md
132080
132568
  ## Interfaces
132081
132569
 
132082
132570
  - [IOptions](interfaces/IOptions.md)
132571
+ - [ISearchHit](interfaces/ISearchHit.md)
132572
+ - [ISearchOptions](interfaces/ISearchOptions.md)
132083
132573
 
132084
132574
  ## Functions
132085
132575
 
@@ -132150,6 +132640,112 @@ Defined in: [lib/vector.ts:20](https://github.com/maiyunnet/kebab/blob/master/li
132150
132640
 
132151
132641
  用户名
132152
132642
 
132643
+ lib/vector/interfaces/ISearchHit.md
132644
+ ---
132645
+
132646
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
132647
+
132648
+ ***
132649
+
132650
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/vector](../index.md) / ISearchHit
132651
+
132652
+ # Interface: ISearchHit
132653
+
132654
+ Defined in: [lib/vector.ts:42](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L42)
132655
+
132656
+ 向量搜索命中的固定字段
132657
+
132658
+ ## Properties
132659
+
132660
+ ### distance
132661
+
132662
+ > **distance**: `number`
132663
+
132664
+ Defined in: [lib/vector.ts:44](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L44)
132665
+
132666
+ ***
132667
+
132668
+ ### id
132669
+
132670
+ > **id**: `string` \| `number`
132671
+
132672
+ Defined in: [lib/vector.ts:43](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L43)
132673
+
132674
+ lib/vector/interfaces/ISearchOptions.md
132675
+ ---
132676
+
132677
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
132678
+
132679
+ ***
132680
+
132681
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/vector](../index.md) / ISearchOptions
132682
+
132683
+ # Interface: ISearchOptions
132684
+
132685
+ Defined in: [lib/vector.ts:26](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L26)
132686
+
132687
+ 向量搜索参数
132688
+
132689
+ ## Properties
132690
+
132691
+ ### collection
132692
+
132693
+ > **collection**: `string`
132694
+
132695
+ Defined in: [lib/vector.ts:28](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L28)
132696
+
132697
+ 表名
132698
+
132699
+ ***
132700
+
132701
+ ### data
132702
+
132703
+ > **data**: `number`[]
132704
+
132705
+ Defined in: [lib/vector.ts:30](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L30)
132706
+
132707
+ 查询的向量
132708
+
132709
+ ***
132710
+
132711
+ ### fields?
132712
+
132713
+ > `optional` **fields?**: `string`[]
132714
+
132715
+ Defined in: [lib/vector.ts:38](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L38)
132716
+
132717
+ 输出的字段,如 ['book_id', 'word_count'],默认全部
132718
+
132719
+ ***
132720
+
132721
+ ### filter?
132722
+
132723
+ > `optional` **filter?**: `string`
132724
+
132725
+ Defined in: [lib/vector.ts:32](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L32)
132726
+
132727
+ 过滤器,如 word_count > 0 and book_id in [1, 2, 3]
132728
+
132729
+ ***
132730
+
132731
+ ### limit?
132732
+
132733
+ > `optional` **limit?**: `number`
132734
+
132735
+ Defined in: [lib/vector.ts:34](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L34)
132736
+
132737
+ 返回的结果数量,默认为 3
132738
+
132739
+ ***
132740
+
132741
+ ### metric?
132742
+
132743
+ > `optional` **metric?**: `"L2"` \| `"IP"` \| `"COSINE"`
132744
+
132745
+ Defined in: [lib/vector.ts:36](https://github.com/maiyunnet/kebab/blob/master/lib/vector.ts#L36)
132746
+
132747
+ 计算两个向量相似度的度量,默认 L2
132748
+
132153
132749
  lib/ws/classes/Socket.md
132154
132750
  ---
132155
132751
 
@@ -136889,7 +137485,7 @@ sys/mod/classes/default.md
136889
137485
 
136890
137486
  # Class: default
136891
137487
 
136892
- Defined in: [sys/mod.ts:74](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L74)
137488
+ Defined in: [sys/mod.ts:93](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L93)
136893
137489
 
136894
137490
  开启软更需要在表添加字段:ALTER TABLE `table_name` ADD `time_remove` bigint NOT NULL DEFAULT '0' AFTER `xxx`;
136895
137491
 
@@ -136899,7 +137495,7 @@ Defined in: [sys/mod.ts:74](https://github.com/maiyunnet/kebab/blob/master/sys/m
136899
137495
 
136900
137496
  > **new default**(`opt`): `Mod`
136901
137497
 
136902
- Defined in: [sys/mod.ts:135](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L135)
137498
+ Defined in: [sys/mod.ts:154](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L154)
136903
137499
 
136904
137500
  构造函数
136905
137501
 
@@ -136973,7 +137569,7 @@ MySQL 表前缀或 PostgreSQL Schema 名,优先级:选项 > 类属性 > 配
136973
137569
 
136974
137570
  > `protected` **\_contain**: \{ `key`: `string`; `list`: `string`[]; \} \| `null` = `null`
136975
137571
 
136976
- Defined in: [sys/mod.ts:111](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L111)
137572
+ Defined in: [sys/mod.ts:130](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L130)
136977
137573
 
136978
137574
  必须追加的数据筛选 key 与 values,仅单表模式有效
136979
137575
 
@@ -136983,7 +137579,7 @@ Defined in: [sys/mod.ts:111](https://github.com/maiyunnet/kebab/blob/master/sys/
136983
137579
 
136984
137580
  > `protected` `optional` **\_ctr?**: [`Ctr`](../../ctr/classes/Ctr.md) = `undefined`
136985
137581
 
136986
- Defined in: [sys/mod.ts:126](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L126)
137582
+ Defined in: [sys/mod.ts:145](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L145)
136987
137583
 
136988
137584
  ctr 对象
136989
137585
 
@@ -136993,7 +137589,7 @@ ctr 对象
136993
137589
 
136994
137590
  > `protected` **\_data**: `Record`\<`string`, `any`\> = `{}`
136995
137591
 
136996
- Defined in: [sys/mod.ts:105](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L105)
137592
+ Defined in: [sys/mod.ts:124](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L124)
136997
137593
 
136998
137594
  模型获取的属性
136999
137595
 
@@ -137003,7 +137599,7 @@ Defined in: [sys/mod.ts:105](https://github.com/maiyunnet/kebab/blob/master/sys/
137003
137599
 
137004
137600
  > `protected` **\_db**: [`Transaction`](../../../lib/db/tran/classes/Transaction.md) \| [`Pool`](../../../lib/db/pool/classes/Pool.md)
137005
137601
 
137006
- Defined in: [sys/mod.ts:120](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L120)
137602
+ Defined in: [sys/mod.ts:139](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L139)
137007
137603
 
137008
137604
  数据库连接对象
137009
137605
 
@@ -137013,7 +137609,7 @@ Defined in: [sys/mod.ts:120](https://github.com/maiyunnet/kebab/blob/master/sys/
137013
137609
 
137014
137610
  > `protected` **\_fieldPrefix**: `string` = `''`
137015
137611
 
137016
- Defined in: [sys/mod.ts:129](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L129)
137612
+ Defined in: [sys/mod.ts:148](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L148)
137017
137613
 
137018
137614
  主表筛选前缀,优先 alias,其次表名
137019
137615
 
@@ -137023,7 +137619,7 @@ Defined in: [sys/mod.ts:129](https://github.com/maiyunnet/kebab/blob/master/sys/
137023
137619
 
137024
137620
  > `protected` **\_index**: `string`[] \| `null` = `null`
137025
137621
 
137026
- Defined in: [sys/mod.ts:108](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L108)
137622
+ Defined in: [sys/mod.ts:127](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L127)
137027
137623
 
137028
137624
  当前选择的分表 _ 后缀,多个代表联查
137029
137625
 
@@ -137033,7 +137629,7 @@ Defined in: [sys/mod.ts:108](https://github.com/maiyunnet/kebab/blob/master/sys/
137033
137629
 
137034
137630
  > `protected` **\_jsonUpdates**: `Record`\<`string`, `boolean`\> = `{}`
137035
137631
 
137036
- Defined in: [sys/mod.ts:102](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L102)
137632
+ Defined in: [sys/mod.ts:121](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L121)
137037
137633
 
137038
137634
  要在数据库边界序列化的 JSON 字段
137039
137635
 
@@ -137043,7 +137639,7 @@ Defined in: [sys/mod.ts:102](https://github.com/maiyunnet/kebab/blob/master/sys/
137043
137639
 
137044
137640
  > `protected` **\_sql**: [`Sql`](../../../lib/sql/classes/Sql.md)
137045
137641
 
137046
- Defined in: [sys/mod.ts:123](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L123)
137642
+ Defined in: [sys/mod.ts:142](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L142)
137047
137643
 
137048
137644
  Sql 对象
137049
137645
 
@@ -137053,7 +137649,7 @@ Sql 对象
137053
137649
 
137054
137650
  > `protected` **\_total**: `number`[] = `[]`
137055
137651
 
137056
- Defined in: [sys/mod.ts:117](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L117)
137652
+ Defined in: [sys/mod.ts:136](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L136)
137057
137653
 
137058
137654
  已算出的 total
137059
137655
 
@@ -137063,7 +137659,7 @@ Defined in: [sys/mod.ts:117](https://github.com/maiyunnet/kebab/blob/master/sys/
137063
137659
 
137064
137660
  > `protected` **\_updates**: `Record`\<`string`, `boolean`\> = `{}`
137065
137661
 
137066
- Defined in: [sys/mod.ts:99](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L99)
137662
+ Defined in: [sys/mod.ts:118](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L118)
137067
137663
 
137068
137664
  要 update 的内容
137069
137665
 
@@ -137073,7 +137669,7 @@ Defined in: [sys/mod.ts:99](https://github.com/maiyunnet/kebab/blob/master/sys/m
137073
137669
 
137074
137670
  > `protected` `static` **\_$index**: `string` \| `string`[] = `''`
137075
137671
 
137076
- Defined in: [sys/mod.ts:93](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L93)
137672
+ Defined in: [sys/mod.ts:112](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L112)
137077
137673
 
137078
137674
  自动 key 冲突目标:MySQL 为索引名;PGSQL 为唯一字段或字段数组,PG 留空使用 _$key,不支持部分或表达式索引
137079
137675
 
@@ -137083,7 +137679,7 @@ Defined in: [sys/mod.ts:93](https://github.com/maiyunnet/kebab/blob/master/sys/m
137083
137679
 
137084
137680
  > `protected` `static` **\_$key**: `string` = `''`
137085
137681
 
137086
- Defined in: [sys/mod.ts:90](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L90)
137682
+ Defined in: [sys/mod.ts:109](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L109)
137087
137683
 
137088
137684
  设置后将由 _keyGenerator 函数生成唯一字段
137089
137685
 
@@ -137093,7 +137689,7 @@ Defined in: [sys/mod.ts:90](https://github.com/maiyunnet/kebab/blob/master/sys/m
137093
137689
 
137094
137690
  > `protected` `static` **\_$partition**: `string`[] = `[]`
137095
137691
 
137096
- Defined in: [sys/mod.ts:87](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L87)
137692
+ Defined in: [sys/mod.ts:106](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L106)
137097
137693
 
137098
137694
  表的分区字段名,如 ['time_push']
137099
137695
  只填分区字段,不用额外填写主键;save、remove、refresh 默认会把主键一起加入 WHERE。
@@ -137105,7 +137701,7 @@ Defined in: [sys/mod.ts:87](https://github.com/maiyunnet/kebab/blob/master/sys/m
137105
137701
 
137106
137702
  > `protected` `static` `optional` **\_$pre?**: `string`
137107
137703
 
137108
- Defined in: [sys/mod.ts:96](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L96)
137704
+ Defined in: [sys/mod.ts:115](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L115)
137109
137705
 
137110
137706
  前缀,MySQL 时为表前缀(如 prefix_),PostgreSQL 时为 Schema 名。顺序:选项前缀 -> 本前缀 -> 配置文件前缀
137111
137707
 
@@ -137115,7 +137711,7 @@ Defined in: [sys/mod.ts:96](https://github.com/maiyunnet/kebab/blob/master/sys/m
137115
137711
 
137116
137712
  > `protected` `static` **\_$primary**: `string` = `'id'`
137117
137713
 
137118
- Defined in: [sys/mod.ts:80](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L80)
137714
+ Defined in: [sys/mod.ts:99](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L99)
137119
137715
 
137120
137716
  主键字段名
137121
137717
 
@@ -137125,7 +137721,7 @@ Defined in: [sys/mod.ts:80](https://github.com/maiyunnet/kebab/blob/master/sys/m
137125
137721
 
137126
137722
  > `protected` `static` **\_$table**: `string` = `''`
137127
137723
 
137128
- Defined in: [sys/mod.ts:77](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L77)
137724
+ Defined in: [sys/mod.ts:96](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L96)
137129
137725
 
137130
137726
  表名
137131
137727
 
@@ -137135,7 +137731,7 @@ Defined in: [sys/mod.ts:77](https://github.com/maiyunnet/kebab/blob/master/sys/m
137135
137731
 
137136
137732
  > `protected` **\_keyGenerator**(): `string`
137137
137733
 
137138
- Defined in: [sys/mod.ts:2074](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2074)
137734
+ Defined in: [sys/mod.ts:2115](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2115)
137139
137735
 
137140
137736
  当 _key 不为空时,则依据继承此方法的方法自动生成填充 key
137141
137737
 
@@ -137147,29 +137743,69 @@ Defined in: [sys/mod.ts:2074](https://github.com/maiyunnet/kebab/blob/master/sys
137147
137743
 
137148
137744
  ### all()
137149
137745
 
137150
- 获取列表
137746
+ #### Call Signature
137151
137747
 
137152
- #### Param
137748
+ > **all**(): `Promise`\<`false` \| [`Rows`](Rows.md)\<`Mod` & [`TModRow`](../type-aliases/TModRow.md)\>\>
137153
137749
 
137154
- **key**
137750
+ Defined in: [sys/mod.ts:1321](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1321)
137155
137751
 
137156
- 是否以某个字段为主键
137752
+ 查询模型列表,查询失败返回 false
137753
+
137754
+ ##### Returns
137755
+
137756
+ `Promise`\<`false` \| [`Rows`](Rows.md)\<`Mod` & [`TModRow`](../type-aliases/TModRow.md)\>\>
137157
137757
 
137158
137758
  #### Call Signature
137159
137759
 
137160
- > **all**(): `Promise`\<`false` \| [`Rows`](Rows.md)\<`Mod`\>\>
137760
+ > **all**(`key`): `Promise`\<`false` \| `Record`\<`string`, `Mod` & [`TModRow`](../type-aliases/TModRow.md)\>\>
137761
+
137762
+ Defined in: [sys/mod.ts:1326](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1326)
137763
+
137764
+ 查询模型字典,查询失败返回 false
137765
+
137766
+ ##### Parameters
137767
+
137768
+ ###### key
137161
137769
 
137162
- Defined in: [sys/mod.ts:1297](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1297)
137770
+ `string`
137771
+
137772
+ 用作字典键的结果字段
137163
137773
 
137164
137774
  ##### Returns
137165
137775
 
137166
- `Promise`\<`false` \| [`Rows`](Rows.md)\<`Mod`\>\>
137776
+ `Promise`\<`false` \| `Record`\<`string`, `Mod` & [`TModRow`](../type-aliases/TModRow.md)\>\>
137167
137777
 
137168
137778
  #### Call Signature
137169
137779
 
137170
- > **all**(`key`): `Promise`\<`false` \| `Record`\<`string`, `Mod`\>\>
137780
+ > **all**\<`TExtra`\>(): `Promise`\<`false` \| [`Rows`](Rows.md)\<`Mod` & `TExtra`\>\>
137781
+
137782
+ Defined in: [sys/mod.ts:1328](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1328)
137171
137783
 
137172
- Defined in: [sys/mod.ts:1298](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1298)
137784
+ 查询模型列表,并为查询附加的字段指定类型,查询失败返回 false
137785
+
137786
+ ##### Type Parameters
137787
+
137788
+ ###### TExtra
137789
+
137790
+ `TExtra` *extends* `object`
137791
+
137792
+ ##### Returns
137793
+
137794
+ `Promise`\<`false` \| [`Rows`](Rows.md)\<`Mod` & `TExtra`\>\>
137795
+
137796
+ #### Call Signature
137797
+
137798
+ > **all**\<`TExtra`\>(`key`): `Promise`\<`false` \| `Record`\<`string`, `Mod` & `TExtra`\>\>
137799
+
137800
+ Defined in: [sys/mod.ts:1333](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1333)
137801
+
137802
+ 查询模型字典,并为查询附加的字段指定类型,查询失败返回 false
137803
+
137804
+ ##### Type Parameters
137805
+
137806
+ ###### TExtra
137807
+
137808
+ `TExtra` *extends* `object`
137173
137809
 
137174
137810
  ##### Parameters
137175
137811
 
@@ -137177,37 +137813,79 @@ Defined in: [sys/mod.ts:1298](https://github.com/maiyunnet/kebab/blob/master/sys
137177
137813
 
137178
137814
  `string`
137179
137815
 
137816
+ 用作字典键的结果字段
137817
+
137180
137818
  ##### Returns
137181
137819
 
137182
- `Promise`\<`false` \| `Record`\<`string`, `Mod`\>\>
137820
+ `Promise`\<`false` \| `Record`\<`string`, `Mod` & `TExtra`\>\>
137183
137821
 
137184
137822
  ***
137185
137823
 
137186
137824
  ### allArray()
137187
137825
 
137188
- 获取列表(得到的为原生对象或数组,不是模型)
137826
+ #### Call Signature
137189
137827
 
137190
- #### Param
137828
+ > **allArray**(): `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md)[]\>
137829
+
137830
+ Defined in: [sys/mod.ts:1508](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1508)
137831
+
137832
+ 查询原生行列表,查询失败返回 false
137833
+
137834
+ ##### Returns
137835
+
137836
+ `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md)[]\>
137837
+
137838
+ #### Call Signature
137839
+
137840
+ > **allArray**(`key`): `Promise`\<`false` \| `Record`\<`string`, [`TModRow`](../type-aliases/TModRow.md)\>\>
137841
+
137842
+ Defined in: [sys/mod.ts:1513](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1513)
137843
+
137844
+ 查询原生行字典,查询失败返回 false
137845
+
137846
+ ##### Parameters
137847
+
137848
+ ###### key
137849
+
137850
+ `string`
137191
137851
 
137192
- **key**
137852
+ 用作字典键的结果字段
137193
137853
 
137194
- 是否以某个字段为主键
137854
+ ##### Returns
137855
+
137856
+ `Promise`\<`false` \| `Record`\<`string`, [`TModRow`](../type-aliases/TModRow.md)\>\>
137195
137857
 
137196
137858
  #### Call Signature
137197
137859
 
137198
- > **allArray**(): `Promise`\<`false` \| `Record`\<`string`, `any`\>[]\>
137860
+ > **allArray**\<`TRow`\>(): `Promise`\<`false` \| `TRow`[]\>
137861
+
137862
+ Defined in: [sys/mod.ts:1515](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1515)
137863
+
137864
+ 查询指定行类型的原生行列表,查询失败返回 false
137199
137865
 
137200
- Defined in: [sys/mod.ts:1476](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1476)
137866
+ ##### Type Parameters
137867
+
137868
+ ###### TRow
137869
+
137870
+ `TRow` *extends* `object`
137201
137871
 
137202
137872
  ##### Returns
137203
137873
 
137204
- `Promise`\<`false` \| `Record`\<`string`, `any`\>[]\>
137874
+ `Promise`\<`false` \| `TRow`[]\>
137205
137875
 
137206
137876
  #### Call Signature
137207
137877
 
137208
- > **allArray**(`key`): `Promise`\<`false` \| `Record`\<`string`, `Record`\<`string`, `any`\>\>\>
137878
+ > **allArray**\<`TRow`\>(`key`): `Promise`\<`false` \| `Record`\<`string`, `TRow`\>\>
137879
+
137880
+ Defined in: [sys/mod.ts:1520](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1520)
137209
137881
 
137210
- Defined in: [sys/mod.ts:1477](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1477)
137882
+ 查询指定行类型的原生行字典,查询失败返回 false
137883
+
137884
+ ##### Type Parameters
137885
+
137886
+ ###### TRow
137887
+
137888
+ `TRow` *extends* `object`
137211
137889
 
137212
137890
  ##### Parameters
137213
137891
 
@@ -137215,9 +137893,11 @@ Defined in: [sys/mod.ts:1477](https://github.com/maiyunnet/kebab/blob/master/sys
137215
137893
 
137216
137894
  `string`
137217
137895
 
137896
+ 用作字典键的结果字段
137897
+
137218
137898
  ##### Returns
137219
137899
 
137220
- `Promise`\<`false` \| `Record`\<`string`, `Record`\<`string`, `any`\>\>\>
137900
+ `Promise`\<`false` \| `Record`\<`string`, `TRow`\>\>
137221
137901
 
137222
137902
  ***
137223
137903
 
@@ -137225,7 +137905,7 @@ Defined in: [sys/mod.ts:1477](https://github.com/maiyunnet/kebab/blob/master/sys
137225
137905
 
137226
137906
  > **allCursor**\<`T`\>(`count`, `opt`): `Promise`\<`false` \| [`ICursorPage`](../interfaces/ICursorPage.md)\<`T`\>\>
137227
137907
 
137228
- Defined in: [sys/mod.ts:1725](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1725)
137908
+ Defined in: [sys/mod.ts:1764](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1764)
137229
137909
 
137230
137910
  读取一批游标数据,多取一条判断后续记录,不使用 OFFSET,不修改原查询
137231
137911
  排序字段必须全部非空、同向,且组合唯一;SELECT 中须包含对应字段(同名或指定 keys)
@@ -137234,7 +137914,7 @@ Defined in: [sys/mod.ts:1725](https://github.com/maiyunnet/kebab/blob/master/sys
137234
137914
 
137235
137915
  ##### T
137236
137916
 
137237
- `T` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
137917
+ `T` *extends* `object` = `Record`\<`string`, `unknown`\>
137238
137918
 
137239
137919
  #### Parameters
137240
137920
 
@@ -137290,7 +137970,7 @@ SELECT 结果中对应的字段名,默认去掉 by 的表别名
137290
137970
 
137291
137971
  > **append**(`sql`): `this`
137292
137972
 
137293
- Defined in: [sys/mod.ts:1983](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1983)
137973
+ Defined in: [sys/mod.ts:2022](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2022)
137294
137974
 
137295
137975
  在 sql 最后追加字符串
137296
137976
 
@@ -137310,7 +137990,7 @@ Defined in: [sys/mod.ts:1983](https://github.com/maiyunnet/kebab/blob/master/sys
137310
137990
 
137311
137991
  > **by**(`c`, `d?`): `this`
137312
137992
 
137313
- Defined in: [sys/mod.ts:1939](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1939)
137993
+ Defined in: [sys/mod.ts:1978](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1978)
137314
137994
 
137315
137995
  ORDER BY
137316
137996
 
@@ -137338,7 +138018,7 @@ ORDER BY
137338
138018
 
137339
138019
  > **contain**(`contain`): `this`
137340
138020
 
137341
- Defined in: [sys/mod.ts:1992](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1992)
138021
+ Defined in: [sys/mod.ts:2031](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2031)
137342
138022
 
137343
138023
  设置闭包含数据
137344
138024
 
@@ -137366,7 +138046,7 @@ Defined in: [sys/mod.ts:1992](https://github.com/maiyunnet/kebab/blob/master/sys
137366
138046
 
137367
138047
  > **count**(): `Promise`\<`number`\>
137368
138048
 
137369
- Defined in: [sys/mod.ts:1775](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1775)
138049
+ Defined in: [sys/mod.ts:1814](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1814)
137370
138050
 
137371
138051
  根据当前条件,筛选出当前条目该有的数据条数
137372
138052
 
@@ -137380,7 +138060,7 @@ Defined in: [sys/mod.ts:1775](https://github.com/maiyunnet/kebab/blob/master/sys
137380
138060
 
137381
138061
  > **countSql**(): `string`
137382
138062
 
137383
- Defined in: [sys/mod.ts:1796](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1796)
138063
+ Defined in: [sys/mod.ts:1835](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1835)
137384
138064
 
137385
138065
  获取当前条件下的 count 的 SQL 语句
137386
138066
 
@@ -137394,7 +138074,7 @@ Defined in: [sys/mod.ts:1796](https://github.com/maiyunnet/kebab/blob/master/sys
137394
138074
 
137395
138075
  > **create**(): `Promise`\<`boolean` \| `null`\>
137396
138076
 
137397
- Defined in: [sys/mod.ts:928](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L928)
138077
+ Defined in: [sys/mod.ts:938](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L938)
137398
138078
 
137399
138079
  创建数据,自动 key 最多尝试 3 次;PGSQL 仅忽略指定字段的唯一冲突
137400
138080
 
@@ -137410,7 +138090,7 @@ true-成功,false-错误或重试耗尽,null-其他唯一冲突;PGSQL 的 SQL
137410
138090
 
137411
138091
  > **crossJoin**(`f`, `s`, `index?`, `pre?`): `this`
137412
138092
 
137413
- Defined in: [sys/mod.ts:1871](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1871)
138093
+ Defined in: [sys/mod.ts:1910](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1910)
137414
138094
 
137415
138095
  cross join 方法
137416
138096
 
@@ -137460,7 +138140,7 @@ ON 信息
137460
138140
 
137461
138141
  > **explain**(`all?`): `Promise`\<`string` \| `false`\>
137462
138142
 
137463
- Defined in: [sys/mod.ts:1602](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1602)
138143
+ Defined in: [sys/mod.ts:1641](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1641)
137464
138144
 
137465
138145
  ##### Parameters
137466
138146
 
@@ -137476,7 +138156,7 @@ Defined in: [sys/mod.ts:1602](https://github.com/maiyunnet/kebab/blob/master/sys
137476
138156
 
137477
138157
  > **explain**(`all`): `Promise`\<`false` \| `Record`\<`string`, `any`\>\>
137478
138158
 
137479
- Defined in: [sys/mod.ts:1603](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1603)
138159
+ Defined in: [sys/mod.ts:1642](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1642)
137480
138160
 
137481
138161
  ##### Parameters
137482
138162
 
@@ -137494,7 +138174,7 @@ Defined in: [sys/mod.ts:1603](https://github.com/maiyunnet/kebab/blob/master/sys
137494
138174
 
137495
138175
  > **filter**(`s`): `this`
137496
138176
 
137497
- Defined in: [sys/mod.ts:1917](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1917)
138177
+ Defined in: [sys/mod.ts:1956](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1956)
137498
138178
 
137499
138179
  筛选器
137500
138180
 
@@ -137514,25 +138194,63 @@ Defined in: [sys/mod.ts:1917](https://github.com/maiyunnet/kebab/blob/master/sys
137514
138194
 
137515
138195
  ### first()
137516
138196
 
137517
- 获取数据库第一个对象
138197
+ #### Call Signature
137518
138198
 
137519
- #### Param
138199
+ > **first**(`lock`, `array`): `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
137520
138200
 
137521
- **lock**
138201
+ Defined in: [sys/mod.ts:1197](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1197)
137522
138202
 
137523
- 是否加锁
138203
+ 获取第一条原生记录,查询失败返回 false,未找到返回 null
137524
138204
 
137525
- #### Param
138205
+ ##### Parameters
138206
+
138207
+ ###### lock
138208
+
138209
+ `boolean`
138210
+
138211
+ ###### array
138212
+
138213
+ `true`
138214
+
138215
+ ##### Returns
138216
+
138217
+ `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
137526
138218
 
137527
- **array**
138219
+ #### Call Signature
138220
+
138221
+ > **first**(`lock?`, `array?`): `Promise`\<`false` \| `Mod` & [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
138222
+
138223
+ Defined in: [sys/mod.ts:1202](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1202)
138224
+
138225
+ 获取第一个模型实例,查询失败返回 false,未找到返回 null
138226
+
138227
+ ##### Parameters
138228
+
138229
+ ###### lock?
138230
+
138231
+ `boolean`
138232
+
138233
+ ###### array?
138234
+
138235
+ `false`
138236
+
138237
+ ##### Returns
137528
138238
 
137529
- 是否返回原生对象
138239
+ `Promise`\<`false` \| `Mod` & [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
137530
138240
 
137531
138241
  #### Call Signature
137532
138242
 
137533
- > **first**(`lock`, `array`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
138243
+ > **first**\<`TRow`\>(`lock`, `array`): `Promise`\<`false` \| `TRow` \| `null`\>
137534
138244
 
137535
- Defined in: [sys/mod.ts:1186](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1186)
138245
+ Defined in: [sys/mod.ts:1212](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1212)
138246
+
138247
+ 获取指定类型的第一条原生记录
138248
+
138249
+ ##### Type Parameters
138250
+
138251
+ ###### TRow
138252
+
138253
+ `TRow` *extends* `object`
137536
138254
 
137537
138255
  ##### Parameters
137538
138256
 
@@ -137540,19 +138258,33 @@ Defined in: [sys/mod.ts:1186](https://github.com/maiyunnet/kebab/blob/master/sys
137540
138258
 
137541
138259
  `boolean`
137542
138260
 
138261
+ 是否加锁
138262
+
137543
138263
  ###### array
137544
138264
 
137545
138265
  `true`
137546
138266
 
138267
+ 传入 true 返回原生记录
138268
+
137547
138269
  ##### Returns
137548
138270
 
137549
- `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
138271
+ `Promise`\<`false` \| `TRow` \| `null`\>
138272
+
138273
+ 原生记录,查询失败返回 false,未找到返回 null
137550
138274
 
137551
138275
  #### Call Signature
137552
138276
 
137553
- > **first**(`lock?`, `array?`): `Promise`\<`false` \| `Mod` & `Record`\<`string`, `any`\> \| `null`\>
138277
+ > **first**\<`TExtra`\>(`lock?`, `array?`): `Promise`\<`false` \| `Mod` & `TExtra` \| `null`\>
138278
+
138279
+ Defined in: [sys/mod.ts:1219](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1219)
137554
138280
 
137555
- Defined in: [sys/mod.ts:1190](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1190)
138281
+ 获取第一个模型实例,并为查询附加的字段指定类型
138282
+
138283
+ ##### Type Parameters
138284
+
138285
+ ###### TExtra
138286
+
138287
+ `TExtra` *extends* `object`
137556
138288
 
137557
138289
  ##### Parameters
137558
138290
 
@@ -137560,35 +138292,69 @@ Defined in: [sys/mod.ts:1190](https://github.com/maiyunnet/kebab/blob/master/sys
137560
138292
 
137561
138293
  `boolean`
137562
138294
 
138295
+ 是否加锁
138296
+
137563
138297
  ###### array?
137564
138298
 
137565
138299
  `false`
137566
138300
 
138301
+ 省略或传入 false 返回模型实例
138302
+
137567
138303
  ##### Returns
137568
138304
 
137569
- `Promise`\<`false` \| `Mod` & `Record`\<`string`, `any`\> \| `null`\>
138305
+ `Promise`\<`false` \| `Mod` & `TExtra` \| `null`\>
138306
+
138307
+ 模型实例,查询失败返回 false,未找到返回 null
137570
138308
 
137571
138309
  ***
137572
138310
 
137573
138311
  ### firstArray()
137574
138312
 
137575
- > **firstArray**(`lock?`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
138313
+ #### Call Signature
138314
+
138315
+ > **firstArray**(`lock?`): `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
137576
138316
 
137577
- Defined in: [sys/mod.ts:1230](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1230)
138317
+ Defined in: [sys/mod.ts:1252](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1252)
137578
138318
 
137579
138319
  获取数据库第一个原生对象
137580
138320
 
137581
- #### Parameters
138321
+ ##### Parameters
137582
138322
 
137583
- ##### lock?
138323
+ ###### lock?
137584
138324
 
137585
- `boolean` = `false`
138325
+ `boolean`
137586
138326
 
137587
138327
  是否加锁
137588
138328
 
137589
- #### Returns
138329
+ ##### Returns
138330
+
138331
+ `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
137590
138332
 
137591
- `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
138333
+ 原生对象,查询失败返回 false,未找到返回 null
138334
+
138335
+ #### Call Signature
138336
+
138337
+ > **firstArray**\<`TRow`\>(`lock?`): `Promise`\<`false` \| `TRow` \| `null`\>
138338
+
138339
+ Defined in: [sys/mod.ts:1254](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1254)
138340
+
138341
+ 获取指定类型的第一条原生记录,查询失败返回 false,未找到返回 null
138342
+
138343
+ ##### Type Parameters
138344
+
138345
+ ###### TRow
138346
+
138347
+ `TRow` *extends* `object`
138348
+
138349
+ ##### Parameters
138350
+
138351
+ ###### lock?
138352
+
138353
+ `boolean`
138354
+
138355
+ ##### Returns
138356
+
138357
+ `Promise`\<`false` \| `TRow` \| `null`\>
137592
138358
 
137593
138359
  ***
137594
138360
 
@@ -137596,7 +138362,7 @@ Defined in: [sys/mod.ts:1230](https://github.com/maiyunnet/kebab/blob/master/sys
137596
138362
 
137597
138363
  > **format**(`sql?`, `data?`): `string`
137598
138364
 
137599
- Defined in: [sys/mod.ts:2019](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2019)
138365
+ Defined in: [sys/mod.ts:2058](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2058)
137600
138366
 
137601
138367
  获取带 data 的 sql 语句
137602
138368
 
@@ -137624,7 +138390,7 @@ sql 语句
137624
138390
 
137625
138391
  > **fullJoin**(`f`, `s`, `index?`, `pre?`): `this`
137626
138392
 
137627
- Defined in: [sys/mod.ts:1859](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1859)
138393
+ Defined in: [sys/mod.ts:1898](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1898)
137628
138394
 
137629
138395
  full join 方法
137630
138396
 
@@ -137662,31 +138428,59 @@ ON 信息
137662
138428
 
137663
138429
  ### get()
137664
138430
 
138431
+ #### Call Signature
138432
+
137665
138433
  > **get**(`n`): `any`
137666
138434
 
137667
- Defined in: [sys/mod.ts:908](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L908)
138435
+ Defined in: [sys/mod.ts:915](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L915)
137668
138436
 
137669
- 获取一个字段值
138437
+ 获取一个已加载的字段值
137670
138438
 
137671
- #### Parameters
138439
+ ##### Parameters
137672
138440
 
137673
- ##### n
138441
+ ###### n
137674
138442
 
137675
138443
  `string`
137676
138444
 
137677
138445
  字段名
137678
138446
 
137679
- #### Returns
138447
+ ##### Returns
137680
138448
 
137681
138449
  `any`
137682
138450
 
138451
+ 字段值,未加载时返回 undefined
138452
+
138453
+ #### Call Signature
138454
+
138455
+ > **get**\<`T`\>(`n`): `T` \| `undefined`
138456
+
138457
+ Defined in: [sys/mod.ts:917](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L917)
138458
+
138459
+ 按指定类型获取一个已加载的字段值,未加载时返回 undefined
138460
+
138461
+ ##### Type Parameters
138462
+
138463
+ ###### T
138464
+
138465
+ `T`
138466
+
138467
+ ##### Parameters
138468
+
138469
+ ###### n
138470
+
138471
+ `string`
138472
+
138473
+ ##### Returns
138474
+
138475
+ `T` \| `undefined`
138476
+
137683
138477
  ***
137684
138478
 
137685
138479
  ### getData()
137686
138480
 
137687
138481
  > **getData**(): `any`[]
137688
138482
 
137689
- Defined in: [sys/mod.ts:2010](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2010)
138483
+ Defined in: [sys/mod.ts:2049](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2049)
137690
138484
 
137691
138485
  获取全部 data
137692
138486
 
@@ -137700,7 +138494,7 @@ Defined in: [sys/mod.ts:2010](https://github.com/maiyunnet/kebab/blob/master/sys
137700
138494
 
137701
138495
  > **getSql**(): `string`
137702
138496
 
137703
- Defined in: [sys/mod.ts:2003](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2003)
138497
+ Defined in: [sys/mod.ts:2042](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2042)
137704
138498
 
137705
138499
  获取 sql 语句
137706
138500
 
@@ -137714,7 +138508,7 @@ Defined in: [sys/mod.ts:2003](https://github.com/maiyunnet/kebab/blob/master/sys
137714
138508
 
137715
138509
  > **group**(`c`): `this`
137716
138510
 
137717
- Defined in: [sys/mod.ts:1948](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1948)
138511
+ Defined in: [sys/mod.ts:1987](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1987)
137718
138512
 
137719
138513
  GROUP BY
137720
138514
 
@@ -137736,7 +138530,7 @@ GROUP BY
137736
138530
 
137737
138531
  > **having**(`s`): `this`
137738
138532
 
137739
- Defined in: [sys/mod.ts:1908](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1908)
138533
+ Defined in: [sys/mod.ts:1947](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1947)
137740
138534
 
137741
138535
  筛选器
137742
138536
 
@@ -137758,7 +138552,7 @@ Defined in: [sys/mod.ts:1908](https://github.com/maiyunnet/kebab/blob/master/sys
137758
138552
 
137759
138553
  > **hint**(`h`): `this`
137760
138554
 
137761
- Defined in: [sys/mod.ts:1899](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1899)
138555
+ Defined in: [sys/mod.ts:1938](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1938)
137762
138556
 
137763
138557
  设置 MySQL 优化器 Hint
137764
138558
  内容会以 Optimizer Hint 注释语法注入到 SELECT 关键字后
@@ -137803,7 +138597,7 @@ Hint 内容
137803
138597
 
137804
138598
  > **innerJoin**(`f`, `s`, `index?`, `pre?`): `this`
137805
138599
 
137806
- Defined in: [sys/mod.ts:1847](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1847)
138600
+ Defined in: [sys/mod.ts:1886](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1886)
137807
138601
 
137808
138602
  inner join 方法
137809
138603
 
@@ -137843,7 +138637,7 @@ ON 信息
137843
138637
 
137844
138638
  > **join**(`f`, `s?`, `type?`, `index?`, `pre?`): `this`
137845
138639
 
137846
- Defined in: [sys/mod.ts:1811](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1811)
138640
+ Defined in: [sys/mod.ts:1850](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1850)
137847
138641
 
137848
138642
  #### Parameters
137849
138643
 
@@ -137887,7 +138681,7 @@ ON 信息
137887
138681
 
137888
138682
  > **langText**(`col`, `lang`): `string`
137889
138683
 
137890
- Defined in: [sys/mod.ts:2054](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2054)
138684
+ Defined in: [sys/mod.ts:2095](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2095)
137891
138685
 
137892
138686
  获取字段的可用语种文本
137893
138687
 
@@ -137915,7 +138709,7 @@ Defined in: [sys/mod.ts:2054](https://github.com/maiyunnet/kebab/blob/master/sys
137915
138709
 
137916
138710
  > **leftJoin**(`f`, `s`, `index?`, `pre?`): `this`
137917
138711
 
137918
- Defined in: [sys/mod.ts:1823](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1823)
138712
+ Defined in: [sys/mod.ts:1862](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1862)
137919
138713
 
137920
138714
  left join 方法
137921
138715
 
@@ -137955,7 +138749,7 @@ ON 信息
137955
138749
 
137956
138750
  > **limit**(`a`, `b?`): `this`
137957
138751
 
137958
- Defined in: [sys/mod.ts:1961](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1961)
138752
+ Defined in: [sys/mod.ts:2000](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2000)
137959
138753
 
137960
138754
  LIMIT
137961
138755
 
@@ -137983,7 +138777,7 @@ LIMIT
137983
138777
 
137984
138778
  > **page**(`count`, `page?`): `this`
137985
138779
 
137986
- Defined in: [sys/mod.ts:1972](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1972)
138780
+ Defined in: [sys/mod.ts:2011](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2011)
137987
138781
 
137988
138782
  分页
137989
138783
 
@@ -138011,7 +138805,7 @@ Defined in: [sys/mod.ts:1972](https://github.com/maiyunnet/kebab/blob/master/sys
138011
138805
 
138012
138806
  > **refresh**(`lock?`): `Promise`\<`boolean` \| `null`\>
138013
138807
 
138014
- Defined in: [sys/mod.ts:1097](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1097)
138808
+ Defined in: [sys/mod.ts:1107](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1107)
138015
138809
 
138016
138810
  刷新当前模型获取最新数据
138017
138811
 
@@ -138035,7 +138829,7 @@ true 成功,null 记录不存在,false 缺少定位字段或查询失败
138035
138829
 
138036
138830
  > **remove**(): `Promise`\<`boolean`\>
138037
138831
 
138038
- Defined in: [sys/mod.ts:1165](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1165)
138832
+ Defined in: [sys/mod.ts:1175](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1175)
138039
138833
 
138040
138834
  按主键和分区字段删除当前记录
138041
138835
 
@@ -138051,7 +138845,7 @@ Defined in: [sys/mod.ts:1165](https://github.com/maiyunnet/kebab/blob/master/sys
138051
138845
 
138052
138846
  > **rightJoin**(`f`, `s`, `index?`, `pre?`): `this`
138053
138847
 
138054
- Defined in: [sys/mod.ts:1835](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1835)
138848
+ Defined in: [sys/mod.ts:1874](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1874)
138055
138849
 
138056
138850
  right join 方法
138057
138851
 
@@ -138091,7 +138885,7 @@ ON 信息
138091
138885
 
138092
138886
  > **save**(`where?`): `Promise`\<`boolean`\>
138093
138887
 
138094
- Defined in: [sys/mod.ts:1129](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1129)
138888
+ Defined in: [sys/mod.ts:1139](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1139)
138095
138889
 
138096
138890
  更新 set 的数据到数据库,有未保存数据时才保存
138097
138891
 
@@ -138131,7 +138925,7 @@ Defined in: [sys/mod.ts:1129](https://github.com/maiyunnet/kebab/blob/master/sys
138131
138925
 
138132
138926
  > **set**\<`T`, `TK`\>(`n`): `void`
138133
138927
 
138134
- Defined in: [sys/mod.ts:873](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L873)
138928
+ Defined in: [sys/mod.ts:879](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L879)
138135
138929
 
138136
138930
  ##### Type Parameters
138137
138931
 
@@ -138157,7 +138951,7 @@ Defined in: [sys/mod.ts:873](https://github.com/maiyunnet/kebab/blob/master/sys/
138157
138951
 
138158
138952
  > **set**\<`T`, `TK`\>(`n`, `v`): `void`
138159
138953
 
138160
- Defined in: [sys/mod.ts:874](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L874)
138954
+ Defined in: [sys/mod.ts:880](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L880)
138161
138955
 
138162
138956
  ##### Type Parameters
138163
138957
 
@@ -138187,21 +138981,53 @@ Defined in: [sys/mod.ts:874](https://github.com/maiyunnet/kebab/blob/master/sys/
138187
138981
 
138188
138982
  ### toArray()
138189
138983
 
138190
- > **toArray**\<`TC`\>(): [`TOnlyProperties`](../type-aliases/TOnlyProperties.md)\<`InstanceType`\<`TC`\>\> & `Record`\<`string`, `any`\>
138984
+ #### Call Signature
138191
138985
 
138192
- Defined in: [sys/mod.ts:2026](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2026)
138986
+ > **toArray**(): [`TModRow`](../type-aliases/TModRow.md)
138193
138987
 
138194
- 获取值对象,获取的是新创建的数组
138988
+ Defined in: [sys/mod.ts:2063](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2063)
138195
138989
 
138196
- #### Type Parameters
138990
+ 将已加载和已设置的字段复制为一个普通对象
138197
138991
 
138198
- ##### TC
138992
+ ##### Returns
138199
138993
 
138200
- `TC` *extends* new (...`args`) => `any`
138994
+ [`TModRow`](../type-aliases/TModRow.md)
138201
138995
 
138202
- #### Returns
138996
+ #### Call Signature
138997
+
138998
+ > **toArray**\<`TC`\>(): [`TOnlyProperties`](../type-aliases/TOnlyProperties.md)\<`InstanceType`\<`TC`\>\> & [`TModRow`](../type-aliases/TModRow.md)
138999
+
139000
+ Defined in: [sys/mod.ts:2065](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2065)
139001
+
139002
+ 将字段复制为普通对象,按指定构造器的实例属性提供类型
139003
+
139004
+ ##### Type Parameters
139005
+
139006
+ ###### TC
139007
+
139008
+ `TC` *extends* new (...`args`) => `object`
139009
+
139010
+ ##### Returns
139011
+
139012
+ [`TOnlyProperties`](../type-aliases/TOnlyProperties.md)\<`InstanceType`\<`TC`\>\> & [`TModRow`](../type-aliases/TModRow.md)
139013
+
139014
+ #### Call Signature
138203
139015
 
138204
- [`TOnlyProperties`](../type-aliases/TOnlyProperties.md)\<`InstanceType`\<`TC`\>\> & `Record`\<`string`, `any`\>
139016
+ > **toArray**\<`TRow`\>(): `TRow`
139017
+
139018
+ Defined in: [sys/mod.ts:2067](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2067)
139019
+
139020
+ 将字段复制为指定类型的普通对象
139021
+
139022
+ ##### Type Parameters
139023
+
139024
+ ###### TRow
139025
+
139026
+ `TRow` *extends* `object`
139027
+
139028
+ ##### Returns
139029
+
139030
+ `TRow`
138205
139031
 
138206
139032
  ***
138207
139033
 
@@ -138209,7 +139035,7 @@ Defined in: [sys/mod.ts:2026](https://github.com/maiyunnet/kebab/blob/master/sys
138209
139035
 
138210
139036
  > **total**(`f?`): `Promise`\<`number`\>
138211
139037
 
138212
- Defined in: [sys/mod.ts:1660](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1660)
139038
+ Defined in: [sys/mod.ts:1699](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1699)
138213
139039
 
138214
139040
  获取总条数,自动抛弃 LIMIT,仅用于获取数据的情况(select)
138215
139041
 
@@ -138229,7 +139055,7 @@ Defined in: [sys/mod.ts:1660](https://github.com/maiyunnet/kebab/blob/master/sys
138229
139055
 
138230
139056
  > **totalEstimate**(): `Promise`\<`number` \| `false`\>
138231
139057
 
138232
- Defined in: [sys/mod.ts:1686](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1686)
139058
+ Defined in: [sys/mod.ts:1725](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1725)
138233
139059
 
138234
139060
  从 PostgreSQL 执行计划估算查询总行数,移除外层排序和分页,不执行数据扫描
138235
139061
  请在应用游标条件前调用;非 PostgreSQL、框架分表联查或查询失败返回 false,绝不回退到 COUNT
@@ -138246,7 +139072,7 @@ Defined in: [sys/mod.ts:1686](https://github.com/maiyunnet/kebab/blob/master/sys
138246
139072
 
138247
139073
  > **union**(`f`, `type?`): `this`
138248
139074
 
138249
- Defined in: [sys/mod.ts:1241](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1241)
139075
+ Defined in: [sys/mod.ts:1264](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1264)
138250
139076
 
138251
139077
  联合查询表数据
138252
139078
 
@@ -138274,7 +139100,7 @@ Defined in: [sys/mod.ts:1241](https://github.com/maiyunnet/kebab/blob/master/sys
138274
139100
 
138275
139101
  > **unionAll**(`f`): `this`
138276
139102
 
138277
- Defined in: [sys/mod.ts:1271](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1271)
139103
+ Defined in: [sys/mod.ts:1294](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1294)
138278
139104
 
138279
139105
  所有联合查询表数据
138280
139106
 
@@ -138296,7 +139122,7 @@ Defined in: [sys/mod.ts:1271](https://github.com/maiyunnet/kebab/blob/master/sys
138296
139122
 
138297
139123
  > **unsaved**(): `boolean`
138298
139124
 
138299
- Defined in: [sys/mod.ts:2045](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2045)
139125
+ Defined in: [sys/mod.ts:2086](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2086)
138300
139126
 
138301
139127
  当前是否设置了未保存 --=
138302
139128
 
@@ -138310,7 +139136,7 @@ Defined in: [sys/mod.ts:2045](https://github.com/maiyunnet/kebab/blob/master/sys
138310
139136
 
138311
139137
  > **updates**(): `Record`\<`string`, `any`\>
138312
139138
 
138313
- Defined in: [sys/mod.ts:2034](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2034)
139139
+ Defined in: [sys/mod.ts:2075](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2075)
138314
139140
 
138315
139141
  获取当前设置要提交的数据
138316
139142
 
@@ -138324,7 +139150,7 @@ Defined in: [sys/mod.ts:2034](https://github.com/maiyunnet/kebab/blob/master/sys
138324
139150
 
138325
139151
  > **upsert**(`conflict`): `Promise`\<`boolean`\>
138326
139152
 
138327
- Defined in: [sys/mod.ts:1022](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1022)
139153
+ Defined in: [sys/mod.ts:1032](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1032)
138328
139154
 
138329
139155
  插入数据,如果业务唯一键已存在则更新,保留已有主键和自动 key
138330
139156
  PGSQL 为原子 UPSERT,自动 key 只生成一次,SQL 错误需回滚事务
@@ -138350,7 +139176,7 @@ MySQL 分步执行;自动 key 有多个唯一索引时须配置 _$index,整
138350
139176
 
138351
139177
  > **where**(`s`): `this`
138352
139178
 
138353
- Defined in: [sys/mod.ts:1928](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1928)
139179
+ Defined in: [sys/mod.ts:1967](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1967)
138354
139180
 
138355
139181
  是 filter 的别名
138356
139182
 
@@ -138372,7 +139198,7 @@ Defined in: [sys/mod.ts:1928](https://github.com/maiyunnet/kebab/blob/master/sys
138372
139198
 
138373
139199
  > `static` **column**(`field`): `object`
138374
139200
 
138375
- Defined in: [sys/mod.ts:200](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L200)
139201
+ Defined in: [sys/mod.ts:219](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L219)
138376
139202
 
138377
139203
  创建字段对象
138378
139204
 
@@ -138404,7 +139230,7 @@ Defined in: [sys/mod.ts:200](https://github.com/maiyunnet/kebab/blob/master/sys/
138404
139230
 
138405
139231
  > `static` **find**\<`T`\>(`db`, `val`, `opt?`): `Promise`\<`false` \| `T` & `Record`\<`string`, `any`\> \| `null`\>
138406
139232
 
138407
- Defined in: [sys/mod.ts:649](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L649)
139233
+ Defined in: [sys/mod.ts:668](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L668)
138408
139234
 
138409
139235
  根据主键(或 key 字段)获取对象
138410
139236
 
@@ -138468,7 +139294,7 @@ Defined in: [sys/mod.ts:649](https://github.com/maiyunnet/kebab/blob/master/sys/
138468
139294
 
138469
139295
  > `static` **getCreate**\<`T`\>(`db`, `opt?`): `T`
138470
139296
 
138471
- Defined in: [sys/mod.ts:631](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L631)
139297
+ Defined in: [sys/mod.ts:650](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L650)
138472
139298
 
138473
139299
  获取创建对象,通常用于新建数据库条目
138474
139300
 
@@ -138512,7 +139338,7 @@ Defined in: [sys/mod.ts:631](https://github.com/maiyunnet/kebab/blob/master/sys/
138512
139338
 
138513
139339
  > `static` **insert**(`db`, `cs`, `vs?`, `opt?`): `Promise`\<`boolean` \| `null`\>
138514
139340
 
138515
- Defined in: [sys/mod.ts:229](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L229)
139341
+ Defined in: [sys/mod.ts:248](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L248)
138516
139342
 
138517
139343
  添加一个序列(允许超过 65536 的占位符会被拆分多次执行)
138518
139344
 
@@ -138566,7 +139392,7 @@ Defined in: [sys/mod.ts:229](https://github.com/maiyunnet/kebab/blob/master/sys/
138566
139392
 
138567
139393
  > `static` **insertSql**(`db`, `cs`, `vs?`, `opt?`): `string`
138568
139394
 
138569
- Defined in: [sys/mod.ts:289](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L289)
139395
+ Defined in: [sys/mod.ts:308](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L308)
138570
139396
 
138571
139397
  获取添加一个序列的模拟 SQL
138572
139398
 
@@ -138620,7 +139446,7 @@ Defined in: [sys/mod.ts:289](https://github.com/maiyunnet/kebab/blob/master/sys/
138620
139446
 
138621
139447
  > `static` **json**\<`T`\>(`obj`): `T`
138622
139448
 
138623
- Defined in: [sys/mod.ts:218](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L218)
139449
+ Defined in: [sys/mod.ts:237](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L237)
138624
139450
 
138625
139451
  标记 JSON 字段;模型内保持原始对象,写入数据库时再序列化
138626
139452
 
@@ -138644,31 +139470,13 @@ Defined in: [sys/mod.ts:218](https://github.com/maiyunnet/kebab/blob/master/sys/
138644
139470
 
138645
139471
  ### one()
138646
139472
 
138647
- 通过 where 条件筛选单条数据
138648
-
138649
- #### Param
138650
-
138651
- **db**
138652
-
138653
- 数据库对象
138654
-
138655
- #### Param
138656
-
138657
- **s**
138658
-
138659
- 筛选条件数组或字符串
138660
-
138661
- #### Param
138662
-
138663
- **opt**
138664
-
138665
- 选项(opt.pre: MySQL 表前缀/PostgreSQL Schema 名;lock 需确保 where 条件命中索引,否则可能退化为表锁)
138666
-
138667
139473
  #### Call Signature
138668
139474
 
138669
- > `static` **one**(`db`, `s`, `opt`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
139475
+ > `static` **one**(`db`, `s`, `opt`): `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
138670
139476
 
138671
- Defined in: [sys/mod.ts:678](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L678)
139477
+ Defined in: [sys/mod.ts:698](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L698)
139478
+
139479
+ 按条件读取一条原生记录,查询失败返回 false,未找到返回 null
138672
139480
 
138673
139481
  ##### Parameters
138674
139482
 
@@ -138682,47 +139490,19 @@ Defined in: [sys/mod.ts:678](https://github.com/maiyunnet/kebab/blob/master/sys/
138682
139490
 
138683
139491
  ###### opt
138684
139492
 
138685
- ###### array
138686
-
138687
- `true`
138688
-
138689
- ###### by?
138690
-
138691
- \[`string` \| `string`[], `"DESC"` \| `"ASC"`\]
138692
-
138693
- ###### ctr?
138694
-
138695
- [`Ctr`](../../ctr/classes/Ctr.md)
138696
-
138697
- ###### hint?
138698
-
138699
- `string`
138700
-
138701
- ###### index?
138702
-
138703
- `string` \| `string`[]
138704
-
138705
- ###### lock?
138706
-
138707
- `boolean`
138708
-
138709
- ###### pre?
138710
-
138711
- `string`
138712
-
138713
- ###### select?
138714
-
138715
- `string` \| `string`[]
139493
+ [`IModOneOptions`](../interfaces/IModOneOptions.md) & `object`
138716
139494
 
138717
139495
  ##### Returns
138718
139496
 
138719
- `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
139497
+ `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
138720
139498
 
138721
139499
  #### Call Signature
138722
139500
 
138723
- > `static` **one**\<`T`\>(`db`, `s`, `opt?`): `Promise`\<`false` \| `T` & `Record`\<`string`, `any`\> \| `null`\>
139501
+ > `static` **one**\<`T`\>(`db`, `s`, `opt?`): `Promise`\<`false` \| `T` & [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
139502
+
139503
+ Defined in: [sys/mod.ts:704](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L704)
138724
139504
 
138725
- Defined in: [sys/mod.ts:692](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L692)
139505
+ 按条件读取一个模型实例,查询失败返回 false,未找到返回 null
138726
139506
 
138727
139507
  ##### Type Parameters
138728
139508
 
@@ -138742,97 +139522,113 @@ Defined in: [sys/mod.ts:692](https://github.com/maiyunnet/kebab/blob/master/sys/
138742
139522
 
138743
139523
  ###### opt?
138744
139524
 
138745
- ###### array?
139525
+ [`IModOneOptions`](../interfaces/IModOneOptions.md) & `object`
138746
139526
 
138747
- `false`
139527
+ ##### Returns
138748
139528
 
138749
- ###### by?
139529
+ `Promise`\<`false` \| `T` & [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
138750
139530
 
138751
- \[`string` \| `string`[], `"DESC"` \| `"ASC"`\]
139531
+ #### Call Signature
138752
139532
 
138753
- ###### ctr?
139533
+ > `static` **one**\<`TRow`\>(`db`, `s`, `opt`): `Promise`\<`false` \| `TRow` \| `null`\>
138754
139534
 
138755
- [`Ctr`](../../ctr/classes/Ctr.md)
139535
+ Defined in: [sys/mod.ts:710](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L710)
138756
139536
 
138757
- ###### hint?
139537
+ 按条件读取一条指定类型的原生记录,查询失败返回 false,未找到返回 null
138758
139538
 
138759
- `string`
139539
+ ##### Type Parameters
138760
139540
 
138761
- ###### index?
139541
+ ###### TRow
138762
139542
 
138763
- `string` \| `string`[]
139543
+ `TRow` *extends* `object`
138764
139544
 
138765
- ###### lock?
139545
+ ##### Parameters
138766
139546
 
138767
- `boolean`
139547
+ ###### db
138768
139548
 
138769
- ###### pre?
139549
+ [`Transaction`](../../../lib/db/tran/classes/Transaction.md) \| [`Pool`](../../../lib/db/pool/classes/Pool.md)
138770
139550
 
138771
- `string`
139551
+ ###### s
138772
139552
 
138773
- ###### select?
139553
+ `any`
138774
139554
 
138775
- `string` \| `string`[]
139555
+ ###### opt
139556
+
139557
+ [`IModOneOptions`](../interfaces/IModOneOptions.md) & `object`
138776
139558
 
138777
139559
  ##### Returns
138778
139560
 
138779
- `Promise`\<`false` \| `T` & `Record`\<`string`, `any`\> \| `null`\>
139561
+ `Promise`\<`false` \| `TRow` \| `null`\>
138780
139562
 
138781
139563
  ***
138782
139564
 
138783
139565
  ### oneArray()
138784
139566
 
138785
- > `static` **oneArray**(`db`, `s`, `opt?`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
139567
+ #### Call Signature
139568
+
139569
+ > `static` **oneArray**(`db`, `s`, `opt?`): `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
138786
139570
 
138787
- Defined in: [sys/mod.ts:773](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L773)
139571
+ Defined in: [sys/mod.ts:768](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L768)
138788
139572
 
138789
139573
  通过 where 条件筛选单条数据返回原生对象
138790
139574
 
138791
- #### Parameters
139575
+ ##### Parameters
138792
139576
 
138793
- ##### db
139577
+ ###### db
138794
139578
 
138795
139579
  [`Transaction`](../../../lib/db/tran/classes/Transaction.md) \| [`Pool`](../../../lib/db/pool/classes/Pool.md)
138796
139580
 
138797
139581
  数据库对象
138798
139582
 
138799
- ##### s
139583
+ ###### s
138800
139584
 
138801
139585
  `any`
138802
139586
 
138803
139587
  筛选条件数组或字符串
138804
139588
 
138805
- ##### opt?
139589
+ ###### opt?
138806
139590
 
138807
- 选项(opt.pre: MySQL 表前缀/PostgreSQL Schema 名)
139591
+ `Omit`\<[`IModOneOptions`](../interfaces/IModOneOptions.md), `"by"`\>
138808
139592
 
138809
- ###### ctr?
139593
+ 查询和加锁选项
138810
139594
 
138811
- [`Ctr`](../../ctr/classes/Ctr.md)
139595
+ ##### Returns
138812
139596
 
138813
- ###### hint?
139597
+ `Promise`\<`false` \| [`TModRow`](../type-aliases/TModRow.md) \| `null`\>
138814
139598
 
138815
- `string`
139599
+ 原生对象,查询失败返回 false,未找到返回 null
138816
139600
 
138817
- ###### index?
139601
+ #### Call Signature
138818
139602
 
138819
- `string` \| `string`[]
139603
+ > `static` **oneArray**\<`TRow`\>(`db`, `s`, `opt?`): `Promise`\<`false` \| `TRow` \| `null`\>
138820
139604
 
138821
- ###### lock?
139605
+ Defined in: [sys/mod.ts:774](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L774)
138822
139606
 
138823
- `boolean`
139607
+ 按条件读取一条指定类型的原生记录,查询失败返回 false,未找到返回 null
138824
139608
 
138825
- ###### pre?
139609
+ ##### Type Parameters
138826
139610
 
138827
- `string`
139611
+ ###### TRow
138828
139612
 
138829
- ###### select?
139613
+ `TRow` *extends* `object`
138830
139614
 
138831
- `string` \| `string`[]
139615
+ ##### Parameters
138832
139616
 
138833
- #### Returns
139617
+ ###### db
139618
+
139619
+ [`Transaction`](../../../lib/db/tran/classes/Transaction.md) \| [`Pool`](../../../lib/db/pool/classes/Pool.md)
139620
+
139621
+ ###### s
139622
+
139623
+ `any`
138834
139624
 
138835
- `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
139625
+ ###### opt?
139626
+
139627
+ `Omit`\<[`IModOneOptions`](../interfaces/IModOneOptions.md), `"by"`\>
139628
+
139629
+ ##### Returns
139630
+
139631
+ `Promise`\<`false` \| `TRow` \| `null`\>
138836
139632
 
138837
139633
  ***
138838
139634
 
@@ -138884,7 +139680,7 @@ where 条件
138884
139680
 
138885
139681
  > `static` **removeByWhere**(`db`, `where`, `opt?`): `Promise`\<`number` \| `false` \| `null`\>
138886
139682
 
138887
- Defined in: [sys/mod.ts:315](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L315)
139683
+ Defined in: [sys/mod.ts:334](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L334)
138888
139684
 
138889
139685
  根据条件移除条目
138890
139686
 
@@ -138936,7 +139732,7 @@ Defined in: [sys/mod.ts:315](https://github.com/maiyunnet/kebab/blob/master/sys/
138936
139732
 
138937
139733
  > `static` **removeByWhereSql**(`db`, `where`, `opt?`): [`Sql`](../../../lib/sql/classes/Sql.md)
138938
139734
 
138939
- Defined in: [sys/mod.ts:359](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L359)
139735
+ Defined in: [sys/mod.ts:378](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L378)
138940
139736
 
138941
139737
  根据条件移除条目(仅获取 SQL 对象)
138942
139738
 
@@ -138986,9 +139782,9 @@ Defined in: [sys/mod.ts:359](https://github.com/maiyunnet/kebab/blob/master/sys/
138986
139782
 
138987
139783
  ### select()
138988
139784
 
138989
- > `static` **select**\<`T`\>(`db`, `c`, `opt?`): `T` & `Record`\<`string`, `any`\>
139785
+ > `static` **select**\<`T`\>(`db`, `c`, `opt?`): `T`
138990
139786
 
138991
- Defined in: [sys/mod.ts:568](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L568)
139787
+ Defined in: [sys/mod.ts:587](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L587)
138992
139788
 
138993
139789
  select 自定字段
138994
139790
 
@@ -139050,35 +139846,63 @@ select 自定字段
139050
139846
 
139051
139847
  #### Returns
139052
139848
 
139053
- `T` & `Record`\<`string`, `any`\>
139849
+ `T`
139054
139850
 
139055
139851
  ***
139056
139852
 
139057
139853
  ### toArrayByRecord()
139058
139854
 
139059
- > `static` **toArrayByRecord**\<`T`\>(`obj`): `Record`\<`string`, `Record`\<`string`, `any`\>\>
139855
+ #### Call Signature
139060
139856
 
139061
- Defined in: [sys/mod.ts:822](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L822)
139857
+ > `static` **toArrayByRecord**\<`T`\>(`obj`): `Record`\<`string`, [`TModRow`](../type-aliases/TModRow.md)\>
139062
139858
 
139063
- 将 key val 组成的数据列表转换为原生对象模式,获取的是新创建的数组
139859
+ Defined in: [sys/mod.ts:823](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L823)
139064
139860
 
139065
- #### Type Parameters
139861
+ 将模型字典转换为普通对象字典,沿用原有键
139066
139862
 
139067
- ##### T
139863
+ ##### Type Parameters
139864
+
139865
+ ###### T
139068
139866
 
139069
139867
  `T` *extends* `Mod`
139070
139868
 
139071
- #### Parameters
139869
+ ##### Parameters
139072
139870
 
139073
- ##### obj
139871
+ ###### obj
139074
139872
 
139075
139873
  `Record`\<`string`, `T`\>
139076
139874
 
139077
- 要转换的 kv 数据列表
139875
+ 要转换的模型字典
139078
139876
 
139079
- #### Returns
139877
+ ##### Returns
139878
+
139879
+ `Record`\<`string`, [`TModRow`](../type-aliases/TModRow.md)\>
139880
+
139881
+ 转换后的普通对象字典
139882
+
139883
+ #### Call Signature
139080
139884
 
139081
- `Record`\<`string`, `Record`\<`string`, `any`\>\>
139885
+ > `static` **toArrayByRecord**\<`TRow`\>(`obj`): `Record`\<`string`, `TRow`\>
139886
+
139887
+ Defined in: [sys/mod.ts:827](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L827)
139888
+
139889
+ 将模型字典转换为指定行类型的普通对象字典
139890
+
139891
+ ##### Type Parameters
139892
+
139893
+ ###### TRow
139894
+
139895
+ `TRow` *extends* `object`
139896
+
139897
+ ##### Parameters
139898
+
139899
+ ###### obj
139900
+
139901
+ `Record`\<`string`, `Mod`\>
139902
+
139903
+ ##### Returns
139904
+
139905
+ `Record`\<`string`, `TRow`\>
139082
139906
 
139083
139907
  ***
139084
139908
 
@@ -139086,7 +139910,7 @@ Defined in: [sys/mod.ts:822](https://github.com/maiyunnet/kebab/blob/master/sys/
139086
139910
 
139087
139911
  > `static` **updateByWhere**(`db`, `data`, `where`, `opt?`): `Promise`\<`number` \| `false` \| `null`\>
139088
139912
 
139089
- Defined in: [sys/mod.ts:392](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L392)
139913
+ Defined in: [sys/mod.ts:411](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L411)
139090
139914
 
139091
139915
  根据条件更新数据
139092
139916
 
@@ -139144,7 +139968,7 @@ Defined in: [sys/mod.ts:392](https://github.com/maiyunnet/kebab/blob/master/sys/
139144
139968
 
139145
139969
  > `static` **updateByWhereSql**(`db`, `data`, `where`, `opt?`): [`Sql`](../../../lib/sql/classes/Sql.md)
139146
139970
 
139147
- Defined in: [sys/mod.ts:438](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L438)
139971
+ Defined in: [sys/mod.ts:457](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L457)
139148
139972
 
139149
139973
  根据条件更新数据(仅获取 SQL 对象)
139150
139974
 
@@ -139202,7 +140026,7 @@ Defined in: [sys/mod.ts:438](https://github.com/maiyunnet/kebab/blob/master/sys/
139202
140026
 
139203
140027
  > `static` **updateList**(`db`, `data`, `key`, `opt?`): `Promise`\<`boolean` \| `null`\>
139204
140028
 
139205
- Defined in: [sys/mod.ts:476](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L476)
140029
+ Defined in: [sys/mod.ts:495](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L495)
139206
140030
 
139207
140031
  批量更新数据
139208
140032
 
@@ -139260,7 +140084,7 @@ Defined in: [sys/mod.ts:476](https://github.com/maiyunnet/kebab/blob/master/sys/
139260
140084
 
139261
140085
  > `static` **value**(`val`): `object`
139262
140086
 
139263
- Defined in: [sys/mod.ts:209](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L209)
140087
+ Defined in: [sys/mod.ts:228](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L228)
139264
140088
 
139265
140089
  创建字面量值对象,用于 where 条件中 v[0] 需要是值而非字段名的场景
139266
140090
 
@@ -139290,9 +140114,9 @@ Defined in: [sys/mod.ts:209](https://github.com/maiyunnet/kebab/blob/master/sys/
139290
140114
 
139291
140115
  ### where()
139292
140116
 
139293
- > `static` **where**\<`T`\>(`db`, `s?`, `opt?`): `T` & `Record`\<`string`, `any`\>
140117
+ > `static` **where**\<`T`\>(`db`, `s?`, `opt?`): `T`
139294
140118
 
139295
- Defined in: [sys/mod.ts:600](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L600)
140119
+ Defined in: [sys/mod.ts:619](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L619)
139296
140120
 
139297
140121
  通过 where 条件获取模型
139298
140122
 
@@ -139354,7 +140178,7 @@ Defined in: [sys/mod.ts:600](https://github.com/maiyunnet/kebab/blob/master/sys/
139354
140178
 
139355
140179
  #### Returns
139356
140180
 
139357
- `T` & `Record`\<`string`, `any`\>
140181
+ `T`
139358
140182
 
139359
140183
  sys/mod/classes/Rows.md
139360
140184
  ---
@@ -139367,7 +140191,7 @@ sys/mod/classes/Rows.md
139367
140191
 
139368
140192
  # Class: Rows\<T\>
139369
140193
 
139370
- Defined in: [sys/mod.ts:28](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L28)
140194
+ Defined in: [sys/mod.ts:44](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L44)
139371
140195
 
139372
140196
  条数列表
139373
140197
 
@@ -139387,7 +140211,7 @@ Defined in: [sys/mod.ts:28](https://github.com/maiyunnet/kebab/blob/master/sys/m
139387
140211
 
139388
140212
  > **new Rows**\<`T`\>(`initialItems?`): `Rows`\<`T`\>
139389
140213
 
139390
- Defined in: [sys/mod.ts:32](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L32)
140214
+ Defined in: [sys/mod.ts:48](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L48)
139391
140215
 
139392
140216
  #### Parameters
139393
140217
 
@@ -139407,7 +140231,7 @@ Defined in: [sys/mod.ts:32](https://github.com/maiyunnet/kebab/blob/master/sys/m
139407
140231
 
139408
140232
  > **get** **length**(): `number`
139409
140233
 
139410
- Defined in: [sys/mod.ts:37](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L37)
140234
+ Defined in: [sys/mod.ts:53](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L53)
139411
140235
 
139412
140236
  总行数
139413
140237
 
@@ -139425,7 +140249,7 @@ Defined in: [sys/mod.ts:37](https://github.com/maiyunnet/kebab/blob/master/sys/m
139425
140249
 
139426
140250
  > **\[iterator\]**(): `IterableIterator`\<`T`\>
139427
140251
 
139428
- Defined in: [sys/mod.ts:66](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L66)
140252
+ Defined in: [sys/mod.ts:85](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L85)
139429
140253
 
139430
140254
  for of
139431
140255
 
@@ -139443,7 +140267,7 @@ for of
139443
140267
 
139444
140268
  > **filter**(`predicate`): `Rows`\<`T`\>
139445
140269
 
139446
- Defined in: [sys/mod.ts:52](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L52)
140270
+ Defined in: [sys/mod.ts:71](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L71)
139447
140271
 
139448
140272
  根据规则筛掉项,predicate 返回 true 代表保留
139449
140273
 
@@ -139463,7 +140287,7 @@ Defined in: [sys/mod.ts:52](https://github.com/maiyunnet/kebab/blob/master/sys/m
139463
140287
 
139464
140288
  > **item**(`index`): `T`
139465
140289
 
139466
- Defined in: [sys/mod.ts:42](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L42)
140290
+ Defined in: [sys/mod.ts:58](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L58)
139467
140291
 
139468
140292
  通过索引获取一个对象
139469
140293
 
@@ -139487,7 +140311,7 @@ Defined in: [sys/mod.ts:42](https://github.com/maiyunnet/kebab/blob/master/sys/m
139487
140311
 
139488
140312
  > **map**\<`TU`\>(`callbackfn`): `TU`[]
139489
140313
 
139490
- Defined in: [sys/mod.ts:57](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L57)
140314
+ Defined in: [sys/mod.ts:76](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L76)
139491
140315
 
139492
140316
  重塑对象内容为数组
139493
140317
 
@@ -139511,20 +140335,44 @@ Defined in: [sys/mod.ts:57](https://github.com/maiyunnet/kebab/blob/master/sys/m
139511
140335
 
139512
140336
  ### toArray()
139513
140337
 
139514
- > **toArray**(): `Record`\<`string`, `any`\>[]
140338
+ #### Call Signature
139515
140339
 
139516
- Defined in: [sys/mod.ts:47](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L47)
140340
+ > **toArray**(): [`TModRow`](../type-aliases/TModRow.md)[]
139517
140341
 
139518
- 转换为数组对象,获取的是新创建的数组
140342
+ Defined in: [sys/mod.ts:63](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L63)
139519
140343
 
139520
- #### Returns
140344
+ 将模型转换为普通对象数组
139521
140345
 
139522
- `Record`\<`string`, `any`\>[]
140346
+ ##### Returns
139523
140347
 
139524
- #### Implementation of
140348
+ [`TModRow`](../type-aliases/TModRow.md)[]
140349
+
140350
+ ##### Implementation of
139525
140351
 
139526
140352
  [`IRows`](../interfaces/IRows.md).[`toArray`](../interfaces/IRows.md#toarray)
139527
140353
 
140354
+ #### Call Signature
140355
+
140356
+ > **toArray**\<`TRow`\>(): `TRow`[]
140357
+
140358
+ Defined in: [sys/mod.ts:65](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L65)
140359
+
140360
+ 将模型转换为指定行类型的普通对象数组
140361
+
140362
+ ##### Type Parameters
140363
+
140364
+ ###### TRow
140365
+
140366
+ `TRow` *extends* `object`
140367
+
140368
+ ##### Returns
140369
+
140370
+ `TRow`[]
140371
+
140372
+ ##### Implementation of
140373
+
140374
+ `IRows.toArray`
140375
+
139528
140376
  sys/mod/index.md
139529
140377
  ---
139530
140378
 
@@ -139544,11 +140392,13 @@ sys/mod/index.md
139544
140392
  ## Interfaces
139545
140393
 
139546
140394
  - [ICursorPage](interfaces/ICursorPage.md)
140395
+ - [IModOneOptions](interfaces/IModOneOptions.md)
139547
140396
  - [IModUnionItem](interfaces/IModUnionItem.md)
139548
140397
  - [IRows](interfaces/IRows.md)
139549
140398
 
139550
140399
  ## Type Aliases
139551
140400
 
140401
+ - [TModRow](type-aliases/TModRow.md)
139552
140402
  - [TOnlyProperties](type-aliases/TOnlyProperties.md)
139553
140403
 
139554
140404
  sys/mod/interfaces/ICursorPage.md
@@ -139562,7 +140412,7 @@ sys/mod/interfaces/ICursorPage.md
139562
140412
 
139563
140413
  # Interface: ICursorPage\<T\>
139564
140414
 
139565
- Defined in: [sys/mod.ts:20](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L20)
140415
+ Defined in: [sys/mod.ts:36](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L36)
139566
140416
 
139567
140417
  一批游标查询结果,hasMore 表示扫描方向上还有记录
139568
140418
 
@@ -139570,7 +140420,7 @@ Defined in: [sys/mod.ts:20](https://github.com/maiyunnet/kebab/blob/master/sys/m
139570
140420
 
139571
140421
  ### T
139572
140422
 
139573
- `T` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
140423
+ `T` *extends* `object` = `Record`\<`string`, `unknown`\>
139574
140424
 
139575
140425
  ## Properties
139576
140426
 
@@ -139578,7 +140428,7 @@ Defined in: [sys/mod.ts:20](https://github.com/maiyunnet/kebab/blob/master/sys/m
139578
140428
 
139579
140429
  > **hasMore**: `boolean`
139580
140430
 
139581
- Defined in: [sys/mod.ts:22](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L22)
140431
+ Defined in: [sys/mod.ts:38](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L38)
139582
140432
 
139583
140433
  ***
139584
140434
 
@@ -139586,7 +140436,7 @@ Defined in: [sys/mod.ts:22](https://github.com/maiyunnet/kebab/blob/master/sys/m
139586
140436
 
139587
140437
  > **list**: `T`[]
139588
140438
 
139589
- Defined in: [sys/mod.ts:21](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L21)
140439
+ Defined in: [sys/mod.ts:37](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L37)
139590
140440
 
139591
140441
  ***
139592
140442
 
@@ -139594,7 +140444,7 @@ Defined in: [sys/mod.ts:21](https://github.com/maiyunnet/kebab/blob/master/sys/m
139594
140444
 
139595
140445
  > **next**: [`TCursorValue`](../../../lib/sql/type-aliases/TCursorValue.md)[] \| `null`
139596
140446
 
139597
- Defined in: [sys/mod.ts:23](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L23)
140447
+ Defined in: [sys/mod.ts:39](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L39)
139598
140448
 
139599
140449
  ***
139600
140450
 
@@ -139602,8 +140452,83 @@ Defined in: [sys/mod.ts:23](https://github.com/maiyunnet/kebab/blob/master/sys/m
139602
140452
 
139603
140453
  > **previous**: [`TCursorValue`](../../../lib/sql/type-aliases/TCursorValue.md)[] \| `null`
139604
140454
 
140455
+ Defined in: [sys/mod.ts:40](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L40)
140456
+
140457
+ sys/mod/interfaces/IModOneOptions.md
140458
+ ---
140459
+
140460
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
140461
+
140462
+ ***
140463
+
140464
+ [Documents for @maiyunnet/kebab](../../../index.md) / [sys/mod](../index.md) / IModOneOptions
140465
+
140466
+ # Interface: IModOneOptions
140467
+
140468
+ Defined in: [sys/mod.ts:23](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L23)
140469
+
140470
+ 按条件查询单条记录的选项
140471
+
140472
+ ## Properties
140473
+
140474
+ ### by?
140475
+
140476
+ > `optional` **by?**: \[`string` \| `string`[], `"DESC"` \| `"ASC"`\]
140477
+
140478
+ Defined in: [sys/mod.ts:31](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L31)
140479
+
140480
+ ***
140481
+
140482
+ ### ctr?
140483
+
140484
+ > `optional` **ctr?**: [`Ctr`](../../ctr/classes/Ctr.md)
140485
+
139605
140486
  Defined in: [sys/mod.ts:24](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L24)
139606
140487
 
140488
+ ***
140489
+
140490
+ ### hint?
140491
+
140492
+ > `optional` **hint?**: `string`
140493
+
140494
+ Defined in: [sys/mod.ts:32](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L32)
140495
+
140496
+ ***
140497
+
140498
+ ### index?
140499
+
140500
+ > `optional` **index?**: `string` \| `string`[]
140501
+
140502
+ Defined in: [sys/mod.ts:29](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L29)
140503
+
140504
+ ***
140505
+
140506
+ ### lock?
140507
+
140508
+ > `optional` **lock?**: `boolean`
140509
+
140510
+ Defined in: [sys/mod.ts:26](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L26)
140511
+
140512
+ 加锁时确保 WHERE 条件命中索引,以免锁定过多记录
140513
+
140514
+ ***
140515
+
140516
+ ### pre?
140517
+
140518
+ > `optional` **pre?**: `string`
140519
+
140520
+ Defined in: [sys/mod.ts:28](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L28)
140521
+
140522
+ MySQL 表前缀或 PostgreSQL Schema 名
140523
+
140524
+ ***
140525
+
140526
+ ### select?
140527
+
140528
+ > `optional` **select?**: `string` \| `string`[]
140529
+
140530
+ Defined in: [sys/mod.ts:30](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L30)
140531
+
139607
140532
  sys/mod/interfaces/IModUnionItem.md
139608
140533
  ---
139609
140534
 
@@ -139615,7 +140540,7 @@ sys/mod/interfaces/IModUnionItem.md
139615
140540
 
139616
140541
  # Interface: IModUnionItem
139617
140542
 
139618
- Defined in: [sys/mod.ts:2088](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2088)
140543
+ Defined in: [sys/mod.ts:2129](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2129)
139619
140544
 
139620
140545
  ## Properties
139621
140546
 
@@ -139623,7 +140548,7 @@ Defined in: [sys/mod.ts:2088](https://github.com/maiyunnet/kebab/blob/master/sys
139623
140548
 
139624
140549
  > **field**: `string`
139625
140550
 
139626
- Defined in: [sys/mod.ts:2089](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2089)
140551
+ Defined in: [sys/mod.ts:2130](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2130)
139627
140552
 
139628
140553
  ***
139629
140554
 
@@ -139631,7 +140556,7 @@ Defined in: [sys/mod.ts:2089](https://github.com/maiyunnet/kebab/blob/master/sys
139631
140556
 
139632
140557
  > `optional` **where?**: `any`
139633
140558
 
139634
- Defined in: [sys/mod.ts:2090](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2090)
140559
+ Defined in: [sys/mod.ts:2131](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2131)
139635
140560
 
139636
140561
  sys/mod/interfaces/IRows.md
139637
140562
  ---
@@ -139644,7 +140569,7 @@ sys/mod/interfaces/IRows.md
139644
140569
 
139645
140570
  # Interface: IRows\<T\>
139646
140571
 
139647
- Defined in: [sys/mod.ts:2082](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2082)
140572
+ Defined in: [sys/mod.ts:2123](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2123)
139648
140573
 
139649
140574
  ## Extends
139650
140575
 
@@ -139662,7 +140587,7 @@ Defined in: [sys/mod.ts:2082](https://github.com/maiyunnet/kebab/blob/master/sys
139662
140587
 
139663
140588
  > `readonly` **length**: `number`
139664
140589
 
139665
- Defined in: [sys/mod.ts:2083](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2083)
140590
+ Defined in: [sys/mod.ts:2124](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2124)
139666
140591
 
139667
140592
  ## Methods
139668
140593
 
@@ -139670,7 +140595,7 @@ Defined in: [sys/mod.ts:2083](https://github.com/maiyunnet/kebab/blob/master/sys
139670
140595
 
139671
140596
  > **item**(`index`): `T`
139672
140597
 
139673
- Defined in: [sys/mod.ts:2084](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2084)
140598
+ Defined in: [sys/mod.ts:2125](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2125)
139674
140599
 
139675
140600
  #### Parameters
139676
140601
 
@@ -139688,12 +140613,29 @@ Defined in: [sys/mod.ts:2084](https://github.com/maiyunnet/kebab/blob/master/sys
139688
140613
 
139689
140614
  > **toArray**(): `Record`\<`string`, `any`\>[]
139690
140615
 
139691
- Defined in: [sys/mod.ts:2085](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2085)
140616
+ Defined in: [sys/mod.ts:2126](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2126)
139692
140617
 
139693
140618
  #### Returns
139694
140619
 
139695
140620
  `Record`\<`string`, `any`\>[]
139696
140621
 
140622
+ sys/mod/type-aliases/TModRow.md
140623
+ ---
140624
+
140625
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
140626
+
140627
+ ***
140628
+
140629
+ [Documents for @maiyunnet/kebab](../../../index.md) / [sys/mod](../index.md) / TModRow
140630
+
140631
+ # Type Alias: TModRow
140632
+
140633
+ > **TModRow** = `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>
140634
+
140635
+ Defined in: [sys/mod.ts:20](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L20)
140636
+
140637
+ 由 SELECT 决定字段的原生查询行
140638
+
139697
140639
  sys/mod/type-aliases/TOnlyProperties.md
139698
140640
  ---
139699
140641