@maiyunnet/kebab 9.19.0 → 9.20.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/doc/kebab-rag.md CHANGED
@@ -121,6 +121,157 @@ public create(): kebab.Json[] {
121
121
 
122
122
  `_valibotx` 默认先校验 `_xsrf`,通过后才运行 schema,且 `_xsrf` 不会被自动加入 schema 输出。仅在已有等效安全机制时才可使用 `{ 'ignoreXsrf': true }`。只读请求使用 `_valibot`。
123
123
 
124
+ query-pagination.md
125
+ ---
126
+
127
+ # 游标分页与 PostgreSQL 近似总数
128
+
129
+ 日志、硬件消息等大量追加记录的列表,可以用 `allCursor()` 顺序读取上一批、下一批,并通过 `totalEstimate()` 展示近似总量。普通 `page()`、`total()` 保持原有行为。
130
+
131
+ ## by() 与 seek()
132
+
133
+ `by()` 只设置 ORDER BY,支持各字段使用不同的排序方向。`seek(fields, values?, direction?)` 用于非空、同向排序的游标字段:传入 `values` 时,在原 WHERE 后追加参数化边界条件,再调用 `by()` 设置排序;不传 `values` 时,只校验字段并设置排序。
134
+
135
+ ```ts
136
+ // --- 首批:相同字段、方向下,两种写法生成相同 SQL ---
137
+ base.copy().by(['time_add', 'id'], 'DESC').limit(20);
138
+ base.copy().seek(['time_add', 'id']).limit(20);
139
+
140
+ // --- 下一批:传上一批末行的值,增加 WHERE 边界,无 OFFSET ---
141
+ base.copy().seek(['time_add', 'id'], [1700500000, '9007199254740993']).limit(20);
142
+ ```
143
+
144
+ 最后一条查询在原筛选后追加的条件相当于:
145
+
146
+ ```sql
147
+ AND (time_add, id) < (?, ?)
148
+ AND time_add <= ?
149
+ ORDER BY time_add DESC, id DESC
150
+ LIMIT 20
151
+ ```
152
+
153
+ 这是使用 `?` 表示参数位置的示意;PostgreSQL 实际使用 `$1`、`$2` 等占位符。复合边界中的 ID 区分同一时间的记录;显式首列范围有助于 PostgreSQL 收紧索引扫描边界。升序使用 `>` 和 `>=`。
154
+
155
+ `seek()` 必须在排序、分页、分组之前调用,不需要再调用 `by()`。它只构建 SQL,业务分页推荐使用模型的 `allCursor()`,由模型处理多取一条和上一批结果的顺序恢复。
156
+
157
+ ## allCursor() 的返回值
158
+
159
+ `allCursor(count, options)` 多取一条,通过实际查询结果判断还有没有后续记录,返回的 `list` 最多包含 `count` 条。查询失败返回 `false`;成功但无匹配记录时,`list` 为空,两个游标为 `null`。
160
+
161
+ | 字段 | 含义 |
162
+ | --- | --- |
163
+ | `list` | 本批数据,始终保持 `order` 指定的展示顺序 |
164
+ | `next` | 本批末行的排序字段值,用于读取下一批 |
165
+ | `previous` | 本批首行的排序字段值,用于读取上一批 |
166
+ | `hasMore` | 沿本次查询方向,是否还有更多记录 |
167
+
168
+ `next`、`previous` 是行边界,不是翻页许可。第一页的 `previous`、最后一页的 `next` 都可能有值,不能仅凭游标非空启用按钮。
169
+
170
+ ## 首批、下一页与上一页
171
+
172
+ | 操作 | `cursor` | `before` | 返回的 `hasMore` 表示 |
173
+ | --- | --- | --- | --- |
174
+ | 首次查询 | 不传 | 不传或 `false` | 是否还有下一页 |
175
+ | 下一页 | 当前结果的 `next` | `false` | 是否还有下一页 |
176
+ | 上一页 | 当前结果的 `previous` | `true` | 是否还有上一页 |
177
+
178
+ 无论向哪边翻页,`order` 都保持原展示方向。`before: true` 时,框架内部反向扫描,截取本批数据后再反转列表,调用方不用再次反转。
179
+
180
+ 每次查询成功后,都要保存新结果的首末行游标。翻页期间保持筛选条件、结束时间、每批数量和排序不变;筛选或数量变化时重新读取首批。
181
+
182
+ ## 业务侧的翻页按钮
183
+
184
+ 下面以 PostgreSQL 消息模型为例,假设 `db`、`mMessage`、已校验的 `start` 和固定的 `end` 已由调用方提供。实际项目应把实体查询放在自定义 MOD 中。
185
+
186
+ ```ts
187
+ import * as lSql from '@maiyunnet/kebab/lib/sql.js';
188
+
189
+ const query = mMessage.select<mMessage>(db, [
190
+ 'm.id::text id', 'm.time_add',
191
+ ], { 'alias': 'm' }).filter([
192
+ ['m.time_add', '>=', start],
193
+ ['m.time_add', '<=', end],
194
+ ]);
195
+
196
+ /**
197
+ * --- 读取一批消息,并将扫描方向转换为上一页、下一页状态 ---
198
+ * @param direction 翻页方向,首次读取使用 next 且不传 cursor
199
+ * @param cursor 当前页的末行或首行游标
200
+ * @returns 分页结果;数据库查询失败返回 false
201
+ */
202
+ async function readPage(direction: 'next' | 'prev', cursor?: lSql.TCursorValue[]) {
203
+ const before = direction === 'prev';
204
+ const page = await query.allCursor(20, {
205
+ 'by': ['m.time_add', 'm.id'],
206
+ 'order': 'DESC',
207
+ 'cursor': cursor,
208
+ 'before': before,
209
+ });
210
+ if (page === false) {
211
+ return false;
212
+ }
213
+ const returnedRows = page.list.length > 0;
214
+ return {
215
+ 'list': page.list,
216
+ 'nextCursor': page.next,
217
+ 'prevCursor': page.previous,
218
+ 'hasNext': before ? !!cursor && returnedRows : page.hasMore,
219
+ 'hasPrev': before ? page.hasMore : !!cursor && returnedRows,
220
+ };
221
+ }
222
+
223
+ // --- 首次查询 ---
224
+ let current = await readPage('next');
225
+
226
+ // --- 点击下一页:传当前页末行游标 ---
227
+ if (current !== false && current.hasNext && current.nextCursor) {
228
+ const result = await readPage('next', current.nextCursor);
229
+ if (result !== false) {
230
+ current = result;
231
+ }
232
+ }
233
+
234
+ // --- 点击上一页:传当前页首行游标,readPage 内部设置 before: true ---
235
+ if (current !== false && current.hasPrev && current.prevCursor) {
236
+ const result = await readPage('prev', current.prevCursor);
237
+ if (result !== false) {
238
+ current = result;
239
+ }
240
+ }
241
+ ```
242
+
243
+ 沿查询方向的按钮状态来自 `hasMore`;另一侧根据“已从那一页翻过来,并且本次返回非空结果”的浏览状态判断,这没有同时扫描两侧。如果业务允许删除历史记录,反方向状态也可能变化;翻页查询失败或原有页面因删除变为空时,界面可以保留原页并提示重新刷新。
244
+
245
+ 例如,每批两条、降序记录为 `92、82、80、79`:首批 `92、82` 有下一页、无上一页;传其 `next` 得到 `80、79`,无下一页、有上一页;再传这一批的 `previous` 并设置 `before: true`,返回 `92、82`。
246
+
247
+ ## 近似总数
248
+
249
+ `totalEstimate()` 仅支持 PostgreSQL。它移除原 SELECT 的外层 ORDER BY、LIMIT/OFFSET,执行普通 `EXPLAIN (FORMAT JSON)`,读取顶层 `Plan Rows`;不使用 ANALYZE,不执行原 SELECT,也不回退到 COUNT。
250
+
251
+ ```ts
252
+ // --- 对基础筛选估算一次,不带游标条件 ---
253
+ const estimated = await query.totalEstimate();
254
+ const total = estimated === false ? null : estimated;
255
+ ```
256
+
257
+ 失败、其他数据库、框架分表模式或 contain 返回 `false`,不能解释为总数为零。统计信息陈旧、字段相关性或罕见取值可能导致明显偏差;即使估算为 1,实际查询也可能没有匹配记录。
258
+
259
+ 界面应明确标注近似总数,例如“约 120 万条”,仅首次筛选时估算,翻页复用。按钮由实际分页结果决定,不能根据近似总数计算是否允许继续翻页。首批已经读取完整结果时,可以用 `list.length` 得到精确总数。
260
+
261
+ 展示用途的 JOIN 如果不改变原始记录的筛选或数量,可以对不带 JOIN 的基础实体查询估算;JOIN 参与筛选或产生重复行时,需要先明确统计的对象。
262
+
263
+ ## 字段、索引与限制
264
+
265
+ - 排序字段必须全部非空、方向一致,且组合唯一,通常使用 `time_add、id`。
266
+ - SELECT 必须包含排序字段。`by` 有表别名时,默认从结果中取不带表别名的 key;结果字段改名时,通过 `keys` 显式指定对应关系。
267
+ - 大整数在数据库投影时取为字符串,并以字符串传回。不能先由驱动转成不安全的 Number,再 stringify。上例 PostgreSQL 使用 `m.id::text id`,排序仍使用原表数值字段 `m.id`。
268
+ - `null`、不安全的数值边界、非法字段和不支持的查询结构会抛出配置错误。字段和排序规则由服务端固定,游标及筛选参数在请求入口校验。
269
+ - 支持 PostgreSQL 原生分区表、MySQL 普通表;不支持模型 `index` 分表、contain、分组、UNION 或混合方向排序。`allCursor()` 不修改基础模型查询。
270
+ - 典型索引为 `(time_add, id)`,按设备筛选时为 `(no, time_add, id)`。ASC B-tree 支持整体反向扫描,无需为同向降序再重复创建索引。
271
+ - 固定结束时间可以减小新增记录对浏览的影响,游标分页不等同于跨请求事务快照,也不提供按任意页码直接跳转。
272
+
273
+ 可运行演示见示例项目的 `test/mod-test`、`test/mod-test?s=pgsql` 和 `test/sql?type=seek`。
274
+
124
275
  index/index.md
125
276
  ---
126
277
 
@@ -1438,7 +1589,7 @@ index/variables/VER.md
1438
1589
 
1439
1590
  # Variable: VER
1440
1591
 
1441
- > `const` **VER**: `"9.19.0"` = `'9.19.0'`
1592
+ > `const` **VER**: `"9.20.0"` = `'9.20.0'`
1442
1593
 
1443
1594
  Defined in: [index.ts:10](https://github.com/maiyunnet/kebab/blob/master/index.ts#L10)
1444
1595
 
@@ -123199,7 +123350,7 @@ lib/sql/classes/Sql.md
123199
123350
 
123200
123351
  # Class: Sql
123201
123352
 
123202
- Defined in: [lib/sql.ts:43](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L43)
123353
+ Defined in: [lib/sql.ts:46](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L46)
123203
123354
 
123204
123355
  ## Constructors
123205
123356
 
@@ -123207,7 +123358,7 @@ Defined in: [lib/sql.ts:43](https://github.com/maiyunnet/kebab/blob/master/lib/s
123207
123358
 
123208
123359
  > **new Sql**(`opt`): `Sql`
123209
123360
 
123210
- Defined in: [lib/sql.ts:73](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L73)
123361
+ Defined in: [lib/sql.ts:76](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L76)
123211
123362
 
123212
123363
  #### Parameters
123213
123364
 
@@ -123249,7 +123400,7 @@ Defined in: [lib/sql.ts:73](https://github.com/maiyunnet/kebab/blob/master/lib/s
123249
123400
 
123250
123401
  > **append**(`sql`): `this`
123251
123402
 
123252
- Defined in: [lib/sql.ts:1057](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1057)
123403
+ Defined in: [lib/sql.ts:1126](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1126)
123253
123404
 
123254
123405
  在 sql 最后追加字符串
123255
123406
 
@@ -123269,7 +123420,7 @@ Defined in: [lib/sql.ts:1057](https://github.com/maiyunnet/kebab/blob/master/lib
123269
123420
 
123270
123421
  > **by**(`c`, `d?`): `this`
123271
123422
 
123272
- Defined in: [lib/sql.ts:809](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L809)
123423
+ Defined in: [lib/sql.ts:813](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L813)
123273
123424
 
123274
123425
  ORDER BY
123275
123426
 
@@ -123297,7 +123448,7 @@ ORDER BY
123297
123448
 
123298
123449
  > **copy**(`f?`, `opt?`): `Sql`
123299
123450
 
123300
- Defined in: [lib/sql.ts:877](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L877)
123451
+ Defined in: [lib/sql.ts:932](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L932)
123301
123452
 
123302
123453
  创建一个本对象的一个新的 sql 对象拷贝
123303
123454
 
@@ -123311,6 +123462,18 @@ Defined in: [lib/sql.ts:877](https://github.com/maiyunnet/kebab/blob/master/lib/
123311
123462
 
123312
123463
  ##### opt?
123313
123464
 
123465
+ ###### limit?
123466
+
123467
+ `false`
123468
+
123469
+ false 时移除本查询的 LIMIT/OFFSET,不修改子查询
123470
+
123471
+ ###### order?
123472
+
123473
+ `false`
123474
+
123475
+ false 时移除本查询的排序,不修改子查询
123476
+
123314
123477
  ###### where?
123315
123478
 
123316
123479
  `any`
@@ -123325,7 +123488,7 @@ Defined in: [lib/sql.ts:877](https://github.com/maiyunnet/kebab/blob/master/lib/
123325
123488
 
123326
123489
  > **crossJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
123327
123490
 
123328
- Defined in: [lib/sql.ts:528](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L528)
123491
+ Defined in: [lib/sql.ts:532](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L532)
123329
123492
 
123330
123493
  cross join 方法
123331
123494
 
@@ -123365,7 +123528,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
123365
123528
 
123366
123529
  > **delete**(`f`): `this`
123367
123530
 
123368
- Defined in: [lib/sql.ts:416](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L416)
123531
+ Defined in: [lib/sql.ts:420](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L420)
123369
123532
 
123370
123533
  'xx'
123371
123534
 
@@ -123387,7 +123550,7 @@ Defined in: [lib/sql.ts:416](https://github.com/maiyunnet/kebab/blob/master/lib/
123387
123550
 
123388
123551
  > **field**(`str`, `pre?`, `suf?`): `string`
123389
123552
 
123390
- Defined in: [lib/sql.ts:1068](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1068)
123553
+ Defined in: [lib/sql.ts:1137](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1137)
123391
123554
 
123392
123555
  对字段进行包裹
123393
123556
 
@@ -123419,7 +123582,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅请在 field 表名时
123419
123582
 
123420
123583
  > **format**(`sql?`, `data?`): `string`
123421
123584
 
123422
- Defined in: [lib/sql.ts:1047](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1047)
123585
+ Defined in: [lib/sql.ts:1116](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1116)
123423
123586
 
123424
123587
  获取带 data 的 sql 语句
123425
123588
 
@@ -123443,7 +123606,7 @@ Defined in: [lib/sql.ts:1047](https://github.com/maiyunnet/kebab/blob/master/lib
123443
123606
 
123444
123607
  > **fullJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
123445
123608
 
123446
- Defined in: [lib/sql.ts:517](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L517)
123609
+ Defined in: [lib/sql.ts:521](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L521)
123447
123610
 
123448
123611
  full join 方法
123449
123612
 
@@ -123483,7 +123646,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
123483
123646
 
123484
123647
  > **getData**(): [`DbValue`](../../../index/type-aliases/DbValue.md)[]
123485
123648
 
123486
- Defined in: [lib/sql.ts:1031](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1031)
123649
+ Defined in: [lib/sql.ts:1100](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1100)
123487
123650
 
123488
123651
  获取全部 data
123489
123652
 
@@ -123497,7 +123660,7 @@ Defined in: [lib/sql.ts:1031](https://github.com/maiyunnet/kebab/blob/master/lib
123497
123660
 
123498
123661
  > **getPre**(): `string`
123499
123662
 
123500
- Defined in: [lib/sql.ts:1038](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1038)
123663
+ Defined in: [lib/sql.ts:1107](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1107)
123501
123664
 
123502
123665
  获取定义的 pre
123503
123666
 
@@ -123511,7 +123674,7 @@ Defined in: [lib/sql.ts:1038](https://github.com/maiyunnet/kebab/blob/master/lib
123511
123674
 
123512
123675
  > **getSql**(): `string`
123513
123676
 
123514
- Defined in: [lib/sql.ts:1011](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1011)
123677
+ Defined in: [lib/sql.ts:1080](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1080)
123515
123678
 
123516
123679
  获取 sql 语句
123517
123680
 
@@ -123525,7 +123688,7 @@ Defined in: [lib/sql.ts:1011](https://github.com/maiyunnet/kebab/blob/master/lib
123525
123688
 
123526
123689
  > **group**(`c`): `this`
123527
123690
 
123528
- Defined in: [lib/sql.ts:833](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L833)
123691
+ Defined in: [lib/sql.ts:888](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L888)
123529
123692
 
123530
123693
  GROUP BY
123531
123694
 
@@ -123547,7 +123710,7 @@ GROUP BY
123547
123710
 
123548
123711
  > **having**(`s?`): `this`
123549
123712
 
123550
- Defined in: [lib/sql.ts:535](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L535)
123713
+ Defined in: [lib/sql.ts:539](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L539)
123551
123714
 
123552
123715
  having 后置筛选器,用法类似 where
123553
123716
 
@@ -123567,7 +123730,7 @@ having 后置筛选器,用法类似 where
123567
123730
 
123568
123731
  > **hint**(`h`): `this`
123569
123732
 
123570
- Defined in: [lib/sql.ts:119](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L119)
123733
+ Defined in: [lib/sql.ts:123](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L123)
123571
123734
 
123572
123735
  设置 MySQL 优化器 Hint
123573
123736
  会以 Optimizer Hint 注释语法注入到 SELECT 关键字后
@@ -123612,7 +123775,7 @@ INDEX(`t1` `idx_a`) JOIN_INDEX(`t2` `idx_b`)
123612
123775
 
123613
123776
  > **innerJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
123614
123777
 
123615
- Defined in: [lib/sql.ts:506](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L506)
123778
+ Defined in: [lib/sql.ts:510](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L510)
123616
123779
 
123617
123780
  inner join 方法
123618
123781
 
@@ -123652,7 +123815,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
123652
123815
 
123653
123816
  > **insert**(`table`, `ignore?`): `this`
123654
123817
 
123655
- Defined in: [lib/sql.ts:131](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L131)
123818
+ Defined in: [lib/sql.ts:135](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L135)
123656
123819
 
123657
123820
  插入数据前导
123658
123821
 
@@ -123680,7 +123843,7 @@ Defined in: [lib/sql.ts:131](https://github.com/maiyunnet/kebab/blob/master/lib/
123680
123843
 
123681
123844
  > **join**(`f`, `s?`, `type?`, `suf?`, `pre?`): `this`
123682
123845
 
123683
- Defined in: [lib/sql.ts:458](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L458)
123846
+ Defined in: [lib/sql.ts:462](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L462)
123684
123847
 
123685
123848
  join 方法
123686
123849
 
@@ -123726,7 +123889,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
123726
123889
 
123727
123890
  > **leftJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
123728
123891
 
123729
- Defined in: [lib/sql.ts:484](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L484)
123892
+ Defined in: [lib/sql.ts:488](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L488)
123730
123893
 
123731
123894
  left join 方法
123732
123895
 
@@ -123766,7 +123929,7 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
123766
123929
 
123767
123930
  > **limit**(`a`, `b?`): `this`
123768
123931
 
123769
- Defined in: [lib/sql.ts:853](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L853)
123932
+ Defined in: [lib/sql.ts:908](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L908)
123770
123933
 
123771
123934
  LIMIT(limit、offset, limit)
123772
123935
 
@@ -123794,7 +123957,7 @@ LIMIT(limit、offset, limit)
123794
123957
 
123795
123958
  > **lock**(): `this`
123796
123959
 
123797
- Defined in: [lib/sql.ts:868](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L868)
123960
+ Defined in: [lib/sql.ts:923](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L923)
123798
123961
 
123799
123962
  追加消极锁,通常不建议使用
123800
123963
 
@@ -123808,7 +123971,7 @@ Defined in: [lib/sql.ts:868](https://github.com/maiyunnet/kebab/blob/master/lib/
123808
123971
 
123809
123972
  > **rightJoin**(`f`, `s?`, `suf?`, `pre?`): `this`
123810
123973
 
123811
- Defined in: [lib/sql.ts:495](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L495)
123974
+ Defined in: [lib/sql.ts:499](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L499)
123812
123975
 
123813
123976
  right join 方法
123814
123977
 
@@ -123844,11 +124007,48 @@ MySQL 时为表前缀,PostgreSQL 时为 Schema 名,仅在 join 非默认前
123844
124007
 
123845
124008
  ***
123846
124009
 
124010
+ ### seek()
124011
+
124012
+ > **seek**(`c`, `values?`, `d?`): `this`
124013
+
124014
+ Defined in: [lib/sql.ts:841](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L841)
124015
+
124016
+ 按非空、同向排序字段定位游标并设置排序;字段组合须唯一且有匹配索引
124017
+ 使用行比较,让 PostgreSQL 可以从复合索引边界开始扫描
124018
+
124019
+ #### Parameters
124020
+
124021
+ ##### c
124022
+
124023
+ `string` \| `string`[]
124024
+
124025
+ 排序字段,支持表别名;不支持表达式、GROUP BY 或 UNION
124026
+
124027
+ ##### values?
124028
+
124029
+ [`TCursorValue`](../type-aliases/TCursorValue.md)[]
124030
+
124031
+ 上一页末行的字段值,省略时读取首批
124032
+
124033
+ ##### d?
124034
+
124035
+ `"DESC"` \| `"ASC"`
124036
+
124037
+ 扫描方向;读取前一批时反转方向并在取回后反转列表
124038
+
124039
+ #### Returns
124040
+
124041
+ `this`
124042
+
124043
+ 当前 SQL 对象
124044
+
124045
+ ***
124046
+
123847
124047
  ### select()
123848
124048
 
123849
124049
  > **select**(`c`, `f`): `this`
123850
124050
 
123851
- Defined in: [lib/sql.ts:303](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L303)
124051
+ Defined in: [lib/sql.ts:307](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L307)
123852
124052
 
123853
124053
  '*', 'xx'
123854
124054
 
@@ -123876,7 +124076,7 @@ Defined in: [lib/sql.ts:303](https://github.com/maiyunnet/kebab/blob/master/lib/
123876
124076
 
123877
124077
  > **union**(`lsql`, `type?`): `this`
123878
124078
 
123879
- Defined in: [lib/sql.ts:428](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L428)
124079
+ Defined in: [lib/sql.ts:432](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L432)
123880
124080
 
123881
124081
  联查另一个 sql 对象
123882
124082
 
@@ -123904,7 +124104,7 @@ sql 对象
123904
124104
 
123905
124105
  > **unionAll**(`lsql`): `this`
123906
124106
 
123907
- Defined in: [lib/sql.ts:446](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L446)
124107
+ Defined in: [lib/sql.ts:450](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L450)
123908
124108
 
123909
124109
  所有联查另一个 sql 对象
123910
124110
 
@@ -123926,7 +124126,7 @@ sql 对象
123926
124126
 
123927
124127
  > **update**(`f`, `s`): `this`
123928
124128
 
123929
- Defined in: [lib/sql.ts:344](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L344)
124129
+ Defined in: [lib/sql.ts:348](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L348)
123930
124130
 
123931
124131
  UPDATE SQL 方法
123932
124132
 
@@ -123954,7 +124154,7 @@ UPDATE SQL 方法
123954
124154
 
123955
124155
  > **updateByValues**(`table`, `key`, `cols`, `rows`): `this`
123956
124156
 
123957
- Defined in: [lib/sql.ts:247](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L247)
124157
+ Defined in: [lib/sql.ts:251](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L251)
123958
124158
 
123959
124159
  批量 UPDATE,以子查询作为数据源,纯更新语义(不会插入新行)
123960
124160
  MySQL: UPDATE t INNER JOIN (SELECT col AS alias ... UNION ALL SELECT ...) AS tmp ON t.key=tmp.key SET t.c=tmp.c
@@ -123997,7 +124197,7 @@ PostgreSQL: UPDATE t SET c=tmp.c FROM (VALUES (typed nulls), ($1,...)) AS tmp(co
123997
124197
 
123998
124198
  > **upsert**(`data`, `conflict?`): `this`
123999
124199
 
124000
- Defined in: [lib/sql.ts:208](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L208)
124200
+ Defined in: [lib/sql.ts:212](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L212)
124001
124201
 
124002
124202
  如果存在则更新不存在则插入(UPSERT)
124003
124203
 
@@ -124025,7 +124225,7 @@ Defined in: [lib/sql.ts:208](https://github.com/maiyunnet/kebab/blob/master/lib/
124025
124225
 
124026
124226
  > **values**(`cs`, `vs?`): `this`
124027
124227
 
124028
- Defined in: [lib/sql.ts:150](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L150)
124228
+ Defined in: [lib/sql.ts:154](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L154)
124029
124229
 
124030
124230
  实际插入数据的数据
124031
124231
 
@@ -124053,7 +124253,7 @@ Defined in: [lib/sql.ts:150](https://github.com/maiyunnet/kebab/blob/master/lib/
124053
124253
 
124054
124254
  > **where**(`s`): `this`
124055
124255
 
124056
- Defined in: [lib/sql.ts:568](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L568)
124256
+ Defined in: [lib/sql.ts:572](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L572)
124057
124257
 
124058
124258
  筛选器
124059
124259
  标量相等:'city': 'bj', 'type': '2'
@@ -124087,7 +124287,7 @@ lib/sql/enumerations/EJSON.md
124087
124287
 
124088
124288
  # Enumeration: EJSON
124089
124289
 
124090
- Defined in: [lib/sql.ts:22](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L22)
124290
+ Defined in: [lib/sql.ts:25](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L25)
124091
124291
 
124092
124292
  JSON 查询操作符
124093
124293
 
@@ -124097,7 +124297,7 @@ JSON 查询操作符
124097
124297
 
124098
124298
  > **CONTAINED\_BY**: `"json_in"`
124099
124299
 
124100
- Defined in: [lib/sql.ts:26](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L26)
124300
+ Defined in: [lib/sql.ts:29](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L29)
124101
124301
 
124102
124302
  被包含值 (MySQL: JSON_CONTAINS, PG: <@)
124103
124303
 
@@ -124107,7 +124307,7 @@ Defined in: [lib/sql.ts:26](https://github.com/maiyunnet/kebab/blob/master/lib/s
124107
124307
 
124108
124308
  > **CONTAINS**: `"json"`
124109
124309
 
124110
- Defined in: [lib/sql.ts:24](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L24)
124310
+ Defined in: [lib/sql.ts:27](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L27)
124111
124311
 
124112
124312
  包含值 (MySQL: JSON_CONTAINS, PG: @>)
124113
124313
 
@@ -124117,7 +124317,7 @@ Defined in: [lib/sql.ts:24](https://github.com/maiyunnet/kebab/blob/master/lib/s
124117
124317
 
124118
124318
  > **HAS\_ALL\_KEYS**: `"json_all"`
124119
124319
 
124120
- Defined in: [lib/sql.ts:32](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L32)
124320
+ Defined in: [lib/sql.ts:35](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L35)
124121
124321
 
124122
124322
  存在所有 Key 不含值 (MySQL: JSON_CONTAINS_PATH all, PG: ?&)
124123
124323
 
@@ -124127,7 +124327,7 @@ Defined in: [lib/sql.ts:32](https://github.com/maiyunnet/kebab/blob/master/lib/s
124127
124327
 
124128
124328
  > **HAS\_ANY\_KEYS**: `"json_any"`
124129
124329
 
124130
- Defined in: [lib/sql.ts:30](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L30)
124330
+ Defined in: [lib/sql.ts:33](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L33)
124131
124331
 
124132
124332
  存在任意 Key 不含值 (MySQL: JSON_CONTAINS_PATH one, PG: ?|)
124133
124333
 
@@ -124137,7 +124337,7 @@ Defined in: [lib/sql.ts:30](https://github.com/maiyunnet/kebab/blob/master/lib/s
124137
124337
 
124138
124338
  > **HAS\_KEY**: `"json_key"`
124139
124339
 
124140
- Defined in: [lib/sql.ts:28](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L28)
124340
+ Defined in: [lib/sql.ts:31](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L31)
124141
124341
 
124142
124342
  存在 Key 不含值 (MySQL: JSON_CONTAINS_PATH one, PG: ?)
124143
124343
 
@@ -124147,7 +124347,7 @@ Defined in: [lib/sql.ts:28](https://github.com/maiyunnet/kebab/blob/master/lib/s
124147
124347
 
124148
124348
  > **OVERLAPS**: `"json_overlaps"`
124149
124349
 
124150
- Defined in: [lib/sql.ts:34](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L34)
124350
+ Defined in: [lib/sql.ts:37](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L37)
124151
124351
 
124152
124352
  简单数组重叠 (MySQL: JSON_OVERLAPS, PG: &&)
124153
124353
 
@@ -124195,7 +124395,7 @@ lib/sql/functions/aoMix.md
124195
124395
 
124196
124396
  > **aoMix**(`arr`): `Record`\<`string`, `string` \| `number` \| [`Json`](../../../index/type-aliases/Json.md)\>
124197
124397
 
124198
- Defined in: [lib/sql.ts:1417](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1417)
124398
+ Defined in: [lib/sql.ts:1486](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1486)
124199
124399
 
124200
124400
  将数组兑换为组合的对象(Array/Object mix)
124201
124401
 
@@ -124224,7 +124424,7 @@ lib/sql/functions/column.md
124224
124424
 
124225
124425
  > **column**(`field`): `object`
124226
124426
 
124227
- Defined in: [lib/sql.ts:1438](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1438)
124427
+ Defined in: [lib/sql.ts:1507](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1507)
124228
124428
 
124229
124429
  创建字段对象
124230
124430
 
@@ -124263,7 +124463,7 @@ lib/sql/functions/format.md
124263
124463
 
124264
124464
  > **format**(`sql`, `data`, `service?`): `string`
124265
124465
 
124266
- Defined in: [lib/sql.ts:1378](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1378)
124466
+ Defined in: [lib/sql.ts:1447](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1447)
124267
124467
 
124268
124468
  返回代入后的完整 SQL 字符串,这并不安全不能直接执行,只是用来调试打印 sql 语句
124269
124469
 
@@ -124304,7 +124504,7 @@ lib/sql/functions/get.md
124304
124504
 
124305
124505
  > **get**(`opt`): [`Sql`](../classes/Sql.md)
124306
124506
 
124307
- Defined in: [lib/sql.ts:1350](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1350)
124507
+ Defined in: [lib/sql.ts:1419](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1419)
124308
124508
 
124309
124509
  创建 sql 对象
124310
124510
 
@@ -124357,7 +124557,7 @@ lib/sql/functions/json.md
124357
124557
 
124358
124558
  > **json**\<`T`\>(`obj`): `T`
124359
124559
 
124360
- Defined in: [lib/sql.ts:1477](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1477)
124560
+ Defined in: [lib/sql.ts:1546](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1546)
124361
124561
 
124362
124562
  标记需要写入 JSON/jsonb 字段的值;实际序列化延迟到数据库边界
124363
124563
 
@@ -124394,7 +124594,7 @@ lib/sql/functions/value.md
124394
124594
 
124395
124595
  > **value**(`val`): `object`
124396
124596
 
124397
- Defined in: [lib/sql.ts:1457](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1457)
124597
+ Defined in: [lib/sql.ts:1526](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L1526)
124398
124598
 
124399
124599
  创建字面量值对象,用于 where 条件中 v[0] 需要是值而非字段名的场景
124400
124600
  例:[value('hello'), 'IN', column('tags')]
@@ -124441,6 +124641,10 @@ lib/sql/index.md
124441
124641
 
124442
124642
  - [Sql](classes/Sql.md)
124443
124643
 
124644
+ ## Type Aliases
124645
+
124646
+ - [TCursorValue](type-aliases/TCursorValue.md)
124647
+
124444
124648
  ## Functions
124445
124649
 
124446
124650
  - [aoMix](functions/aoMix.md)
@@ -124450,6 +124654,23 @@ lib/sql/index.md
124450
124654
  - [json](functions/json.md)
124451
124655
  - [value](functions/value.md)
124452
124656
 
124657
+ lib/sql/type-aliases/TCursorValue.md
124658
+ ---
124659
+
124660
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
124661
+
124662
+ ***
124663
+
124664
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/sql](../index.md) / TCursorValue
124665
+
124666
+ # Type Alias: TCursorValue
124667
+
124668
+ > **TCursorValue** = `string` \| `number`
124669
+
124670
+ Defined in: [lib/sql.ts:22](https://github.com/maiyunnet/kebab/blob/master/lib/sql.ts#L22)
124671
+
124672
+ 非空游标值;大整数和日期请使用数据库可比较的字符串
124673
+
124453
124674
  lib/sql/value/functions/isJson.md
124454
124675
  ---
124455
124676
 
@@ -125752,6 +125973,43 @@ lib/ssh/shell/index.md
125752
125973
 
125753
125974
  - [Connection](classes/Connection.md)
125754
125975
 
125976
+ lib/text/functions/compareVersion.md
125977
+ ---
125978
+
125979
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
125980
+
125981
+ ***
125982
+
125983
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / compareVersion
125984
+
125985
+ # Function: compareVersion()
125986
+
125987
+ > **compareVersion**(`version`, `target`): `0` \| `1` \| `-1` \| `null`
125988
+
125989
+ Defined in: [lib/text.ts:35](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L35)
125990
+
125991
+ 逐段比较三段正式发行版本 X.Y.Z,不按字符串或浮点数比较
125992
+
125993
+ ## Parameters
125994
+
125995
+ ### version
125996
+
125997
+ `unknown`
125998
+
125999
+ 待比较的版本
126000
+
126001
+ ### target
126002
+
126003
+ `unknown`
126004
+
126005
+ 目标版本
126006
+
126007
+ ## Returns
126008
+
126009
+ `0` \| `1` \| `-1` \| `null`
126010
+
126011
+ 小于返回 -1,等于返回 0,大于返回 1;任一版本无效时返回 null
126012
+
125755
126013
  lib/text/functions/csvescape.md
125756
126014
  ---
125757
126015
 
@@ -125765,7 +126023,7 @@ lib/text/functions/csvescape.md
125765
126023
 
125766
126024
  > **csvescape**(`str`): `string`
125767
126025
 
125768
- Defined in: [lib/text.ts:547](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L547)
126026
+ Defined in: [lib/text.ts:585](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L585)
125769
126027
 
125770
126028
  CSV 特殊字符转换为实体字符
125771
126029
 
@@ -125792,7 +126050,7 @@ lib/text/functions/getFileExt.md
125792
126050
 
125793
126051
  > **getFileExt**(`path`): `string`
125794
126052
 
125795
- Defined in: [lib/text.ts:588](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L588)
126053
+ Defined in: [lib/text.ts:626](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L626)
125796
126054
 
125797
126055
  获取文件后缀
125798
126056
 
@@ -125821,7 +126079,7 @@ lib/text/functions/getFileNameExt.md
125821
126079
 
125822
126080
  > **getFileNameExt**(`path`): `object`
125823
126081
 
125824
- Defined in: [lib/text.ts:601](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L601)
126082
+ Defined in: [lib/text.ts:639](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L639)
125825
126083
 
125826
126084
  获取文件名和后缀
125827
126085
 
@@ -125858,7 +126116,7 @@ lib/text/functions/getFilename.md
125858
126116
 
125859
126117
  > **getFilename**(`path`, `ext?`): `string`
125860
126118
 
125861
- Defined in: [lib/text.ts:568](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L568)
126119
+ Defined in: [lib/text.ts:606](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L606)
125862
126120
 
125863
126121
  获取文件名
125864
126122
 
@@ -125893,7 +126151,7 @@ lib/text/functions/htmlescape.md
125893
126151
 
125894
126152
  > **htmlescape**(`html`): `string`
125895
126153
 
125896
- Defined in: [lib/text.ts:533](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L533)
126154
+ Defined in: [lib/text.ts:571](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L571)
125897
126155
 
125898
126156
  HTML 特殊字符转换为实体字符
125899
126157
 
@@ -125922,7 +126180,7 @@ lib/text/functions/int2str.md
125922
126180
 
125923
126181
  > **int2str**(`int`, `digits?`, `decimal?`): `string`
125924
126182
 
125925
- Defined in: [lib/text.ts:825](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L825)
126183
+ Defined in: [lib/text.ts:863](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L863)
125926
126184
 
125927
126185
  为解决精度问题,将整数转换为小数字符串
125928
126186
  以下几个示例都是当 digits 为 3、decimal 为 2 时
@@ -125968,7 +126226,7 @@ lib/text/functions/isAscii.md
125968
126226
 
125969
126227
  > **isAscii**(`text`): `boolean`
125970
126228
 
125971
- Defined in: [lib/text.ts:291](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L291)
126229
+ Defined in: [lib/text.ts:329](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L329)
125972
126230
 
125973
126231
  判断是否在 ascii 字符集内,仅可输入部分
125974
126232
 
@@ -125997,7 +126255,7 @@ lib/text/functions/isDomain.md
125997
126255
 
125998
126256
  > **isDomain**(`domain`): `boolean`
125999
126257
 
126000
- Defined in: [lib/text.ts:280](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L280)
126258
+ Defined in: [lib/text.ts:318](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L318)
126001
126259
 
126002
126260
  判断是否是域名
126003
126261
 
@@ -126028,7 +126286,7 @@ lib/text/functions/isEMail.md
126028
126286
 
126029
126287
  > **isEMail**(`email`): `boolean`
126030
126288
 
126031
- Defined in: [lib/text.ts:253](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L253)
126289
+ Defined in: [lib/text.ts:291](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L291)
126032
126290
 
126033
126291
  是否是邮件地址
126034
126292
 
@@ -126055,7 +126313,7 @@ lib/text/functions/isFalsy.md
126055
126313
 
126056
126314
  > **isFalsy**(`val`): `val is TFalsy`
126057
126315
 
126058
- Defined in: [lib/text.ts:776](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L776)
126316
+ Defined in: [lib/text.ts:814](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L814)
126059
126317
 
126060
126318
  判断一个值是否是虚假的(为 null/undefined/空字符串/false/0)
126061
126319
 
@@ -126084,7 +126342,7 @@ lib/text/functions/isIdCardCN.md
126084
126342
 
126085
126343
  > **isIdCardCN**(`idcard`): `boolean`
126086
126344
 
126087
- Defined in: [lib/text.ts:403](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L403)
126345
+ Defined in: [lib/text.ts:441](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L441)
126088
126346
 
126089
126347
  是否是中国大陆身份证号码
126090
126348
 
@@ -126113,7 +126371,7 @@ lib/text/functions/isIPv4.md
126113
126371
 
126114
126372
  > **isIPv4**(`ip`): `boolean`
126115
126373
 
126116
- Defined in: [lib/text.ts:261](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L261)
126374
+ Defined in: [lib/text.ts:299](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L299)
126117
126375
 
126118
126376
  是否是 IPv4(基于 Node 原生 net.isIP,严格校验)
126119
126377
 
@@ -126140,7 +126398,7 @@ lib/text/functions/isIPv6.md
126140
126398
 
126141
126399
  > **isIPv6**(`ip`): `boolean`
126142
126400
 
126143
- Defined in: [lib/text.ts:269](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L269)
126401
+ Defined in: [lib/text.ts:307](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L307)
126144
126402
 
126145
126403
  是否是 IPv6(基于 Node 原生 net.isIP,严格校验)
126146
126404
 
@@ -126167,7 +126425,7 @@ lib/text/functions/isPhoneCN.md
126167
126425
 
126168
126426
  > **isPhoneCN**(`p`): `boolean`
126169
126427
 
126170
- Defined in: [lib/text.ts:395](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L395)
126428
+ Defined in: [lib/text.ts:433](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L433)
126171
126429
 
126172
126430
  判断手机号是否是 11 位,不做真实性校验
126173
126431
 
@@ -126196,7 +126454,7 @@ lib/text/functions/isRealPath.md
126196
126454
 
126197
126455
  > **isRealPath**(`path`): `boolean`
126198
126456
 
126199
- Defined in: [lib/text.ts:555](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L555)
126457
+ Defined in: [lib/text.ts:593](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L593)
126200
126458
 
126201
126459
  判断是否是绝对路径,是返回 true,相对路径返回 false
126202
126460
 
@@ -126225,7 +126483,7 @@ lib/text/functions/isSameOrigin.md
126225
126483
 
126226
126484
  > **isSameOrigin**(`from`, `to`): `boolean`
126227
126485
 
126228
- Defined in: [lib/text.ts:134](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L134)
126486
+ Defined in: [lib/text.ts:172](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L172)
126229
126487
 
126230
126488
  判断两个 URL 是否属于同源地址
126231
126489
 
@@ -126260,7 +126518,7 @@ lib/text/functions/isTruthy.md
126260
126518
 
126261
126519
  > **isTruthy**\<`T`\>(`val`): `val is Exclude<T, TFalsy>`
126262
126520
 
126263
- Defined in: [lib/text.ts:784](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L784)
126521
+ Defined in: [lib/text.ts:822](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L822)
126264
126522
 
126265
126523
  判断一个值是否是真实的(不为 null/undefined/空字符串/false/0)
126266
126524
 
@@ -126295,7 +126553,7 @@ lib/text/functions/logicalOr.md
126295
126553
 
126296
126554
  > **logicalOr**\<`T`, `T2`\>(`v1`, `v2`): `T` *extends* [`TFalsy`](../type-aliases/TFalsy.md) ? `T2` : `T`
126297
126555
 
126298
- Defined in: [lib/text.ts:793](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L793)
126556
+ Defined in: [lib/text.ts:831](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L831)
126299
126557
 
126300
126558
  类似 || 运算符的效果
126301
126559
 
@@ -126340,7 +126598,7 @@ lib/text/functions/match.md
126340
126598
 
126341
126599
  > **match**(`str`, `regs`): `boolean`
126342
126600
 
126343
- Defined in: [lib/text.ts:380](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L380)
126601
+ Defined in: [lib/text.ts:418](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L418)
126344
126602
 
126345
126603
  传入正则进行匹配 str 是否有一项满足
126346
126604
 
@@ -126375,7 +126633,7 @@ lib/text/functions/nlReplace.md
126375
126633
 
126376
126634
  > **nlReplace**(`str`, `to?`): `string`
126377
126635
 
126378
- Defined in: [lib/text.ts:300](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L300)
126636
+ Defined in: [lib/text.ts:338](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L338)
126379
126637
 
126380
126638
  换行替换为别的
126381
126639
 
@@ -126410,7 +126668,7 @@ lib/text/functions/parseDomain.md
126410
126668
 
126411
126669
  > **parseDomain**(`domain`): `Promise`\<[`IDomain`](../interfaces/IDomain.md)\>
126412
126670
 
126413
- Defined in: [lib/text.ts:323](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L323)
126671
+ Defined in: [lib/text.ts:361](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L361)
126414
126672
 
126415
126673
  解析域名并获取 tld/sld/domain/sub
126416
126674
 
@@ -126439,7 +126697,7 @@ lib/text/functions/parseHost.md
126439
126697
 
126440
126698
  > **parseHost**(`host`): `object`
126441
126699
 
126442
- Defined in: [lib/text.ts:30](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L30)
126700
+ Defined in: [lib/text.ts:68](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L68)
126443
126701
 
126444
126702
  解析主机名和端口号
126445
126703
 
@@ -126480,7 +126738,7 @@ lib/text/functions/parseJson.md
126480
126738
 
126481
126739
  > **parseJson**\<`T`\>(`str`): `false` \| `T`
126482
126740
 
126483
- Defined in: [lib/text.ts:663](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L663)
126741
+ Defined in: [lib/text.ts:701](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L701)
126484
126742
 
126485
126743
  将字符串解析为对象,返回 false 代表解析失败,支持 BigInt
126486
126744
 
@@ -126515,7 +126773,7 @@ lib/text/functions/parseUrl.md
126515
126773
 
126516
126774
  > **parseUrl**(`url`): [`IUrlParse`](../../../index/interfaces/IUrlParse.md)
126517
126775
 
126518
- Defined in: [lib/text.ts:56](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L56)
126776
+ Defined in: [lib/text.ts:94](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L94)
126519
126777
 
126520
126778
  格式化一段 URL
126521
126779
 
@@ -126529,6 +126787,37 @@ Defined in: [lib/text.ts:56](https://github.com/maiyunnet/kebab/blob/master/lib/
126529
126787
 
126530
126788
  [`IUrlParse`](../../../index/interfaces/IUrlParse.md)
126531
126789
 
126790
+ lib/text/functions/parseVersion.md
126791
+ ---
126792
+
126793
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
126794
+
126795
+ ***
126796
+
126797
+ [Documents for @maiyunnet/kebab](../../../index.md) / [lib/text](../index.md) / parseVersion
126798
+
126799
+ # Function: parseVersion()
126800
+
126801
+ > **parseVersion**(`value`): \[`number`, `number`, `number`\] \| `null`
126802
+
126803
+ Defined in: [lib/text.ts:16](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L16)
126804
+
126805
+ 解析三段正式发行版本 X.Y.Z,不接受前导零、预发行和构建后缀
126806
+
126807
+ ## Parameters
126808
+
126809
+ ### value
126810
+
126811
+ `unknown`
126812
+
126813
+ 待解析的版本
126814
+
126815
+ ## Returns
126816
+
126817
+ \[`number`, `number`, `number`\] \| `null`
126818
+
126819
+ 三段安全整数,无效时返回 null
126820
+
126532
126821
  lib/text/functions/queryParse.md
126533
126822
  ---
126534
126823
 
@@ -126542,7 +126831,7 @@ lib/text/functions/queryParse.md
126542
126831
 
126543
126832
  > **queryParse**(`query`): `Record`\<`string`, `string` \| `string`[]\>
126544
126833
 
126545
- Defined in: [lib/text.ts:480](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L480)
126834
+ Defined in: [lib/text.ts:518](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L518)
126546
126835
 
126547
126836
  将 query string 转换为对象
126548
126837
 
@@ -126573,7 +126862,7 @@ lib/text/functions/queryStringify.md
126573
126862
 
126574
126863
  > **queryStringify**(`query`, `encode?`): `string`
126575
126864
 
126576
- Defined in: [lib/text.ts:431](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L431)
126865
+ Defined in: [lib/text.ts:469](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L469)
126577
126866
 
126578
126867
  将对象转换为 query string
126579
126868
 
@@ -126599,7 +126888,7 @@ Defined in: [lib/text.ts:431](https://github.com/maiyunnet/kebab/blob/master/lib
126599
126888
 
126600
126889
  > **queryStringify**(`query`, `options`): `string`
126601
126890
 
126602
- Defined in: [lib/text.ts:437](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L437)
126891
+ Defined in: [lib/text.ts:475](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L475)
126603
126892
 
126604
126893
  将对象转换为 query string
126605
126894
 
@@ -126644,7 +126933,7 @@ lib/text/functions/sizeFormat.md
126644
126933
 
126645
126934
  > **sizeFormat**(`size`, `spliter?`): `string`
126646
126935
 
126647
- Defined in: [lib/text.ts:16](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L16)
126936
+ Defined in: [lib/text.ts:54](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L54)
126648
126937
 
126649
126938
  将文件大小格式化为带单位的字符串
126650
126939
 
@@ -126679,7 +126968,7 @@ lib/text/functions/str2int.md
126679
126968
 
126680
126969
  > **str2int**(`str`, `digits?`): `number`
126681
126970
 
126682
- Defined in: [lib/text.ts:807](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L807)
126971
+ Defined in: [lib/text.ts:845](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L845)
126683
126972
 
126684
126973
  为解决精度问题,将字符串数字转换为整数显示
126685
126974
  以下几个示例都是当 digits 为 2 时
@@ -126719,7 +127008,7 @@ lib/text/functions/stringifyBuffer.md
126719
127008
 
126720
127009
  > **stringifyBuffer**(`buf`): `string`
126721
127010
 
126722
- Defined in: [lib/text.ts:730](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L730)
127011
+ Defined in: [lib/text.ts:768](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L768)
126723
127012
 
126724
127013
  输出文本格式的 buffer
126725
127014
 
@@ -126748,7 +127037,7 @@ lib/text/functions/stringifyError.md
126748
127037
 
126749
127038
  > **stringifyError**(`error`): `string`
126750
127039
 
126751
- Defined in: [lib/text.ts:707](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L707)
127040
+ Defined in: [lib/text.ts:745](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L745)
126752
127041
 
126753
127042
  将未知异常转换为适合单行日志的文本,Error 优先返回完整堆栈
126754
127043
 
@@ -126779,7 +127068,7 @@ lib/text/functions/stringifyJson.md
126779
127068
 
126780
127069
  > **stringifyJson**(`obj`, `space?`): `string`
126781
127070
 
126782
- Defined in: [lib/text.ts:693](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L693)
127071
+ Defined in: [lib/text.ts:731](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L731)
126783
127072
 
126784
127073
  将对象转换为 json 字符串,返回 false 代表解析失败,支持 BigInt
126785
127074
 
@@ -126814,7 +127103,7 @@ lib/text/functions/stringifyResult.md
126814
127103
 
126815
127104
  > **stringifyResult**(`rtn`): `string`
126816
127105
 
126817
- Defined in: [lib/text.ts:623](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L623)
127106
+ Defined in: [lib/text.ts:661](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L661)
126818
127107
 
126819
127108
  将普通的返回 JSON 对象序列化为字符串
126820
127109
 
@@ -126843,7 +127132,7 @@ lib/text/functions/trimJson.md
126843
127132
 
126844
127133
  > **trimJson**(`json`): `any`
126845
127134
 
126846
- Defined in: [lib/text.ts:738](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L738)
127135
+ Defined in: [lib/text.ts:776](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L776)
126847
127136
 
126848
127137
  递归删除 json 中的字符串首尾空格,会返回一个新的对象
126849
127138
 
@@ -126870,7 +127159,7 @@ lib/text/functions/urlAtom.md
126870
127159
 
126871
127160
  > **urlAtom**(`url`): `string`
126872
127161
 
126873
- Defined in: [lib/text.ts:234](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L234)
127162
+ Defined in: [lib/text.ts:272](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L272)
126874
127163
 
126875
127164
  将路径中的 ../ ./ 都按规范妥善处理
126876
127165
 
@@ -126899,7 +127188,7 @@ lib/text/functions/urlResolve.md
126899
127188
 
126900
127189
  > **urlResolve**(`from`, `to`, `limit?`): `string`
126901
127190
 
126902
- Defined in: [lib/text.ts:168](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L168)
127191
+ Defined in: [lib/text.ts:206](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L206)
126903
127192
 
126904
127193
  将相对路径根据基准路径进行转换
126905
127194
 
@@ -126954,6 +127243,7 @@ lib/text/index.md
126954
127243
 
126955
127244
  ## Functions
126956
127245
 
127246
+ - [compareVersion](functions/compareVersion.md)
126957
127247
  - [csvescape](functions/csvescape.md)
126958
127248
  - [getFileExt](functions/getFileExt.md)
126959
127249
  - [getFilename](functions/getFilename.md)
@@ -126978,6 +127268,7 @@ lib/text/index.md
126978
127268
  - [parseHost](functions/parseHost.md)
126979
127269
  - [parseJson](functions/parseJson.md)
126980
127270
  - [parseUrl](functions/parseUrl.md)
127271
+ - [parseVersion](functions/parseVersion.md)
126981
127272
  - [queryParse](functions/queryParse.md)
126982
127273
  - [queryStringify](functions/queryStringify.md)
126983
127274
  - [sizeFormat](functions/sizeFormat.md)
@@ -127001,7 +127292,7 @@ lib/text/interfaces/IDomain.md
127001
127292
 
127002
127293
  # Interface: IDomain
127003
127294
 
127004
- Defined in: [lib/text.ts:312](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L312)
127295
+ Defined in: [lib/text.ts:350](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L350)
127005
127296
 
127006
127297
  解析后的 domain
127007
127298
 
@@ -127011,7 +127302,7 @@ Defined in: [lib/text.ts:312](https://github.com/maiyunnet/kebab/blob/master/lib
127011
127302
 
127012
127303
  > **domain**: `string` \| `null`
127013
127304
 
127014
- Defined in: [lib/text.ts:315](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L315)
127305
+ Defined in: [lib/text.ts:353](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L353)
127015
127306
 
127016
127307
  ***
127017
127308
 
@@ -127019,7 +127310,7 @@ Defined in: [lib/text.ts:315](https://github.com/maiyunnet/kebab/blob/master/lib
127019
127310
 
127020
127311
  > **sld**: `string` \| `null`
127021
127312
 
127022
- Defined in: [lib/text.ts:314](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L314)
127313
+ Defined in: [lib/text.ts:352](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L352)
127023
127314
 
127024
127315
  ***
127025
127316
 
@@ -127027,7 +127318,7 @@ Defined in: [lib/text.ts:314](https://github.com/maiyunnet/kebab/blob/master/lib
127027
127318
 
127028
127319
  > **sub**: `string` \| `null`
127029
127320
 
127030
- Defined in: [lib/text.ts:316](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L316)
127321
+ Defined in: [lib/text.ts:354](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L354)
127031
127322
 
127032
127323
  ***
127033
127324
 
@@ -127035,7 +127326,7 @@ Defined in: [lib/text.ts:316](https://github.com/maiyunnet/kebab/blob/master/lib
127035
127326
 
127036
127327
  > **tld**: `string` \| `null`
127037
127328
 
127038
- Defined in: [lib/text.ts:313](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L313)
127329
+ Defined in: [lib/text.ts:351](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L351)
127039
127330
 
127040
127331
  lib/text/type-aliases/TFalsy.md
127041
127332
  ---
@@ -127050,7 +127341,7 @@ lib/text/type-aliases/TFalsy.md
127050
127341
 
127051
127342
  > **TFalsy** = `false` \| `""` \| `0` \| `null` \| `undefined` \| *typeof* `NaN`
127052
127343
 
127053
- Defined in: [lib/text.ts:770](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L770)
127344
+ Defined in: [lib/text.ts:808](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L808)
127054
127345
 
127055
127346
  虚假值类型
127056
127347
 
@@ -127067,7 +127358,7 @@ lib/text/variables/REGEXP_ASCII.md
127067
127358
 
127068
127359
  > `const` **REGEXP\_ASCII**: `RegExp`
127069
127360
 
127070
- Defined in: [lib/text.ts:285](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L285)
127361
+ Defined in: [lib/text.ts:323](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L323)
127071
127362
 
127072
127363
  可打印的 ascii 字符集
127073
127364
 
@@ -127084,7 +127375,7 @@ lib/text/variables/REGEXP_DOMAIN.md
127084
127375
 
127085
127376
  > `const` **REGEXP\_DOMAIN**: `RegExp`
127086
127377
 
127087
- Defined in: [lib/text.ts:273](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L273)
127378
+ Defined in: [lib/text.ts:311](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L311)
127088
127379
 
127089
127380
  lib/text/variables/REGEXP_EMAIL.md
127090
127381
  ---
@@ -127099,7 +127390,7 @@ lib/text/variables/REGEXP_EMAIL.md
127099
127390
 
127100
127391
  > `const` **REGEXP\_EMAIL**: `RegExp`
127101
127392
 
127102
- Defined in: [lib/text.ts:247](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L247)
127393
+ Defined in: [lib/text.ts:285](https://github.com/maiyunnet/kebab/blob/master/lib/text.ts#L285)
127103
127394
 
127104
127395
  lib/time/classes/Time.md
127105
127396
  ---
@@ -132498,7 +132789,7 @@ sys/ctr/classes/Ctr.md
132498
132789
 
132499
132790
  # Class: Ctr
132500
132791
 
132501
- Defined in: [sys/ctr.ts:123](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L123)
132792
+ Defined in: [sys/ctr.ts:142](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L142)
132502
132793
 
132503
132794
  ## Constructors
132504
132795
 
@@ -132506,7 +132797,7 @@ Defined in: [sys/ctr.ts:123](https://github.com/maiyunnet/kebab/blob/master/sys/
132506
132797
 
132507
132798
  > **new Ctr**(`config`, `req`, `res?`): `Ctr`
132508
132799
 
132509
- Defined in: [sys/ctr.ts:185](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L185)
132800
+ Defined in: [sys/ctr.ts:204](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L204)
132510
132801
 
132511
132802
  #### Parameters
132512
132803
 
@@ -132532,7 +132823,7 @@ Defined in: [sys/ctr.ts:185](https://github.com/maiyunnet/kebab/blob/master/sys/
132532
132823
 
132533
132824
  > `protected` **\_action**: `string` = `''`
132534
132825
 
132535
- Defined in: [sys/ctr.ts:129](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L129)
132826
+ Defined in: [sys/ctr.ts:148](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L148)
132536
132827
 
132537
132828
  当前的 action 名
132538
132829
 
@@ -132542,7 +132833,7 @@ Defined in: [sys/ctr.ts:129](https://github.com/maiyunnet/kebab/blob/master/sys/
132542
132833
 
132543
132834
  > `protected` **\_cacheTTL**: `number`
132544
132835
 
132545
- Defined in: [sys/ctr.ts:159](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L159)
132836
+ Defined in: [sys/ctr.ts:178](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L178)
132546
132837
 
132547
132838
  页面浏览器客户端缓存(单位:秒)
132548
132839
 
@@ -132552,7 +132843,7 @@ Defined in: [sys/ctr.ts:159](https://github.com/maiyunnet/kebab/blob/master/sys/
132552
132843
 
132553
132844
  > `protected` `readonly` **\_config**: [`IConfig`](../../../index/interfaces/IConfig.md)
132554
132845
 
132555
- Defined in: [sys/ctr.ts:171](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L171)
132846
+ Defined in: [sys/ctr.ts:190](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L190)
132556
132847
 
132557
132848
  vhost 的 kebab.json 以及全局常量
132558
132849
 
@@ -132562,7 +132853,7 @@ vhost 的 kebab.json 以及全局常量
132562
132853
 
132563
132854
  > `protected` **\_cookie**: `Record`\<`string`, `string`\> = `{}`
132564
132855
 
132565
- Defined in: [sys/ctr.ts:150](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L150)
132856
+ Defined in: [sys/ctr.ts:169](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L169)
132566
132857
 
132567
132858
  Cookie 数组
132568
132859
 
@@ -132572,7 +132863,7 @@ Cookie 数组
132572
132863
 
132573
132864
  > `protected` **\_files**: `Record`\<`string`, [`IPostFile`](../../../index/interfaces/IPostFile.md) \| [`IPostFile`](../../../index/interfaces/IPostFile.md)[]\> = `{}`
132574
132865
 
132575
- Defined in: [sys/ctr.ts:147](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L147)
132866
+ Defined in: [sys/ctr.ts:166](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L166)
132576
132867
 
132577
132868
  上传的文件列表
132578
132869
 
@@ -132582,7 +132873,7 @@ Defined in: [sys/ctr.ts:147](https://github.com/maiyunnet/kebab/blob/master/sys/
132582
132873
 
132583
132874
  > `protected` **\_get**: `Record`\<`string`, `string`\>
132584
132875
 
132585
- Defined in: [sys/ctr.ts:135](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L135)
132876
+ Defined in: [sys/ctr.ts:154](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L154)
132586
132877
 
132587
132878
  GET 数据
132588
132879
 
@@ -132592,7 +132883,7 @@ GET 数据
132592
132883
 
132593
132884
  > `protected` **\_headers**: `IncomingHttpHeaders` = `{}`
132594
132885
 
132595
- Defined in: [sys/ctr.ts:132](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L132)
132886
+ Defined in: [sys/ctr.ts:151](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L151)
132596
132887
 
132597
132888
  请求的 header 列表,key 均为小写
132598
132889
 
@@ -132602,7 +132893,7 @@ Defined in: [sys/ctr.ts:132](https://github.com/maiyunnet/kebab/blob/master/sys/
132602
132893
 
132603
132894
  > `protected` **\_httpCode**: `number` = `0`
132604
132895
 
132605
- Defined in: [sys/ctr.ts:165](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L165)
132896
+ Defined in: [sys/ctr.ts:184](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L184)
132606
132897
 
132607
132898
  自定义 http code
132608
132899
 
@@ -132612,7 +132903,7 @@ Defined in: [sys/ctr.ts:165](https://github.com/maiyunnet/kebab/blob/master/sys/
132612
132903
 
132613
132904
  > `protected` **\_input**: `string` = `''`
132614
132905
 
132615
- Defined in: [sys/ctr.ts:144](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L144)
132906
+ Defined in: [sys/ctr.ts:163](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L163)
132616
132907
 
132617
132908
  原始 input 字符串
132618
132909
 
@@ -132622,7 +132913,7 @@ Defined in: [sys/ctr.ts:144](https://github.com/maiyunnet/kebab/blob/master/sys/
132622
132913
 
132623
132914
  > `protected` **\_locale**: `string` = `'en'`
132624
132915
 
132625
- Defined in: [sys/ctr.ts:168](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L168)
132916
+ Defined in: [sys/ctr.ts:187](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L187)
132626
132917
 
132627
132918
  当前语言名
132628
132919
 
@@ -132632,7 +132923,7 @@ Defined in: [sys/ctr.ts:168](https://github.com/maiyunnet/kebab/blob/master/sys/
132632
132923
 
132633
132924
  > `protected` **\_localeData**: `Record`\<`string`, `Record`\<`string`, `string`\>\> = `{}`
132634
132925
 
132635
- Defined in: [sys/ctr.ts:183](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L183)
132926
+ Defined in: [sys/ctr.ts:202](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L202)
132636
132927
 
132637
132928
  本 ctr 的 locale data
132638
132929
 
@@ -132642,7 +132933,7 @@ Defined in: [sys/ctr.ts:183](https://github.com/maiyunnet/kebab/blob/master/sys/
132642
132933
 
132643
132934
  > `protected` **\_localeFiles**: `string`[] = `[]`
132644
132935
 
132645
- Defined in: [sys/ctr.ts:180](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L180)
132936
+ Defined in: [sys/ctr.ts:199](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L199)
132646
132937
 
132647
132938
  本 ctr 已加载的语言文件列表
132648
132939
 
@@ -132652,7 +132943,7 @@ Defined in: [sys/ctr.ts:180](https://github.com/maiyunnet/kebab/blob/master/sys/
132652
132943
 
132653
132944
  > `protected` **\_param**: `string`[] = `[]`
132654
132945
 
132655
- Defined in: [sys/ctr.ts:126](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L126)
132946
+ Defined in: [sys/ctr.ts:145](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L145)
132656
132947
 
132657
132948
  路由参数序列数组
132658
132949
 
@@ -132662,7 +132953,7 @@ Defined in: [sys/ctr.ts:126](https://github.com/maiyunnet/kebab/blob/master/sys/
132662
132953
 
132663
132954
  > `protected` **\_post**: `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\> = `{}`
132664
132955
 
132665
- Defined in: [sys/ctr.ts:141](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L141)
132956
+ Defined in: [sys/ctr.ts:160](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L160)
132666
132957
 
132667
132958
  POST 数据
132668
132959
 
@@ -132672,7 +132963,7 @@ POST 数据
132672
132963
 
132673
132964
  > `protected` **\_rawPost**: `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\> = `{}`
132674
132965
 
132675
- Defined in: [sys/ctr.ts:138](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L138)
132966
+ Defined in: [sys/ctr.ts:157](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L157)
132676
132967
 
132677
132968
  原始 POST 数据
132678
132969
 
@@ -132682,7 +132973,7 @@ Defined in: [sys/ctr.ts:138](https://github.com/maiyunnet/kebab/blob/master/sys/
132682
132973
 
132683
132974
  > `protected` `readonly` **\_req**: `IncomingMessage` \| `Http2ServerRequest`
132684
132975
 
132685
- Defined in: [sys/ctr.ts:173](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L173)
132976
+ Defined in: [sys/ctr.ts:192](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L192)
132686
132977
 
132687
132978
  ***
132688
132979
 
@@ -132690,7 +132981,7 @@ Defined in: [sys/ctr.ts:173](https://github.com/maiyunnet/kebab/blob/master/sys/
132690
132981
 
132691
132982
  > `protected` `readonly` **\_res**: `Http2ServerResponse`\<`Http2ServerRequest`\> \| `ServerResponse`\<`IncomingMessage`\>
132692
132983
 
132693
- Defined in: [sys/ctr.ts:175](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L175)
132984
+ Defined in: [sys/ctr.ts:194](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L194)
132694
132985
 
132695
132986
  ***
132696
132987
 
@@ -132698,7 +132989,7 @@ Defined in: [sys/ctr.ts:175](https://github.com/maiyunnet/kebab/blob/master/sys/
132698
132989
 
132699
132990
  > `protected` **\_sess**: [`Session`](../../../lib/session/classes/Session.md) \| `null` = `null`
132700
132991
 
132701
- Defined in: [sys/ctr.ts:156](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L156)
132992
+ Defined in: [sys/ctr.ts:175](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L175)
132702
132993
 
132703
132994
  Session --- 对象
132704
132995
 
@@ -132708,7 +132999,7 @@ Session --- 对象
132708
132999
 
132709
133000
  > `protected` **\_session**: `Record`\<`string`, `any`\> = `{}`
132710
133001
 
132711
- Defined in: [sys/ctr.ts:153](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L153)
133002
+ Defined in: [sys/ctr.ts:172](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L172)
132712
133003
 
132713
133004
  Session 数组
132714
133005
 
@@ -132718,7 +133009,7 @@ Session 数组
132718
133009
 
132719
133010
  > `protected` `readonly` **\_socket**: [`Socket`](../../../lib/ws/classes/Socket.md)
132720
133011
 
132721
- Defined in: [sys/ctr.ts:177](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L177)
133012
+ Defined in: [sys/ctr.ts:196](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L196)
132722
133013
 
132723
133014
  ***
132724
133015
 
@@ -132726,7 +133017,7 @@ Defined in: [sys/ctr.ts:177](https://github.com/maiyunnet/kebab/blob/master/sys/
132726
133017
 
132727
133018
  > `protected` `optional` **\_timer?**: `object`
132728
133019
 
132729
- Defined in: [sys/ctr.ts:210](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L210)
133020
+ Defined in: [sys/ctr.ts:229](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L229)
132730
133021
 
132731
133022
  timeout 的 timer
132732
133023
 
@@ -132752,7 +133043,7 @@ timeout 的 timer
132752
133043
 
132753
133044
  > `protected` **\_xsrf**: `string` = `''`
132754
133045
 
132755
- Defined in: [sys/ctr.ts:162](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L162)
133046
+ Defined in: [sys/ctr.ts:181](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L181)
132756
133047
 
132757
133048
  XSRF TOKEN 值
132758
133049
 
@@ -132764,7 +133055,7 @@ XSRF TOKEN 值
132764
133055
 
132765
133056
  > **get** `protected` **\_isAvail**(): `boolean`
132766
133057
 
132767
- Defined in: [sys/ctr.ts:199](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L199)
133058
+ Defined in: [sys/ctr.ts:218](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L218)
132768
133059
 
132769
133060
  当前用户连接是否还在连接中
132770
133061
 
@@ -132780,7 +133071,7 @@ Defined in: [sys/ctr.ts:199](https://github.com/maiyunnet/kebab/blob/master/sys/
132780
133071
 
132781
133072
  > **get** **timeout**(): `number`
132782
133073
 
132783
- Defined in: [sys/ctr.ts:217](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L217)
133074
+ Defined in: [sys/ctr.ts:236](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L236)
132784
133075
 
132785
133076
  获取当前过期时间(毫秒)
132786
133077
 
@@ -132792,7 +133083,7 @@ Defined in: [sys/ctr.ts:217](https://github.com/maiyunnet/kebab/blob/master/sys/
132792
133083
 
132793
133084
  > **set** **timeout**(`num`): `void`
132794
133085
 
132795
- Defined in: [sys/ctr.ts:224](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L224)
133086
+ Defined in: [sys/ctr.ts:243](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L243)
132796
133087
 
132797
133088
  设置当前过期时间(毫秒)
132798
133089
 
@@ -132812,7 +133103,7 @@ Defined in: [sys/ctr.ts:224](https://github.com/maiyunnet/kebab/blob/master/sys/
132812
133103
 
132813
133104
  > `protected` **\_asyncTask**(`func`): `void`
132814
133105
 
132815
- Defined in: [sys/ctr.ts:258](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L258)
133106
+ Defined in: [sys/ctr.ts:277](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L277)
132816
133107
 
132817
133108
  执行一段跳出堆栈的异步代码,代码执行完成前,热更新不会杀死当面进程 且 ftmp 临时文件不会被清除
132818
133109
 
@@ -132834,7 +133125,7 @@ Defined in: [sys/ctr.ts:258](https://github.com/maiyunnet/kebab/blob/master/sys/
132834
133125
 
132835
133126
  > `protected` **\_checkInput**(`input`, `rule`, `rtn`): `boolean`
132836
133127
 
132837
- Defined in: [sys/ctr.ts:721](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L721)
133128
+ Defined in: [sys/ctr.ts:720](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L720)
132838
133129
 
132839
133130
  检测提交的数据类型
132840
133131
 
@@ -132868,7 +133159,7 @@ Defined in: [sys/ctr.ts:721](https://github.com/maiyunnet/kebab/blob/master/sys/
132868
133159
 
132869
133160
  > `protected` **\_checkXInput**(`input`, `rule`, `rtn`, `ignore?`): `boolean`
132870
133161
 
132871
- Defined in: [sys/ctr.ts:900](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L900)
133162
+ Defined in: [sys/ctr.ts:899](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L899)
132872
133163
 
132873
133164
  检测提交的数据类型(会检测 XSRF)
132874
133165
 
@@ -132908,7 +133199,7 @@ Defined in: [sys/ctr.ts:900](https://github.com/maiyunnet/kebab/blob/master/sys/
132908
133199
 
132909
133200
  > `protected` **\_cross**(`opt?`): `boolean`
132910
133201
 
132911
- Defined in: [sys/ctr.ts:1135](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1135)
133202
+ Defined in: [sys/ctr.ts:1136](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1136)
132912
133203
 
132913
133204
  开启跨域请求
132914
133205
 
@@ -132953,7 +133244,7 @@ Defined in: [sys/ctr.ts:1135](https://github.com/maiyunnet/kebab/blob/master/sys
132953
133244
 
132954
133245
  > `protected` **\_device**(): `"unknown"` \| `"android"` \| `"linux"` \| `"windows"` \| `"macintosh"` \| `"ipad"`
132955
133246
 
132956
- Defined in: [sys/ctr.ts:945](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L945)
133247
+ Defined in: [sys/ctr.ts:944](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L944)
132957
133248
 
132958
133249
  根据用户 ua 获取当前用户的设备类型
132959
133250
 
@@ -132967,7 +133258,7 @@ Defined in: [sys/ctr.ts:945](https://github.com/maiyunnet/kebab/blob/master/sys/
132967
133258
 
132968
133259
  > `protected` **\_enabledXsrf**(`opt?`): `void`
132969
133260
 
132970
- Defined in: [sys/ctr.ts:914](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L914)
133261
+ Defined in: [sys/ctr.ts:913](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L913)
132971
133262
 
132972
133263
  当前页面开启 XSRF 支持(主要检测 cookie 是否存在)
132973
133264
  如果当前页面有 CDN,请不要使用
@@ -132990,7 +133281,7 @@ Defined in: [sys/ctr.ts:914](https://github.com/maiyunnet/kebab/blob/master/sys/
132990
133281
 
132991
133282
  > `protected` **\_end**(`code?`, `reason?`): `void`
132992
133283
 
132993
- Defined in: [sys/ctr.ts:1245](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1245)
133284
+ Defined in: [sys/ctr.ts:1246](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1246)
132994
133285
 
132995
133286
  主动关闭当前 socket 连接
132996
133287
 
@@ -133018,7 +133309,7 @@ WebSocket 关闭码
133018
133309
 
133019
133310
  > `protected` **\_getBasicAuth**(`user`, `pwd`): `string`
133020
133311
 
133021
- Defined in: [sys/ctr.ts:938](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L938)
133312
+ Defined in: [sys/ctr.ts:937](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L937)
133022
133313
 
133023
133314
  获取 Auth 字符串,用于客户端提交
133024
133315
 
@@ -133046,7 +133337,7 @@ Defined in: [sys/ctr.ts:938](https://github.com/maiyunnet/kebab/blob/master/sys/
133046
133337
 
133047
133338
  > `protected` **\_getLocale**(): `string`
133048
133339
 
133049
- Defined in: [sys/ctr.ts:1126](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1126)
133340
+ Defined in: [sys/ctr.ts:1127](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1127)
133050
133341
 
133051
133342
  获取当前语言名
133052
133343
 
@@ -133060,7 +133351,7 @@ Defined in: [sys/ctr.ts:1126](https://github.com/maiyunnet/kebab/blob/master/sys
133060
133351
 
133061
133352
  > `protected` **\_getLocaleJsonString**(): `string`
133062
133353
 
133063
- Defined in: [sys/ctr.ts:1114](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1114)
133354
+ Defined in: [sys/ctr.ts:1115](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1115)
133064
133355
 
133065
133356
  根据当前后台语言包设置情况获取 JSON 字符串传输到前台
133066
133357
 
@@ -133076,7 +133367,7 @@ string
133076
133367
 
133077
133368
  > `protected` **\_getMemoryUsage**(): `number`
133078
133369
 
133079
- Defined in: [sys/ctr.ts:408](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L408)
133370
+ Defined in: [sys/ctr.ts:427](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L427)
133080
133371
 
133081
133372
  获取截止当前内存的使用情况
133082
133373
 
@@ -133090,7 +133381,7 @@ Defined in: [sys/ctr.ts:408](https://github.com/maiyunnet/kebab/blob/master/sys/
133090
133381
 
133091
133382
  > `protected` **\_getRunTime**(`ms?`): `number`
133092
133383
 
133093
- Defined in: [sys/ctr.ts:400](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L400)
133384
+ Defined in: [sys/ctr.ts:419](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L419)
133094
133385
 
133095
133386
  获取截止当前时间的总运行时间
133096
133387
 
@@ -133112,7 +133403,7 @@ Defined in: [sys/ctr.ts:400](https://github.com/maiyunnet/kebab/blob/master/sys/
133112
133403
 
133113
133404
  > `protected` **\_handleFormData**(`events?`, `limits?`): `Promise`\<`boolean`\>
133114
133405
 
133115
- Defined in: [sys/ctr.ts:1254](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1254)
133406
+ Defined in: [sys/ctr.ts:1255](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1255)
133116
133407
 
133117
133408
  获取 formdata 的信息
133118
133409
 
@@ -133190,7 +133481,7 @@ multipart 字段与文件总数量,默认 1000
133190
133481
 
133191
133482
  > **\_l**(`key`, `data?`): `string`
133192
133483
 
133193
- Defined in: [sys/ctr.ts:1178](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1178)
133484
+ Defined in: [sys/ctr.ts:1179](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1179)
133194
133485
 
133195
133486
  获取语言包值
133196
133487
 
@@ -133216,7 +133507,7 @@ Defined in: [sys/ctr.ts:1178](https://github.com/maiyunnet/kebab/blob/master/sys
133216
133507
 
133217
133508
  > `protected` **\_loadData**\<`T`\>(`path`): `Promise`\<`false` \| `T` \| `null`\>
133218
133509
 
133219
- Defined in: [sys/ctr.ts:1014](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1014)
133510
+ Defined in: [sys/ctr.ts:1013](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1013)
133220
133511
 
133221
133512
  获取 data JSON 数据
133222
133513
 
@@ -133244,7 +133535,7 @@ Defined in: [sys/ctr.ts:1014](https://github.com/maiyunnet/kebab/blob/master/sys
133244
133535
 
133245
133536
  > `protected` **\_loadLocale**(`loc`, `pkg?`): `Promise`\<`boolean`\>
133246
133537
 
133247
- Defined in: [sys/ctr.ts:1065](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1065)
133538
+ Defined in: [sys/ctr.ts:1066](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1066)
133248
133539
 
133249
133540
  设定语言并加载语言包
133250
133541
 
@@ -133272,7 +133563,7 @@ Defined in: [sys/ctr.ts:1065](https://github.com/maiyunnet/kebab/blob/master/sys
133272
133563
 
133273
133564
  > `protected` **\_loadReactPage**(`path`, `props?`, `opt?`): `Promise`\<`string`\>
133274
133565
 
133275
- Defined in: [sys/ctr.ts:444](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L444)
133566
+ Defined in: [sys/ctr.ts:463](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L463)
133276
133567
 
133277
133568
  加载 React 全页面进行 SSR 渲染,组件需渲染完整 HTML 文档(含 html/head/body),无需 EJS
133278
133569
  框架自动注入 props:_urlBase/_urlFull/_urlStc/_staticVer/_staticPath/_staticPathFull
@@ -133295,35 +133586,9 @@ Defined in: [sys/ctr.ts:444](https://github.com/maiyunnet/kebab/blob/master/sys/
133295
133586
 
133296
133587
  ##### opt?
133297
133588
 
133298
- 可选配置
133299
-
133300
- ###### hydrate?
133301
-
133302
- `boolean`
133303
-
133304
- 是否注入客户端水合 bundle,默认 true;设为 false 时仅输出服务端渲染的 HTML
133305
-
133306
- ###### router?
133307
-
133308
- `"browser"`
133309
-
133310
- 路由模式,不传则不注入任何 Router,组件自行管理路由(如 MemoryRouter)或无路由
133311
- 'browser':服务端用 StaticRouter,客户端用 BrowserRouter,地址栏与路由联动
133312
- 组件本身只需使用 Routes/Route/Link 等,不要包含任何 Router 包裹层
133313
-
133314
- ###### routerBase?
133589
+ [`IReactPageOptions`](../interfaces/IReactPageOptions.md) = `{}`
133315
133590
 
133316
- `string`
133317
-
133318
- BrowserRouter 的 basename,相对于 urlBase,默认空字符串
133319
- 例如组件挂载在 /test/react-router-page,则填 'test/react-router-page'
133320
-
133321
- ###### staticPath?
133322
-
133323
- `string`
133324
-
133325
- 静态资源基础路径,覆盖 config.set.staticPath,用于指定 CDN 或自定义路径
133326
- 影响 _staticPath prop 以及水合脚本中 JS 文件的 URL 前缀
133591
+ 可选配置
133327
133592
 
133328
133593
  #### Returns
133329
133594
 
@@ -133335,7 +133600,7 @@ BrowserRouter 的 basename,相对于 urlBase,默认空字符串
133335
133600
 
133336
133601
  > `protected` **\_loadView**(`path`, `data?`): `Promise`\<`string`\>
133337
133602
 
133338
- Defined in: [sys/ctr.ts:417](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L417)
133603
+ Defined in: [sys/ctr.ts:436](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L436)
133339
133604
 
133340
133605
  加载视图
133341
133606
 
@@ -133357,11 +133622,11 @@ Defined in: [sys/ctr.ts:417](https://github.com/maiyunnet/kebab/blob/master/sys/
133357
133622
 
133358
133623
  ### \_location()
133359
133624
 
133360
- > `protected` **\_location**(`location`): `false`
133625
+ > `protected` **\_location**(`location`, `httpCode?`): `false`
133361
133626
 
133362
133627
  Defined in: [sys/ctr.ts:1035](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1035)
133363
133628
 
133364
- 跳转(302临时跳转),支持相对本项目根路径的路径或绝对路径
133629
+ 跳转,支持相对本项目根路径的路径或绝对路径
133365
133630
 
133366
133631
  #### Parameters
133367
133632
 
@@ -133371,6 +133636,12 @@ Defined in: [sys/ctr.ts:1035](https://github.com/maiyunnet/kebab/blob/master/sys
133371
133636
 
133372
133637
  相对或绝对网址
133373
133638
 
133639
+ ##### httpCode?
133640
+
133641
+ [`TRedirectHttpCode`](../type-aliases/TRedirectHttpCode.md) = `302`
133642
+
133643
+ HTTP 重定向状态码,默认 302
133644
+
133374
133645
  #### Returns
133375
133646
 
133376
133647
  `false`
@@ -133381,7 +133652,7 @@ Defined in: [sys/ctr.ts:1035](https://github.com/maiyunnet/kebab/blob/master/sys
133381
133652
 
133382
133653
  > `protected` **\_ping**(`data?`): `boolean`
133383
133654
 
133384
- Defined in: [sys/ctr.ts:1228](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1228)
133655
+ Defined in: [sys/ctr.ts:1229](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1229)
133385
133656
 
133386
133657
  发送 socket ping
133387
133658
 
@@ -133403,7 +133674,7 @@ Defined in: [sys/ctr.ts:1228](https://github.com/maiyunnet/kebab/blob/master/sys
133403
133674
 
133404
133675
  > `protected` **\_pong**(`data?`): `boolean`
133405
133676
 
133406
- Defined in: [sys/ctr.ts:1236](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1236)
133677
+ Defined in: [sys/ctr.ts:1237](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1237)
133407
133678
 
133408
133679
  发送 socket pong
133409
133680
 
@@ -133425,7 +133696,7 @@ Defined in: [sys/ctr.ts:1236](https://github.com/maiyunnet/kebab/blob/master/sys
133425
133696
 
133426
133697
  > `protected` **\_startSession**(`link`, `auth?`, `opt?`): `Promise`\<`boolean`\>
133427
133698
 
133428
- Defined in: [sys/ctr.ts:1049](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1049)
133699
+ Defined in: [sys/ctr.ts:1050](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1050)
133429
133700
 
133430
133701
  开启 Session
133431
133702
 
@@ -133459,7 +133730,7 @@ Kv 或 Db 实例
133459
133730
 
133460
133731
  > `protected` **\_valibot**\<`TSchema`\>(`schema`, `input`, `options?`): [`TValibotResult`](../type-aliases/TValibotResult.md)\<`TSchema`\>
133461
133732
 
133462
- Defined in: [sys/ctr.ts:640](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L640)
133733
+ Defined in: [sys/ctr.ts:639](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L639)
133463
133734
 
133464
133735
  使用 Valibot schema 校验并解析输入,成功后 output 会自动推导类型
133465
133736
 
@@ -133501,7 +133772,7 @@ Valibot 配置和自定义客户端返回值
133501
133772
 
133502
133773
  > `protected` **\_valibotx**\<`TSchema`\>(`schema`, `input`, `options?`): [`TValibotResult`](../type-aliases/TValibotResult.md)\<`TSchema`, [`IValibotXsrfIssue`](../interfaces/IValibotXsrfIssue.md) \| [`InferIssue`](../../../lib/core/namespaces/v/type-aliases/InferIssue.md)\<`TSchema`\>\>
133503
133774
 
133504
- Defined in: [sys/ctr.ts:664](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L664)
133775
+ Defined in: [sys/ctr.ts:663](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L663)
133505
133776
 
133506
133777
  使用 Valibot schema 校验并解析输入,同时检测 XSRF
133507
133778
 
@@ -133543,7 +133814,7 @@ Valibot 配置、自定义客户端返回值和 XSRF 选项
133543
133814
 
133544
133815
  > `protected` **\_writeBinary**(`data`): `boolean`
133545
133816
 
133546
- Defined in: [sys/ctr.ts:1220](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1220)
133817
+ Defined in: [sys/ctr.ts:1221](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1221)
133547
133818
 
133548
133819
  发送 socket 二进制
133549
133820
 
@@ -133565,7 +133836,7 @@ Defined in: [sys/ctr.ts:1220](https://github.com/maiyunnet/kebab/blob/master/sys
133565
133836
 
133566
133837
  > `protected` **\_writeResult**(`data`): `boolean`
133567
133838
 
133568
- Defined in: [sys/ctr.ts:1212](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1212)
133839
+ Defined in: [sys/ctr.ts:1213](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1213)
133569
133840
 
133570
133841
  发送结果对象文本
133571
133842
 
@@ -133587,7 +133858,7 @@ Defined in: [sys/ctr.ts:1212](https://github.com/maiyunnet/kebab/blob/master/sys
133587
133858
 
133588
133859
  > `protected` **\_writeText**(`data`): `boolean`
133589
133860
 
133590
- Defined in: [sys/ctr.ts:1204](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1204)
133861
+ Defined in: [sys/ctr.ts:1205](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L1205)
133591
133862
 
133592
133863
  发送 socket 文本
133593
133864
 
@@ -133609,7 +133880,7 @@ Defined in: [sys/ctr.ts:1204](https://github.com/maiyunnet/kebab/blob/master/sys
133609
133880
 
133610
133881
  > **getAuthorization**(): `false` \| \{ `pwd`: `string`; `type`: `"basic"`; `user`: `string`; \} \| \{ `token`: `string`; `type`: `"bearer"`; \}
133611
133882
 
133612
- Defined in: [sys/ctr.ts:966](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L966)
133883
+ Defined in: [sys/ctr.ts:965](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L965)
133613
133884
 
133614
133885
  通过 header 或 _auth 获取鉴权信息,支持 Basic Auth 和 Bearer Token
133615
133886
 
@@ -133625,7 +133896,7 @@ Defined in: [sys/ctr.ts:966](https://github.com/maiyunnet/kebab/blob/master/sys/
133625
133896
 
133626
133897
  > **getPrototype**(`name`): [`IConfig`](../../../index/interfaces/IConfig.md)
133627
133898
 
133628
- Defined in: [sys/ctr.ts:282](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L282)
133899
+ Defined in: [sys/ctr.ts:301](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L301)
133629
133900
 
133630
133901
  获取类内部的 prototype
133631
133902
 
@@ -133643,7 +133914,7 @@ Defined in: [sys/ctr.ts:282](https://github.com/maiyunnet/kebab/blob/master/sys/
133643
133914
 
133644
133915
  > **getPrototype**(`name`): [`Session`](../../../lib/session/classes/Session.md) \| `null`
133645
133916
 
133646
- Defined in: [sys/ctr.ts:283](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L283)
133917
+ Defined in: [sys/ctr.ts:302](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L302)
133647
133918
 
133648
133919
  获取类内部的 prototype
133649
133920
 
@@ -133661,7 +133932,7 @@ Defined in: [sys/ctr.ts:283](https://github.com/maiyunnet/kebab/blob/master/sys/
133661
133932
 
133662
133933
  > **getPrototype**(`name`): `IncomingHttpHeaders`
133663
133934
 
133664
- Defined in: [sys/ctr.ts:284](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L284)
133935
+ Defined in: [sys/ctr.ts:303](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L303)
133665
133936
 
133666
133937
  获取类内部的 prototype
133667
133938
 
@@ -133679,7 +133950,7 @@ Defined in: [sys/ctr.ts:284](https://github.com/maiyunnet/kebab/blob/master/sys/
133679
133950
 
133680
133951
  > **getPrototype**(`name`): `IncomingMessage` \| `Http2ServerRequest`
133681
133952
 
133682
- Defined in: [sys/ctr.ts:285](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L285)
133953
+ Defined in: [sys/ctr.ts:304](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L304)
133683
133954
 
133684
133955
  获取类内部的 prototype
133685
133956
 
@@ -133697,7 +133968,7 @@ Defined in: [sys/ctr.ts:285](https://github.com/maiyunnet/kebab/blob/master/sys/
133697
133968
 
133698
133969
  > **getPrototype**(`name`): `Http2ServerResponse`\<`Http2ServerRequest`\> \| `ServerResponse`\<`IncomingMessage`\>
133699
133970
 
133700
- Defined in: [sys/ctr.ts:286](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L286)
133971
+ Defined in: [sys/ctr.ts:305](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L305)
133701
133972
 
133702
133973
  获取类内部的 prototype
133703
133974
 
@@ -133715,7 +133986,7 @@ Defined in: [sys/ctr.ts:286](https://github.com/maiyunnet/kebab/blob/master/sys/
133715
133986
 
133716
133987
  > **getPrototype**(`name`): [`Socket`](../../../lib/ws/classes/Socket.md)
133717
133988
 
133718
- Defined in: [sys/ctr.ts:287](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L287)
133989
+ Defined in: [sys/ctr.ts:306](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L306)
133719
133990
 
133720
133991
  获取类内部的 prototype
133721
133992
 
@@ -133733,7 +134004,7 @@ Defined in: [sys/ctr.ts:287](https://github.com/maiyunnet/kebab/blob/master/sys/
133733
134004
 
133734
134005
  > **getPrototype**(`name`): `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>
133735
134006
 
133736
- Defined in: [sys/ctr.ts:288](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L288)
134007
+ Defined in: [sys/ctr.ts:307](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L307)
133737
134008
 
133738
134009
  获取类内部的 prototype
133739
134010
 
@@ -133751,7 +134022,7 @@ Defined in: [sys/ctr.ts:288](https://github.com/maiyunnet/kebab/blob/master/sys/
133751
134022
 
133752
134023
  > **getPrototype**(`name`): `string`
133753
134024
 
133754
- Defined in: [sys/ctr.ts:289](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L289)
134025
+ Defined in: [sys/ctr.ts:308](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L308)
133755
134026
 
133756
134027
  获取类内部的 prototype
133757
134028
 
@@ -133769,7 +134040,7 @@ Defined in: [sys/ctr.ts:289](https://github.com/maiyunnet/kebab/blob/master/sys/
133769
134040
 
133770
134041
  > **getPrototype**(`name`): `any`
133771
134042
 
133772
- Defined in: [sys/ctr.ts:290](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L290)
134043
+ Defined in: [sys/ctr.ts:309](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L309)
133773
134044
 
133774
134045
  获取类内部的 prototype
133775
134046
 
@@ -133789,7 +134060,7 @@ Defined in: [sys/ctr.ts:290](https://github.com/maiyunnet/kebab/blob/master/sys/
133789
134060
 
133790
134061
  > **onClose**(): `void` \| `Promise`\<`void`\>
133791
134062
 
133792
- Defined in: [sys/ctr.ts:384](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L384)
134063
+ Defined in: [sys/ctr.ts:403](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L403)
133793
134064
 
133794
134065
  WebSocket 下连接被终止后会自动被调用的事件,可重写此方法
133795
134066
 
@@ -133803,7 +134074,7 @@ WebSocket 下连接被终止后会自动被调用的事件,可重写此方法
133803
134074
 
133804
134075
  > **onData**(`data`, `opcode`): `any`
133805
134076
 
133806
- Defined in: [sys/ctr.ts:349](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L349)
134077
+ Defined in: [sys/ctr.ts:368](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L368)
133807
134078
 
133808
134079
  WebSocket 下当收到数据时会自动被调用的事件,即只文本和二进制数据,返回内容会被发送给 socket
133809
134080
 
@@ -133833,7 +134104,7 @@ WebSocket 下当收到数据时会自动被调用的事件,即只文本和二
133833
134104
 
133834
134105
  > **onDrain**(): `void` \| `Promise`\<`void`\>
133835
134106
 
133836
- Defined in: [sys/ctr.ts:370](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L370)
134107
+ Defined in: [sys/ctr.ts:389](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L389)
133837
134108
 
133838
134109
  WebSocket 下连接恢复可写入状态后会调用此事件,可重写此方法
133839
134110
 
@@ -133847,7 +134118,7 @@ WebSocket 下连接恢复可写入状态后会调用此事件,可重写此方
133847
134118
 
133848
134119
  > **onEnd**(): `void` \| `Promise`\<`void`\>
133849
134120
 
133850
- Defined in: [sys/ctr.ts:377](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L377)
134121
+ Defined in: [sys/ctr.ts:396](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L396)
133851
134122
 
133852
134123
  WebSocket 下连接被 end 后会自动被调用的事件,可重写此方法
133853
134124
 
@@ -133861,7 +134132,7 @@ WebSocket 下连接被 end 后会自动被调用的事件,可重写此方法
133861
134132
 
133862
134133
  > **onLoad**(): `string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[] \| `Promise`\<`string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[]\>
133863
134134
 
133864
- Defined in: [sys/ctr.ts:308](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L308)
134135
+ Defined in: [sys/ctr.ts:327](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L327)
133865
134136
 
133866
134137
  实例化后会执行的方法,可重写此方法
133867
134138
 
@@ -133877,7 +134148,7 @@ Defined in: [sys/ctr.ts:308](https://github.com/maiyunnet/kebab/blob/master/sys/
133877
134148
 
133878
134149
  > **onMessage**(`data`, `opcode`): `boolean` \| `Promise`\<`boolean` \| `undefined`\> \| `undefined`
133879
134150
 
133880
- Defined in: [sys/ctr.ts:361](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L361)
134151
+ Defined in: [sys/ctr.ts:380](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L380)
133881
134152
 
133882
134153
  包含所有 opcode 的消息,若要发送数据需自行调用 write 方法,data 恒定为原始 buffer
133883
134154
  返回 false 则不会执行默认方法,一般请什么都不要返回
@@ -133907,7 +134178,7 @@ opcode
133907
134178
 
133908
134179
  > **onReady**(): `string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[] \| `Promise`\<`string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[]\>
133909
134180
 
133910
- Defined in: [sys/ctr.ts:317](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L317)
134181
+ Defined in: [sys/ctr.ts:336](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L336)
133911
134182
 
133912
134183
  onLoad 执行后会执行的方法,可重写此方法
133913
134184
 
@@ -133923,7 +134194,7 @@ onLoad 执行后会执行的方法,可重写此方法
133923
134194
 
133924
134195
  > **onReqStart**(): `number` \| `Promise`\<`number`\>
133925
134196
 
133926
- Defined in: [sys/ctr.ts:392](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L392)
134197
+ Defined in: [sys/ctr.ts:411](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L411)
133927
134198
 
133928
134199
  请求发送开始时调用(仅会在 middle 内触发)
133929
134200
 
@@ -133939,7 +134210,7 @@ Defined in: [sys/ctr.ts:392](https://github.com/maiyunnet/kebab/blob/master/sys/
133939
134210
 
133940
134211
  > **onUnload**(`rtn`): `string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[] \| `Promise`\<`string` \| `boolean` \| [`DbValue`](../../../index/type-aliases/DbValue.md)[]\>
133941
134212
 
133942
- Defined in: [sys/ctr.ts:327](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L327)
134213
+ Defined in: [sys/ctr.ts:346](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L346)
133943
134214
 
133944
134215
  整个结束前会执行本方法,可重写此方法对输出结果再处理一次(Websocket 模式无效)
133945
134216
 
@@ -133963,7 +134234,7 @@ Defined in: [sys/ctr.ts:327](https://github.com/maiyunnet/kebab/blob/master/sys/
133963
134234
 
133964
134235
  > **onUpgrade**(): `object`
133965
134236
 
133966
- Defined in: [sys/ctr.ts:336](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L336)
134237
+ Defined in: [sys/ctr.ts:355](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L355)
133967
134238
 
133968
134239
  WebSocket 下在建立 Server 连接之前可对 WebSocket 的信息进行配置
133969
134240
 
@@ -133987,7 +134258,7 @@ WebSocket 配置参数,包含自定义 header 和超时时间
133987
134258
 
133988
134259
  > **setPrototype**(`name`, `val`): `void`
133989
134260
 
133990
- Defined in: [sys/ctr.ts:296](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L296)
134261
+ Defined in: [sys/ctr.ts:315](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L315)
133991
134262
 
133992
134263
  设置类内部的 prototype
133993
134264
 
@@ -134039,7 +134310,7 @@ sys/ctr/functions/isHttpRequestAvailable.md
134039
134310
 
134040
134311
  > **isHttpRequestAvailable**(`req`, `res`): `boolean`
134041
134312
 
134042
- Defined in: [sys/ctr.ts:104](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L104)
134313
+ Defined in: [sys/ctr.ts:123](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L123)
134043
134314
 
134044
134315
  判断当前 HTTP 请求是否仍可响应
134045
134316
 
@@ -134080,12 +134351,14 @@ sys/ctr/index.md
134080
134351
 
134081
134352
  ## Interfaces
134082
134353
 
134354
+ - [IReactPageOptions](interfaces/IReactPageOptions.md)
134083
134355
  - [IValibotOptions](interfaces/IValibotOptions.md)
134084
134356
  - [IValibotXOptions](interfaces/IValibotXOptions.md)
134085
134357
  - [IValibotXsrfIssue](interfaces/IValibotXsrfIssue.md)
134086
134358
 
134087
134359
  ## Type Aliases
134088
134360
 
134361
+ - [TRedirectHttpCode](type-aliases/TRedirectHttpCode.md)
134089
134362
  - [TValibotResponse](type-aliases/TValibotResponse.md)
134090
134363
  - [TValibotResult](type-aliases/TValibotResult.md)
134091
134364
  - [TValibotTranslate](type-aliases/TValibotTranslate.md)
@@ -134095,6 +134368,63 @@ sys/ctr/index.md
134095
134368
  - [clearLocaleData](functions/clearLocaleData.md)
134096
134369
  - [isHttpRequestAvailable](functions/isHttpRequestAvailable.md)
134097
134370
 
134371
+ sys/ctr/interfaces/IReactPageOptions.md
134372
+ ---
134373
+
134374
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
134375
+
134376
+ ***
134377
+
134378
+ [Documents for @maiyunnet/kebab](../../../index.md) / [sys/ctr](../index.md) / IReactPageOptions
134379
+
134380
+ # Interface: IReactPageOptions
134381
+
134382
+ Defined in: [sys/ctr.ts:102](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L102)
134383
+
134384
+ React SSR 页面选项
134385
+
134386
+ ## Properties
134387
+
134388
+ ### hydrate?
134389
+
134390
+ > `optional` **hydrate?**: `boolean`
134391
+
134392
+ Defined in: [sys/ctr.ts:104](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L104)
134393
+
134394
+ 是否注入客户端水合 bundle,默认 true;设为 false 时仅输出服务端渲染的 HTML
134395
+
134396
+ ***
134397
+
134398
+ ### router?
134399
+
134400
+ > `optional` **router?**: `"browser"`
134401
+
134402
+ Defined in: [sys/ctr.ts:110](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L110)
134403
+
134404
+ 路由模式,不传则不注入任何 Router,组件自行管理路由(如 MemoryRouter)或无路由
134405
+ 'browser':服务端用 StaticRouter,客户端用 BrowserRouter,地址栏与路由联动
134406
+ 组件本身只需使用 Routes/Route/Link 等,不要包含任何 Router 包裹层
134407
+
134408
+ ***
134409
+
134410
+ ### routerBase?
134411
+
134412
+ > `optional` **routerBase?**: `string`
134413
+
134414
+ Defined in: [sys/ctr.ts:112](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L112)
134415
+
134416
+ BrowserRouter 的 basename,相对于 urlBase,默认空字符串
134417
+
134418
+ ***
134419
+
134420
+ ### staticPath?
134421
+
134422
+ > `optional` **staticPath?**: `string`
134423
+
134424
+ Defined in: [sys/ctr.ts:114](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L114)
134425
+
134426
+ 静态资源基础路径,覆盖 config.set.staticPath(支持 CDN)
134427
+
134098
134428
  sys/ctr/interfaces/IValibotOptions.md
134099
134429
  ---
134100
134430
 
@@ -134106,7 +134436,7 @@ sys/ctr/interfaces/IValibotOptions.md
134106
134436
 
134107
134437
  # Interface: IValibotOptions\<TIssue\>
134108
134438
 
134109
- Defined in: [sys/ctr.ts:53](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L53)
134439
+ Defined in: [sys/ctr.ts:56](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L56)
134110
134440
 
134111
134441
  Valibot 同步校验选项
134112
134442
 
@@ -134122,7 +134452,7 @@ Valibot 同步校验选项
134122
134452
 
134123
134453
  > `optional` **config?**: [`Config`](../../../lib/core/namespaces/v/interfaces/Config.md)\<`TIssue`\>
134124
134454
 
134125
- Defined in: [sys/ctr.ts:55](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L55)
134455
+ Defined in: [sys/ctr.ts:58](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L58)
134126
134456
 
134127
134457
  传给 Valibot 的校验配置
134128
134458
 
@@ -134132,7 +134462,7 @@ Defined in: [sys/ctr.ts:55](https://github.com/maiyunnet/kebab/blob/master/sys/c
134132
134462
 
134133
134463
  > `optional` **response?**: [`TValibotResponse`](../type-aliases/TValibotResponse.md)\<`TIssue`\>
134134
134464
 
134135
- Defined in: [sys/ctr.ts:57](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L57)
134465
+ Defined in: [sys/ctr.ts:60](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L60)
134136
134466
 
134137
134467
  校验失败时返回给客户端的内容,默认使用首个 issue 的消息
134138
134468
 
@@ -134142,7 +134472,7 @@ Defined in: [sys/ctr.ts:57](https://github.com/maiyunnet/kebab/blob/master/sys/c
134142
134472
 
134143
134473
  > `optional` **translate?**: [`TValibotTranslate`](../type-aliases/TValibotTranslate.md)
134144
134474
 
134145
- Defined in: [sys/ctr.ts:59](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L59)
134475
+ Defined in: [sys/ctr.ts:62](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L62)
134146
134476
 
134147
134477
  使用完整 issue 路径翻译消息
134148
134478
 
@@ -134157,7 +134487,7 @@ sys/ctr/interfaces/IValibotXOptions.md
134157
134487
 
134158
134488
  # Interface: IValibotXOptions\<TIssue\>
134159
134489
 
134160
- Defined in: [sys/ctr.ts:69](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L69)
134490
+ Defined in: [sys/ctr.ts:72](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L72)
134161
134491
 
134162
134492
  带 XSRF 检测的 Valibot 同步校验选项
134163
134493
 
@@ -134173,7 +134503,7 @@ Defined in: [sys/ctr.ts:69](https://github.com/maiyunnet/kebab/blob/master/sys/c
134173
134503
 
134174
134504
  > `optional` **config?**: [`Config`](../../../lib/core/namespaces/v/interfaces/Config.md)\<`TIssue`\>
134175
134505
 
134176
- Defined in: [sys/ctr.ts:71](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L71)
134506
+ Defined in: [sys/ctr.ts:74](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L74)
134177
134507
 
134178
134508
  传给 Valibot 的校验配置
134179
134509
 
@@ -134183,7 +134513,7 @@ Defined in: [sys/ctr.ts:71](https://github.com/maiyunnet/kebab/blob/master/sys/c
134183
134513
 
134184
134514
  > `optional` **ignoreXsrf?**: `boolean`
134185
134515
 
134186
- Defined in: [sys/ctr.ts:77](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L77)
134516
+ Defined in: [sys/ctr.ts:80](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L80)
134187
134517
 
134188
134518
  是否忽略 XSRF 检测
134189
134519
 
@@ -134193,7 +134523,7 @@ Defined in: [sys/ctr.ts:77](https://github.com/maiyunnet/kebab/blob/master/sys/c
134193
134523
 
134194
134524
  > `optional` **response?**: [`TValibotResponse`](../type-aliases/TValibotResponse.md)\<[`IValibotXsrfIssue`](IValibotXsrfIssue.md) \| `TIssue`\>
134195
134525
 
134196
- Defined in: [sys/ctr.ts:73](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L73)
134526
+ Defined in: [sys/ctr.ts:76](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L76)
134197
134527
 
134198
134528
  校验失败时返回给客户端的内容,回调同时可能收到 XSRF issue
134199
134529
 
@@ -134203,7 +134533,7 @@ Defined in: [sys/ctr.ts:73](https://github.com/maiyunnet/kebab/blob/master/sys/c
134203
134533
 
134204
134534
  > `optional` **translate?**: [`TValibotTranslate`](../type-aliases/TValibotTranslate.md)
134205
134535
 
134206
- Defined in: [sys/ctr.ts:75](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L75)
134536
+ Defined in: [sys/ctr.ts:78](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L78)
134207
134537
 
134208
134538
  使用完整 issue 路径翻译消息,包括 XSRF issue
134209
134539
 
@@ -134218,7 +134548,7 @@ sys/ctr/interfaces/IValibotXsrfIssue.md
134218
134548
 
134219
134549
  # Interface: IValibotXsrfIssue
134220
134550
 
134221
- Defined in: [sys/ctr.ts:63](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L63)
134551
+ Defined in: [sys/ctr.ts:66](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L66)
134222
134552
 
134223
134553
  XSRF 校验失败的问题描述
134224
134554
 
@@ -134302,7 +134632,7 @@ The sub issues.
134302
134632
 
134303
134633
  > `readonly` **kind**: `"validation"`
134304
134634
 
134305
- Defined in: [sys/ctr.ts:64](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L64)
134635
+ Defined in: [sys/ctr.ts:67](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L67)
134306
134636
 
134307
134637
  The issue kind.
134308
134638
 
@@ -134386,7 +134716,7 @@ The input requirement.
134386
134716
 
134387
134717
  > `readonly` **type**: `"xsrf"`
134388
134718
 
134389
- Defined in: [sys/ctr.ts:65](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L65)
134719
+ Defined in: [sys/ctr.ts:68](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L68)
134390
134720
 
134391
134721
  The issue type.
134392
134722
 
@@ -134394,6 +134724,23 @@ The issue type.
134394
134724
 
134395
134725
  [`BaseIssue`](../../../lib/core/namespaces/v/interfaces/BaseIssue.md).[`type`](../../../lib/core/namespaces/v/interfaces/BaseIssue.md#type)
134396
134726
 
134727
+ sys/ctr/type-aliases/TRedirectHttpCode.md
134728
+ ---
134729
+
134730
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
134731
+
134732
+ ***
134733
+
134734
+ [Documents for @maiyunnet/kebab](../../../index.md) / [sys/ctr](../index.md) / TRedirectHttpCode
134735
+
134736
+ # Type Alias: TRedirectHttpCode
134737
+
134738
+ > **TRedirectHttpCode** = `301` \| `302` \| `303` \| `307` \| `308`
134739
+
134740
+ Defined in: [sys/ctr.ts:53](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L53)
134741
+
134742
+ HTTP 重定向状态码
134743
+
134397
134744
  sys/ctr/type-aliases/TValibotResponse.md
134398
134745
  ---
134399
134746
 
@@ -134430,7 +134777,7 @@ sys/ctr/type-aliases/TValibotResult.md
134430
134777
 
134431
134778
  > **TValibotResult**\<`TSchema`, `TIssue`\> = \{ `issues`: `undefined`; `output`: [`InferOutput`](../../../lib/core/namespaces/v/type-aliases/InferOutput.md)\<`TSchema`\>; `response`: `undefined`; `success`: `true`; `typed`: `true`; \} \| \{ `issues`: \[`TIssue`, `...TIssue[]`\]; `output`: `undefined`; `response`: [`Json`](../../../index/type-aliases/Json.md)[]; `success`: `false`; `typed`: `boolean`; \}
134432
134779
 
134433
- Defined in: [sys/ctr.ts:81](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L81)
134780
+ Defined in: [sys/ctr.ts:84](https://github.com/maiyunnet/kebab/blob/master/sys/ctr.ts#L84)
134434
134781
 
134435
134782
  Valibot 校验结果:仅成功分支提供 schema 推导后的 output
134436
134783
 
@@ -134486,7 +134833,7 @@ sys/mod/classes/default.md
134486
134833
 
134487
134834
  # Class: default
134488
134835
 
134489
- Defined in: [sys/mod.ts:66](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L66)
134836
+ Defined in: [sys/mod.ts:74](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L74)
134490
134837
 
134491
134838
  开启软更需要在表添加字段:ALTER TABLE `table_name` ADD `time_remove` bigint NOT NULL DEFAULT '0' AFTER `xxx`;
134492
134839
 
@@ -134496,7 +134843,7 @@ Defined in: [sys/mod.ts:66](https://github.com/maiyunnet/kebab/blob/master/sys/m
134496
134843
 
134497
134844
  > **new default**(`opt`): `Mod`
134498
134845
 
134499
- Defined in: [sys/mod.ts:120](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L120)
134846
+ Defined in: [sys/mod.ts:128](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L128)
134500
134847
 
134501
134848
  构造函数
134502
134849
 
@@ -134570,7 +134917,7 @@ MySQL 表前缀或 PostgreSQL Schema 名,优先级:选项 > 类属性 > 配
134570
134917
 
134571
134918
  > `protected` **\_contain**: \{ `key`: `string`; `list`: `string`[]; \} \| `null` = `null`
134572
134919
 
134573
- Defined in: [sys/mod.ts:96](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L96)
134920
+ Defined in: [sys/mod.ts:104](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L104)
134574
134921
 
134575
134922
  必须追加的数据筛选 key 与 values,仅单表模式有效
134576
134923
 
@@ -134580,7 +134927,7 @@ Defined in: [sys/mod.ts:96](https://github.com/maiyunnet/kebab/blob/master/sys/m
134580
134927
 
134581
134928
  > `protected` `optional` **\_ctr?**: [`Ctr`](../../ctr/classes/Ctr.md) = `undefined`
134582
134929
 
134583
- Defined in: [sys/mod.ts:111](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L111)
134930
+ Defined in: [sys/mod.ts:119](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L119)
134584
134931
 
134585
134932
  ctr 对象
134586
134933
 
@@ -134590,7 +134937,7 @@ ctr 对象
134590
134937
 
134591
134938
  > `protected` **\_data**: `Record`\<`string`, `any`\> = `{}`
134592
134939
 
134593
- Defined in: [sys/mod.ts:90](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L90)
134940
+ Defined in: [sys/mod.ts:98](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L98)
134594
134941
 
134595
134942
  模型获取的属性
134596
134943
 
@@ -134600,7 +134947,7 @@ Defined in: [sys/mod.ts:90](https://github.com/maiyunnet/kebab/blob/master/sys/m
134600
134947
 
134601
134948
  > `protected` **\_db**: [`Transaction`](../../../lib/db/tran/classes/Transaction.md) \| [`Pool`](../../../lib/db/pool/classes/Pool.md)
134602
134949
 
134603
- Defined in: [sys/mod.ts:105](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L105)
134950
+ Defined in: [sys/mod.ts:113](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L113)
134604
134951
 
134605
134952
  数据库连接对象
134606
134953
 
@@ -134610,7 +134957,7 @@ Defined in: [sys/mod.ts:105](https://github.com/maiyunnet/kebab/blob/master/sys/
134610
134957
 
134611
134958
  > `protected` **\_fieldPrefix**: `string` = `''`
134612
134959
 
134613
- Defined in: [sys/mod.ts:114](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L114)
134960
+ Defined in: [sys/mod.ts:122](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L122)
134614
134961
 
134615
134962
  主表筛选前缀,优先 alias,其次表名
134616
134963
 
@@ -134620,7 +134967,7 @@ Defined in: [sys/mod.ts:114](https://github.com/maiyunnet/kebab/blob/master/sys/
134620
134967
 
134621
134968
  > `protected` **\_index**: `string`[] \| `null` = `null`
134622
134969
 
134623
- Defined in: [sys/mod.ts:93](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L93)
134970
+ Defined in: [sys/mod.ts:101](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L101)
134624
134971
 
134625
134972
  当前选择的分表 _ 后缀,多个代表联查
134626
134973
 
@@ -134630,7 +134977,7 @@ Defined in: [sys/mod.ts:93](https://github.com/maiyunnet/kebab/blob/master/sys/m
134630
134977
 
134631
134978
  > `protected` **\_jsonUpdates**: `Record`\<`string`, `boolean`\> = `{}`
134632
134979
 
134633
- Defined in: [sys/mod.ts:87](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L87)
134980
+ Defined in: [sys/mod.ts:95](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L95)
134634
134981
 
134635
134982
  要在数据库边界序列化的 JSON 字段
134636
134983
 
@@ -134640,7 +134987,7 @@ Defined in: [sys/mod.ts:87](https://github.com/maiyunnet/kebab/blob/master/sys/m
134640
134987
 
134641
134988
  > `protected` **\_sql**: [`Sql`](../../../lib/sql/classes/Sql.md)
134642
134989
 
134643
- Defined in: [sys/mod.ts:108](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L108)
134990
+ Defined in: [sys/mod.ts:116](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L116)
134644
134991
 
134645
134992
  Sql 对象
134646
134993
 
@@ -134650,7 +134997,7 @@ Sql 对象
134650
134997
 
134651
134998
  > `protected` **\_total**: `number`[] = `[]`
134652
134999
 
134653
- Defined in: [sys/mod.ts:102](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L102)
135000
+ Defined in: [sys/mod.ts:110](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L110)
134654
135001
 
134655
135002
  已算出的 total
134656
135003
 
@@ -134660,7 +135007,7 @@ Defined in: [sys/mod.ts:102](https://github.com/maiyunnet/kebab/blob/master/sys/
134660
135007
 
134661
135008
  > `protected` **\_updates**: `Record`\<`string`, `boolean`\> = `{}`
134662
135009
 
134663
- Defined in: [sys/mod.ts:84](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L84)
135010
+ Defined in: [sys/mod.ts:92](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L92)
134664
135011
 
134665
135012
  要 update 的内容
134666
135013
 
@@ -134670,7 +135017,7 @@ Defined in: [sys/mod.ts:84](https://github.com/maiyunnet/kebab/blob/master/sys/m
134670
135017
 
134671
135018
  > `protected` `static` **\_$index**: `string` = `''`
134672
135019
 
134673
- Defined in: [sys/mod.ts:78](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L78)
135020
+ Defined in: [sys/mod.ts:86](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L86)
134674
135021
 
134675
135022
  若使用 _$key 并且有多个 unique 索引,这里指定 _$key 的索引名
134676
135023
 
@@ -134680,7 +135027,7 @@ Defined in: [sys/mod.ts:78](https://github.com/maiyunnet/kebab/blob/master/sys/m
134680
135027
 
134681
135028
  > `protected` `static` **\_$key**: `string` = `''`
134682
135029
 
134683
- Defined in: [sys/mod.ts:75](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L75)
135030
+ Defined in: [sys/mod.ts:83](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L83)
134684
135031
 
134685
135032
  设置后将由 _keyGenerator 函数生成唯一字段
134686
135033
 
@@ -134690,7 +135037,7 @@ Defined in: [sys/mod.ts:75](https://github.com/maiyunnet/kebab/blob/master/sys/m
134690
135037
 
134691
135038
  > `protected` `static` `optional` **\_$pre?**: `string`
134692
135039
 
134693
- Defined in: [sys/mod.ts:81](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L81)
135040
+ Defined in: [sys/mod.ts:89](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L89)
134694
135041
 
134695
135042
  前缀,MySQL 时为表前缀(如 prefix_),PostgreSQL 时为 Schema 名。顺序:选项前缀 -> 本前缀 -> 配置文件前缀
134696
135043
 
@@ -134700,7 +135047,7 @@ Defined in: [sys/mod.ts:81](https://github.com/maiyunnet/kebab/blob/master/sys/m
134700
135047
 
134701
135048
  > `protected` `static` **\_$primary**: `string` = `'id'`
134702
135049
 
134703
- Defined in: [sys/mod.ts:72](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L72)
135050
+ Defined in: [sys/mod.ts:80](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L80)
134704
135051
 
134705
135052
  主键字段名
134706
135053
 
@@ -134710,7 +135057,7 @@ Defined in: [sys/mod.ts:72](https://github.com/maiyunnet/kebab/blob/master/sys/m
134710
135057
 
134711
135058
  > `protected` `static` **\_$table**: `string` = `''`
134712
135059
 
134713
- Defined in: [sys/mod.ts:69](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L69)
135060
+ Defined in: [sys/mod.ts:77](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L77)
134714
135061
 
134715
135062
  表名
134716
135063
 
@@ -134720,7 +135067,7 @@ Defined in: [sys/mod.ts:69](https://github.com/maiyunnet/kebab/blob/master/sys/m
134720
135067
 
134721
135068
  > `protected` **\_keyGenerator**(): `string`
134722
135069
 
134723
- Defined in: [sys/mod.ts:1888](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1888)
135070
+ Defined in: [sys/mod.ts:1987](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1987)
134724
135071
 
134725
135072
  当 _key 不为空时,则依据继承此方法的方法自动生成填充 key
134726
135073
 
@@ -134744,7 +135091,7 @@ Defined in: [sys/mod.ts:1888](https://github.com/maiyunnet/kebab/blob/master/sys
134744
135091
 
134745
135092
  > **all**(): `Promise`\<`false` \| [`Rows`](Rows.md)\<`Mod`\>\>
134746
135093
 
134747
- Defined in: [sys/mod.ts:1202](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1202)
135094
+ Defined in: [sys/mod.ts:1210](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1210)
134748
135095
 
134749
135096
  ##### Returns
134750
135097
 
@@ -134754,7 +135101,7 @@ Defined in: [sys/mod.ts:1202](https://github.com/maiyunnet/kebab/blob/master/sys
134754
135101
 
134755
135102
  > **all**(`key`): `Promise`\<`false` \| `Record`\<`string`, `Mod`\>\>
134756
135103
 
134757
- Defined in: [sys/mod.ts:1203](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1203)
135104
+ Defined in: [sys/mod.ts:1211](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1211)
134758
135105
 
134759
135106
  ##### Parameters
134760
135107
 
@@ -134782,7 +135129,7 @@ Defined in: [sys/mod.ts:1203](https://github.com/maiyunnet/kebab/blob/master/sys
134782
135129
 
134783
135130
  > **allArray**(): `Promise`\<`false` \| `Record`\<`string`, `any`\>[]\>
134784
135131
 
134785
- Defined in: [sys/mod.ts:1381](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1381)
135132
+ Defined in: [sys/mod.ts:1389](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1389)
134786
135133
 
134787
135134
  ##### Returns
134788
135135
 
@@ -134792,7 +135139,7 @@ Defined in: [sys/mod.ts:1381](https://github.com/maiyunnet/kebab/blob/master/sys
134792
135139
 
134793
135140
  > **allArray**(`key`): `Promise`\<`false` \| `Record`\<`string`, `Record`\<`string`, `any`\>\>\>
134794
135141
 
134795
- Defined in: [sys/mod.ts:1382](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1382)
135142
+ Defined in: [sys/mod.ts:1390](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1390)
134796
135143
 
134797
135144
  ##### Parameters
134798
135145
 
@@ -134806,11 +135153,76 @@ Defined in: [sys/mod.ts:1382](https://github.com/maiyunnet/kebab/blob/master/sys
134806
135153
 
134807
135154
  ***
134808
135155
 
135156
+ ### allCursor()
135157
+
135158
+ > **allCursor**\<`T`\>(`count`, `opt`): `Promise`\<`false` \| [`ICursorPage`](../interfaces/ICursorPage.md)\<`T`\>\>
135159
+
135160
+ Defined in: [sys/mod.ts:1638](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1638)
135161
+
135162
+ 读取一批游标数据,多取一条判断后续记录,不使用 OFFSET,不修改原查询
135163
+ 排序字段必须全部非空、同向,且组合唯一;SELECT 中须包含对应字段(同名或指定 keys)
135164
+
135165
+ #### Type Parameters
135166
+
135167
+ ##### T
135168
+
135169
+ `T` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
135170
+
135171
+ #### Parameters
135172
+
135173
+ ##### count
135174
+
135175
+ `number`
135176
+
135177
+ 本批数量
135178
+
135179
+ ##### opt
135180
+
135181
+ 排序、边界和方向;before 为 true 时读取前一批并恢复展示顺序
135182
+
135183
+ ###### before?
135184
+
135185
+ `boolean`
135186
+
135187
+ 是否读取边界前一批,须提供 cursor
135188
+
135189
+ ###### by
135190
+
135191
+ `string` \| `string`[]
135192
+
135193
+ 排序字段,支持表别名
135194
+
135195
+ ###### cursor?
135196
+
135197
+ [`TCursorValue`](../../../lib/sql/type-aliases/TCursorValue.md)[]
135198
+
135199
+ 边界行的字段值,首批省略
135200
+
135201
+ ###### keys?
135202
+
135203
+ `string`[]
135204
+
135205
+ SELECT 结果中对应的字段名,默认去掉 by 的表别名
135206
+
135207
+ ###### order?
135208
+
135209
+ `"DESC"` \| `"ASC"`
135210
+
135211
+ 展示顺序,默认 DESC
135212
+
135213
+ #### Returns
135214
+
135215
+ `Promise`\<`false` \| [`ICursorPage`](../interfaces/ICursorPage.md)\<`T`\>\>
135216
+
135217
+ 列表、首末行游标和扫描方向上的 hasMore,数据库错误返回 false
135218
+
135219
+ ***
135220
+
134809
135221
  ### append()
134810
135222
 
134811
135223
  > **append**(`sql`): `this`
134812
135224
 
134813
- Defined in: [sys/mod.ts:1797](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1797)
135225
+ Defined in: [sys/mod.ts:1896](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1896)
134814
135226
 
134815
135227
  在 sql 最后追加字符串
134816
135228
 
@@ -134830,7 +135242,7 @@ Defined in: [sys/mod.ts:1797](https://github.com/maiyunnet/kebab/blob/master/sys
134830
135242
 
134831
135243
  > **by**(`c`, `d?`): `this`
134832
135244
 
134833
- Defined in: [sys/mod.ts:1753](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1753)
135245
+ Defined in: [sys/mod.ts:1852](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1852)
134834
135246
 
134835
135247
  ORDER BY
134836
135248
 
@@ -134858,7 +135270,7 @@ ORDER BY
134858
135270
 
134859
135271
  > **contain**(`contain`): `this`
134860
135272
 
134861
- Defined in: [sys/mod.ts:1806](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1806)
135273
+ Defined in: [sys/mod.ts:1905](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1905)
134862
135274
 
134863
135275
  设置闭包含数据
134864
135276
 
@@ -134886,7 +135298,7 @@ Defined in: [sys/mod.ts:1806](https://github.com/maiyunnet/kebab/blob/master/sys
134886
135298
 
134887
135299
  > **count**(): `Promise`\<`number`\>
134888
135300
 
134889
- Defined in: [sys/mod.ts:1589](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1589)
135301
+ Defined in: [sys/mod.ts:1688](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1688)
134890
135302
 
134891
135303
  根据当前条件,筛选出当前条目该有的数据条数
134892
135304
 
@@ -134900,7 +135312,7 @@ Defined in: [sys/mod.ts:1589](https://github.com/maiyunnet/kebab/blob/master/sys
134900
135312
 
134901
135313
  > **countSql**(): `string`
134902
135314
 
134903
- Defined in: [sys/mod.ts:1610](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1610)
135315
+ Defined in: [sys/mod.ts:1709](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1709)
134904
135316
 
134905
135317
  获取当前条件下的 count 的 SQL 语句
134906
135318
 
@@ -134914,7 +135326,7 @@ Defined in: [sys/mod.ts:1610](https://github.com/maiyunnet/kebab/blob/master/sys
134914
135326
 
134915
135327
  > **create**(): `Promise`\<`boolean` \| `null`\>
134916
135328
 
134917
- Defined in: [sys/mod.ts:881](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L881)
135329
+ Defined in: [sys/mod.ts:889](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L889)
134918
135330
 
134919
135331
  创建数据
134920
135332
 
@@ -134930,7 +135342,7 @@ true-成功,false-报错,null-唯一键非 _$key 键冲突
134930
135342
 
134931
135343
  > **crossJoin**(`f`, `s`, `index?`, `pre?`): `this`
134932
135344
 
134933
- Defined in: [sys/mod.ts:1685](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1685)
135345
+ Defined in: [sys/mod.ts:1784](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1784)
134934
135346
 
134935
135347
  cross join 方法
134936
135348
 
@@ -134980,7 +135392,7 @@ ON 信息
134980
135392
 
134981
135393
  > **explain**(`all?`): `Promise`\<`string` \| `false`\>
134982
135394
 
134983
- Defined in: [sys/mod.ts:1507](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1507)
135395
+ Defined in: [sys/mod.ts:1515](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1515)
134984
135396
 
134985
135397
  ##### Parameters
134986
135398
 
@@ -134996,7 +135408,7 @@ Defined in: [sys/mod.ts:1507](https://github.com/maiyunnet/kebab/blob/master/sys
134996
135408
 
134997
135409
  > **explain**(`all`): `Promise`\<`false` \| `Record`\<`string`, `any`\>\>
134998
135410
 
134999
- Defined in: [sys/mod.ts:1508](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1508)
135411
+ Defined in: [sys/mod.ts:1516](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1516)
135000
135412
 
135001
135413
  ##### Parameters
135002
135414
 
@@ -135014,7 +135426,7 @@ Defined in: [sys/mod.ts:1508](https://github.com/maiyunnet/kebab/blob/master/sys
135014
135426
 
135015
135427
  > **filter**(`s`): `this`
135016
135428
 
135017
- Defined in: [sys/mod.ts:1731](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1731)
135429
+ Defined in: [sys/mod.ts:1830](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1830)
135018
135430
 
135019
135431
  筛选器
135020
135432
 
@@ -135052,7 +135464,7 @@ Defined in: [sys/mod.ts:1731](https://github.com/maiyunnet/kebab/blob/master/sys
135052
135464
 
135053
135465
  > **first**(`lock`, `array`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
135054
135466
 
135055
- Defined in: [sys/mod.ts:1091](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1091)
135467
+ Defined in: [sys/mod.ts:1099](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1099)
135056
135468
 
135057
135469
  ##### Parameters
135058
135470
 
@@ -135072,7 +135484,7 @@ Defined in: [sys/mod.ts:1091](https://github.com/maiyunnet/kebab/blob/master/sys
135072
135484
 
135073
135485
  > **first**(`lock?`, `array?`): `Promise`\<`false` \| `Mod` & `Record`\<`string`, `any`\> \| `null`\>
135074
135486
 
135075
- Defined in: [sys/mod.ts:1095](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1095)
135487
+ Defined in: [sys/mod.ts:1103](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1103)
135076
135488
 
135077
135489
  ##### Parameters
135078
135490
 
@@ -135094,7 +135506,7 @@ Defined in: [sys/mod.ts:1095](https://github.com/maiyunnet/kebab/blob/master/sys
135094
135506
 
135095
135507
  > **firstArray**(`lock?`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
135096
135508
 
135097
- Defined in: [sys/mod.ts:1135](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1135)
135509
+ Defined in: [sys/mod.ts:1143](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1143)
135098
135510
 
135099
135511
  获取数据库第一个原生对象
135100
135512
 
@@ -135116,7 +135528,7 @@ Defined in: [sys/mod.ts:1135](https://github.com/maiyunnet/kebab/blob/master/sys
135116
135528
 
135117
135529
  > **format**(`sql?`, `data?`): `string`
135118
135530
 
135119
- Defined in: [sys/mod.ts:1833](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1833)
135531
+ Defined in: [sys/mod.ts:1932](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1932)
135120
135532
 
135121
135533
  获取带 data 的 sql 语句
135122
135534
 
@@ -135144,7 +135556,7 @@ sql 语句
135144
135556
 
135145
135557
  > **fullJoin**(`f`, `s`, `index?`, `pre?`): `this`
135146
135558
 
135147
- Defined in: [sys/mod.ts:1673](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1673)
135559
+ Defined in: [sys/mod.ts:1772](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1772)
135148
135560
 
135149
135561
  full join 方法
135150
135562
 
@@ -135184,7 +135596,7 @@ ON 信息
135184
135596
 
135185
135597
  > **get**(`n`): `any`
135186
135598
 
135187
- Defined in: [sys/mod.ts:873](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L873)
135599
+ Defined in: [sys/mod.ts:881](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L881)
135188
135600
 
135189
135601
  获取一个字段值
135190
135602
 
@@ -135206,7 +135618,7 @@ Defined in: [sys/mod.ts:873](https://github.com/maiyunnet/kebab/blob/master/sys/
135206
135618
 
135207
135619
  > **getData**(): `any`[]
135208
135620
 
135209
- Defined in: [sys/mod.ts:1824](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1824)
135621
+ Defined in: [sys/mod.ts:1923](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1923)
135210
135622
 
135211
135623
  获取全部 data
135212
135624
 
@@ -135220,7 +135632,7 @@ Defined in: [sys/mod.ts:1824](https://github.com/maiyunnet/kebab/blob/master/sys
135220
135632
 
135221
135633
  > **getSql**(): `string`
135222
135634
 
135223
- Defined in: [sys/mod.ts:1817](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1817)
135635
+ Defined in: [sys/mod.ts:1916](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1916)
135224
135636
 
135225
135637
  获取 sql 语句
135226
135638
 
@@ -135234,7 +135646,7 @@ Defined in: [sys/mod.ts:1817](https://github.com/maiyunnet/kebab/blob/master/sys
135234
135646
 
135235
135647
  > **group**(`c`): `this`
135236
135648
 
135237
- Defined in: [sys/mod.ts:1762](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1762)
135649
+ Defined in: [sys/mod.ts:1861](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1861)
135238
135650
 
135239
135651
  GROUP BY
135240
135652
 
@@ -135256,7 +135668,7 @@ GROUP BY
135256
135668
 
135257
135669
  > **having**(`s`): `this`
135258
135670
 
135259
- Defined in: [sys/mod.ts:1722](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1722)
135671
+ Defined in: [sys/mod.ts:1821](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1821)
135260
135672
 
135261
135673
  筛选器
135262
135674
 
@@ -135278,7 +135690,7 @@ Defined in: [sys/mod.ts:1722](https://github.com/maiyunnet/kebab/blob/master/sys
135278
135690
 
135279
135691
  > **hint**(`h`): `this`
135280
135692
 
135281
- Defined in: [sys/mod.ts:1713](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1713)
135693
+ Defined in: [sys/mod.ts:1812](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1812)
135282
135694
 
135283
135695
  设置 MySQL 优化器 Hint
135284
135696
  内容会以 Optimizer Hint 注释语法注入到 SELECT 关键字后
@@ -135323,7 +135735,7 @@ Hint 内容
135323
135735
 
135324
135736
  > **innerJoin**(`f`, `s`, `index?`, `pre?`): `this`
135325
135737
 
135326
- Defined in: [sys/mod.ts:1661](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1661)
135738
+ Defined in: [sys/mod.ts:1760](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1760)
135327
135739
 
135328
135740
  inner join 方法
135329
135741
 
@@ -135363,7 +135775,7 @@ ON 信息
135363
135775
 
135364
135776
  > **join**(`f`, `s?`, `type?`, `index?`, `pre?`): `this`
135365
135777
 
135366
- Defined in: [sys/mod.ts:1625](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1625)
135778
+ Defined in: [sys/mod.ts:1724](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1724)
135367
135779
 
135368
135780
  #### Parameters
135369
135781
 
@@ -135407,7 +135819,7 @@ ON 信息
135407
135819
 
135408
135820
  > **langText**(`col`, `lang`): `string`
135409
135821
 
135410
- Defined in: [sys/mod.ts:1868](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1868)
135822
+ Defined in: [sys/mod.ts:1967](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1967)
135411
135823
 
135412
135824
  获取字段的可用语种文本
135413
135825
 
@@ -135435,7 +135847,7 @@ Defined in: [sys/mod.ts:1868](https://github.com/maiyunnet/kebab/blob/master/sys
135435
135847
 
135436
135848
  > **leftJoin**(`f`, `s`, `index?`, `pre?`): `this`
135437
135849
 
135438
- Defined in: [sys/mod.ts:1637](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1637)
135850
+ Defined in: [sys/mod.ts:1736](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1736)
135439
135851
 
135440
135852
  left join 方法
135441
135853
 
@@ -135475,7 +135887,7 @@ ON 信息
135475
135887
 
135476
135888
  > **limit**(`a`, `b?`): `this`
135477
135889
 
135478
- Defined in: [sys/mod.ts:1775](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1775)
135890
+ Defined in: [sys/mod.ts:1874](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1874)
135479
135891
 
135480
135892
  LIMIT
135481
135893
 
@@ -135503,7 +135915,7 @@ LIMIT
135503
135915
 
135504
135916
  > **page**(`count`, `page?`): `this`
135505
135917
 
135506
- Defined in: [sys/mod.ts:1786](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1786)
135918
+ Defined in: [sys/mod.ts:1885](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1885)
135507
135919
 
135508
135920
  分页
135509
135921
 
@@ -135531,7 +135943,7 @@ Defined in: [sys/mod.ts:1786](https://github.com/maiyunnet/kebab/blob/master/sys
135531
135943
 
135532
135944
  > **refresh**(`lock?`): `Promise`\<`boolean` \| `null`\>
135533
135945
 
135534
- Defined in: [sys/mod.ts:1003](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1003)
135946
+ Defined in: [sys/mod.ts:1011](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1011)
135535
135947
 
135536
135948
  刷新当前模型获取最新数据
135537
135949
 
@@ -135553,7 +135965,7 @@ Defined in: [sys/mod.ts:1003](https://github.com/maiyunnet/kebab/blob/master/sys
135553
135965
 
135554
135966
  > **remove**(): `Promise`\<`boolean`\>
135555
135967
 
135556
- Defined in: [sys/mod.ts:1069](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1069)
135968
+ Defined in: [sys/mod.ts:1077](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1077)
135557
135969
 
135558
135970
  移除本条目
135559
135971
 
@@ -135567,7 +135979,7 @@ Defined in: [sys/mod.ts:1069](https://github.com/maiyunnet/kebab/blob/master/sys
135567
135979
 
135568
135980
  > **rightJoin**(`f`, `s`, `index?`, `pre?`): `this`
135569
135981
 
135570
- Defined in: [sys/mod.ts:1649](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1649)
135982
+ Defined in: [sys/mod.ts:1748](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1748)
135571
135983
 
135572
135984
  right join 方法
135573
135985
 
@@ -135607,7 +136019,7 @@ ON 信息
135607
136019
 
135608
136020
  > **save**(`where?`): `Promise`\<`boolean`\>
135609
136021
 
135610
- Defined in: [sys/mod.ts:1035](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1035)
136022
+ Defined in: [sys/mod.ts:1043](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1043)
135611
136023
 
135612
136024
  更新 set 的数据到数据库,有未保存数据时才保存
135613
136025
 
@@ -135645,7 +136057,7 @@ Defined in: [sys/mod.ts:1035](https://github.com/maiyunnet/kebab/blob/master/sys
135645
136057
 
135646
136058
  > **set**\<`T`, `TK`\>(`n`): `void`
135647
136059
 
135648
- Defined in: [sys/mod.ts:838](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L838)
136060
+ Defined in: [sys/mod.ts:846](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L846)
135649
136061
 
135650
136062
  ##### Type Parameters
135651
136063
 
@@ -135671,7 +136083,7 @@ Defined in: [sys/mod.ts:838](https://github.com/maiyunnet/kebab/blob/master/sys/
135671
136083
 
135672
136084
  > **set**\<`T`, `TK`\>(`n`, `v`): `void`
135673
136085
 
135674
- Defined in: [sys/mod.ts:839](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L839)
136086
+ Defined in: [sys/mod.ts:847](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L847)
135675
136087
 
135676
136088
  ##### Type Parameters
135677
136089
 
@@ -135703,7 +136115,7 @@ Defined in: [sys/mod.ts:839](https://github.com/maiyunnet/kebab/blob/master/sys/
135703
136115
 
135704
136116
  > **toArray**\<`TC`\>(): [`TOnlyProperties`](../type-aliases/TOnlyProperties.md)\<`InstanceType`\<`TC`\>\> & `Record`\<`string`, `any`\>
135705
136117
 
135706
- Defined in: [sys/mod.ts:1840](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1840)
136118
+ Defined in: [sys/mod.ts:1939](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1939)
135707
136119
 
135708
136120
  获取值对象,获取的是新创建的数组
135709
136121
 
@@ -135723,7 +136135,7 @@ Defined in: [sys/mod.ts:1840](https://github.com/maiyunnet/kebab/blob/master/sys
135723
136135
 
135724
136136
  > **total**(`f?`): `Promise`\<`number`\>
135725
136137
 
135726
- Defined in: [sys/mod.ts:1565](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1565)
136138
+ Defined in: [sys/mod.ts:1573](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1573)
135727
136139
 
135728
136140
  获取总条数,自动抛弃 LIMIT,仅用于获取数据的情况(select)
135729
136141
 
@@ -135739,11 +136151,28 @@ Defined in: [sys/mod.ts:1565](https://github.com/maiyunnet/kebab/blob/master/sys
135739
136151
 
135740
136152
  ***
135741
136153
 
136154
+ ### totalEstimate()
136155
+
136156
+ > **totalEstimate**(): `Promise`\<`number` \| `false`\>
136157
+
136158
+ Defined in: [sys/mod.ts:1599](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1599)
136159
+
136160
+ 从 PostgreSQL 执行计划估算查询总行数,移除外层排序和分页,不执行数据扫描
136161
+ 请在应用游标条件前调用;非 PostgreSQL、框架分表联查或查询失败返回 false,绝不回退到 COUNT
136162
+
136163
+ #### Returns
136164
+
136165
+ `Promise`\<`number` \| `false`\>
136166
+
136167
+ 近似行数或 false;估算可能偏差很大,不能用于判断有无下一批
136168
+
136169
+ ***
136170
+
135742
136171
  ### union()
135743
136172
 
135744
136173
  > **union**(`f`, `type?`): `this`
135745
136174
 
135746
- Defined in: [sys/mod.ts:1146](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1146)
136175
+ Defined in: [sys/mod.ts:1154](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1154)
135747
136176
 
135748
136177
  联合查询表数据
135749
136178
 
@@ -135771,7 +136200,7 @@ Defined in: [sys/mod.ts:1146](https://github.com/maiyunnet/kebab/blob/master/sys
135771
136200
 
135772
136201
  > **unionAll**(`f`): `this`
135773
136202
 
135774
- Defined in: [sys/mod.ts:1176](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1176)
136203
+ Defined in: [sys/mod.ts:1184](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1184)
135775
136204
 
135776
136205
  所有联合查询表数据
135777
136206
 
@@ -135793,7 +136222,7 @@ Defined in: [sys/mod.ts:1176](https://github.com/maiyunnet/kebab/blob/master/sys
135793
136222
 
135794
136223
  > **unsaved**(): `boolean`
135795
136224
 
135796
- Defined in: [sys/mod.ts:1859](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1859)
136225
+ Defined in: [sys/mod.ts:1958](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1958)
135797
136226
 
135798
136227
  当前是否设置了未保存 --=
135799
136228
 
@@ -135807,7 +136236,7 @@ Defined in: [sys/mod.ts:1859](https://github.com/maiyunnet/kebab/blob/master/sys
135807
136236
 
135808
136237
  > **updates**(): `Record`\<`string`, `any`\>
135809
136238
 
135810
- Defined in: [sys/mod.ts:1848](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1848)
136239
+ Defined in: [sys/mod.ts:1947](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1947)
135811
136240
 
135812
136241
  获取当前设置要提交的数据
135813
136242
 
@@ -135821,7 +136250,7 @@ Defined in: [sys/mod.ts:1848](https://github.com/maiyunnet/kebab/blob/master/sys
135821
136250
 
135822
136251
  > **upsert**(`conflict`): `Promise`\<`boolean`\>
135823
136252
 
135824
- Defined in: [sys/mod.ts:972](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L972)
136253
+ Defined in: [sys/mod.ts:980](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L980)
135825
136254
 
135826
136255
  插入数据,如果存在则更新(UPSERT)
135827
136256
 
@@ -135843,7 +136272,7 @@ Defined in: [sys/mod.ts:972](https://github.com/maiyunnet/kebab/blob/master/sys/
135843
136272
 
135844
136273
  > **where**(`s`): `this`
135845
136274
 
135846
- Defined in: [sys/mod.ts:1742](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1742)
136275
+ Defined in: [sys/mod.ts:1841](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1841)
135847
136276
 
135848
136277
  是 filter 的别名
135849
136278
 
@@ -135865,7 +136294,7 @@ Defined in: [sys/mod.ts:1742](https://github.com/maiyunnet/kebab/blob/master/sys
135865
136294
 
135866
136295
  > `static` **column**(`field`): `object`
135867
136296
 
135868
- Defined in: [sys/mod.ts:185](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L185)
136297
+ Defined in: [sys/mod.ts:193](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L193)
135869
136298
 
135870
136299
  创建字段对象
135871
136300
 
@@ -135897,7 +136326,7 @@ Defined in: [sys/mod.ts:185](https://github.com/maiyunnet/kebab/blob/master/sys/
135897
136326
 
135898
136327
  > `static` **find**\<`T`\>(`db`, `val`, `opt?`): `Promise`\<`false` \| `T` & `Record`\<`string`, `any`\> \| `null`\>
135899
136328
 
135900
- Defined in: [sys/mod.ts:634](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L634)
136329
+ Defined in: [sys/mod.ts:642](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L642)
135901
136330
 
135902
136331
  根据主键(或 key 字段)获取对象
135903
136332
 
@@ -135961,7 +136390,7 @@ Defined in: [sys/mod.ts:634](https://github.com/maiyunnet/kebab/blob/master/sys/
135961
136390
 
135962
136391
  > `static` **getCreate**\<`T`\>(`db`, `opt?`): `T`
135963
136392
 
135964
- Defined in: [sys/mod.ts:616](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L616)
136393
+ Defined in: [sys/mod.ts:624](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L624)
135965
136394
 
135966
136395
  获取创建对象,通常用于新建数据库条目
135967
136396
 
@@ -136005,7 +136434,7 @@ Defined in: [sys/mod.ts:616](https://github.com/maiyunnet/kebab/blob/master/sys/
136005
136434
 
136006
136435
  > `static` **insert**(`db`, `cs`, `vs?`, `opt?`): `Promise`\<`boolean` \| `null`\>
136007
136436
 
136008
- Defined in: [sys/mod.ts:214](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L214)
136437
+ Defined in: [sys/mod.ts:222](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L222)
136009
136438
 
136010
136439
  添加一个序列(允许超过 65536 的占位符会被拆分多次执行)
136011
136440
 
@@ -136059,7 +136488,7 @@ Defined in: [sys/mod.ts:214](https://github.com/maiyunnet/kebab/blob/master/sys/
136059
136488
 
136060
136489
  > `static` **insertSql**(`db`, `cs`, `vs?`, `opt?`): `string`
136061
136490
 
136062
- Defined in: [sys/mod.ts:274](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L274)
136491
+ Defined in: [sys/mod.ts:282](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L282)
136063
136492
 
136064
136493
  获取添加一个序列的模拟 SQL
136065
136494
 
@@ -136113,7 +136542,7 @@ Defined in: [sys/mod.ts:274](https://github.com/maiyunnet/kebab/blob/master/sys/
136113
136542
 
136114
136543
  > `static` **json**\<`T`\>(`obj`): `T`
136115
136544
 
136116
- Defined in: [sys/mod.ts:203](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L203)
136545
+ Defined in: [sys/mod.ts:211](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L211)
136117
136546
 
136118
136547
  标记 JSON 字段;模型内保持原始对象,写入数据库时再序列化
136119
136548
 
@@ -136161,7 +136590,7 @@ Defined in: [sys/mod.ts:203](https://github.com/maiyunnet/kebab/blob/master/sys/
136161
136590
 
136162
136591
  > `static` **one**(`db`, `s`, `opt`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
136163
136592
 
136164
- Defined in: [sys/mod.ts:663](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L663)
136593
+ Defined in: [sys/mod.ts:671](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L671)
136165
136594
 
136166
136595
  ##### Parameters
136167
136596
 
@@ -136215,7 +136644,7 @@ Defined in: [sys/mod.ts:663](https://github.com/maiyunnet/kebab/blob/master/sys/
136215
136644
 
136216
136645
  > `static` **one**\<`T`\>(`db`, `s`, `opt?`): `Promise`\<`false` \| `T` & `Record`\<`string`, `any`\> \| `null`\>
136217
136646
 
136218
- Defined in: [sys/mod.ts:677](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L677)
136647
+ Defined in: [sys/mod.ts:685](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L685)
136219
136648
 
136220
136649
  ##### Type Parameters
136221
136650
 
@@ -136277,7 +136706,7 @@ Defined in: [sys/mod.ts:677](https://github.com/maiyunnet/kebab/blob/master/sys/
136277
136706
 
136278
136707
  > `static` **oneArray**(`db`, `s`, `opt?`): `Promise`\<`false` \| `Record`\<`string`, `any`\> \| `null`\>
136279
136708
 
136280
- Defined in: [sys/mod.ts:758](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L758)
136709
+ Defined in: [sys/mod.ts:766](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L766)
136281
136710
 
136282
136711
  通过 where 条件筛选单条数据返回原生对象
136283
136712
 
@@ -136333,7 +136762,7 @@ Defined in: [sys/mod.ts:758](https://github.com/maiyunnet/kebab/blob/master/sys/
136333
136762
 
136334
136763
  > `static` **primarys**(`db`, `where?`, `opt?`): `Promise`\<`false` \| `any`[]\>
136335
136764
 
136336
- Defined in: [sys/mod.ts:780](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L780)
136765
+ Defined in: [sys/mod.ts:788](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L788)
136337
136766
 
136338
136767
  根据 where 条件获取主键值列表
136339
136768
 
@@ -136377,7 +136806,7 @@ where 条件
136377
136806
 
136378
136807
  > `static` **removeByWhere**(`db`, `where`, `opt?`): `Promise`\<`number` \| `false` \| `null`\>
136379
136808
 
136380
- Defined in: [sys/mod.ts:300](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L300)
136809
+ Defined in: [sys/mod.ts:308](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L308)
136381
136810
 
136382
136811
  根据条件移除条目
136383
136812
 
@@ -136429,7 +136858,7 @@ Defined in: [sys/mod.ts:300](https://github.com/maiyunnet/kebab/blob/master/sys/
136429
136858
 
136430
136859
  > `static` **removeByWhereSql**(`db`, `where`, `opt?`): [`Sql`](../../../lib/sql/classes/Sql.md)
136431
136860
 
136432
- Defined in: [sys/mod.ts:344](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L344)
136861
+ Defined in: [sys/mod.ts:352](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L352)
136433
136862
 
136434
136863
  根据条件移除条目(仅获取 SQL 对象)
136435
136864
 
@@ -136481,7 +136910,7 @@ Defined in: [sys/mod.ts:344](https://github.com/maiyunnet/kebab/blob/master/sys/
136481
136910
 
136482
136911
  > `static` **select**\<`T`\>(`db`, `c`, `opt?`): `T` & `Record`\<`string`, `any`\>
136483
136912
 
136484
- Defined in: [sys/mod.ts:553](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L553)
136913
+ Defined in: [sys/mod.ts:561](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L561)
136485
136914
 
136486
136915
  select 自定字段
136487
136916
 
@@ -136551,7 +136980,7 @@ select 自定字段
136551
136980
 
136552
136981
  > `static` **toArrayByRecord**\<`T`\>(`obj`): `Record`\<`string`, `Record`\<`string`, `any`\>\>
136553
136982
 
136554
- Defined in: [sys/mod.ts:807](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L807)
136983
+ Defined in: [sys/mod.ts:815](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L815)
136555
136984
 
136556
136985
  将 key val 组成的数据列表转换为原生对象模式,获取的是新创建的数组
136557
136986
 
@@ -136579,7 +137008,7 @@ Defined in: [sys/mod.ts:807](https://github.com/maiyunnet/kebab/blob/master/sys/
136579
137008
 
136580
137009
  > `static` **updateByWhere**(`db`, `data`, `where`, `opt?`): `Promise`\<`number` \| `false` \| `null`\>
136581
137010
 
136582
- Defined in: [sys/mod.ts:377](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L377)
137011
+ Defined in: [sys/mod.ts:385](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L385)
136583
137012
 
136584
137013
  根据条件更新数据
136585
137014
 
@@ -136637,7 +137066,7 @@ Defined in: [sys/mod.ts:377](https://github.com/maiyunnet/kebab/blob/master/sys/
136637
137066
 
136638
137067
  > `static` **updateByWhereSql**(`db`, `data`, `where`, `opt?`): [`Sql`](../../../lib/sql/classes/Sql.md)
136639
137068
 
136640
- Defined in: [sys/mod.ts:423](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L423)
137069
+ Defined in: [sys/mod.ts:431](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L431)
136641
137070
 
136642
137071
  根据条件更新数据(仅获取 SQL 对象)
136643
137072
 
@@ -136695,7 +137124,7 @@ Defined in: [sys/mod.ts:423](https://github.com/maiyunnet/kebab/blob/master/sys/
136695
137124
 
136696
137125
  > `static` **updateList**(`db`, `data`, `key`, `opt?`): `Promise`\<`boolean` \| `null`\>
136697
137126
 
136698
- Defined in: [sys/mod.ts:461](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L461)
137127
+ Defined in: [sys/mod.ts:469](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L469)
136699
137128
 
136700
137129
  批量更新数据
136701
137130
 
@@ -136753,7 +137182,7 @@ Defined in: [sys/mod.ts:461](https://github.com/maiyunnet/kebab/blob/master/sys/
136753
137182
 
136754
137183
  > `static` **value**(`val`): `object`
136755
137184
 
136756
- Defined in: [sys/mod.ts:194](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L194)
137185
+ Defined in: [sys/mod.ts:202](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L202)
136757
137186
 
136758
137187
  创建字面量值对象,用于 where 条件中 v[0] 需要是值而非字段名的场景
136759
137188
 
@@ -136785,7 +137214,7 @@ Defined in: [sys/mod.ts:194](https://github.com/maiyunnet/kebab/blob/master/sys/
136785
137214
 
136786
137215
  > `static` **where**\<`T`\>(`db`, `s?`, `opt?`): `T` & `Record`\<`string`, `any`\>
136787
137216
 
136788
- Defined in: [sys/mod.ts:585](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L585)
137217
+ Defined in: [sys/mod.ts:593](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L593)
136789
137218
 
136790
137219
  通过 where 条件获取模型
136791
137220
 
@@ -136860,7 +137289,7 @@ sys/mod/classes/Rows.md
136860
137289
 
136861
137290
  # Class: Rows\<T\>
136862
137291
 
136863
- Defined in: [sys/mod.ts:20](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L20)
137292
+ Defined in: [sys/mod.ts:28](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L28)
136864
137293
 
136865
137294
  条数列表
136866
137295
 
@@ -136880,7 +137309,7 @@ Defined in: [sys/mod.ts:20](https://github.com/maiyunnet/kebab/blob/master/sys/m
136880
137309
 
136881
137310
  > **new Rows**\<`T`\>(`initialItems?`): `Rows`\<`T`\>
136882
137311
 
136883
- Defined in: [sys/mod.ts:24](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L24)
137312
+ Defined in: [sys/mod.ts:32](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L32)
136884
137313
 
136885
137314
  #### Parameters
136886
137315
 
@@ -136900,7 +137329,7 @@ Defined in: [sys/mod.ts:24](https://github.com/maiyunnet/kebab/blob/master/sys/m
136900
137329
 
136901
137330
  > **get** **length**(): `number`
136902
137331
 
136903
- Defined in: [sys/mod.ts:29](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L29)
137332
+ Defined in: [sys/mod.ts:37](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L37)
136904
137333
 
136905
137334
  总行数
136906
137335
 
@@ -136918,7 +137347,7 @@ Defined in: [sys/mod.ts:29](https://github.com/maiyunnet/kebab/blob/master/sys/m
136918
137347
 
136919
137348
  > **\[iterator\]**(): `IterableIterator`\<`T`\>
136920
137349
 
136921
- Defined in: [sys/mod.ts:58](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L58)
137350
+ Defined in: [sys/mod.ts:66](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L66)
136922
137351
 
136923
137352
  for of
136924
137353
 
@@ -136936,7 +137365,7 @@ for of
136936
137365
 
136937
137366
  > **filter**(`predicate`): `Rows`\<`T`\>
136938
137367
 
136939
- Defined in: [sys/mod.ts:44](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L44)
137368
+ Defined in: [sys/mod.ts:52](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L52)
136940
137369
 
136941
137370
  根据规则筛掉项,predicate 返回 true 代表保留
136942
137371
 
@@ -136956,7 +137385,7 @@ Defined in: [sys/mod.ts:44](https://github.com/maiyunnet/kebab/blob/master/sys/m
136956
137385
 
136957
137386
  > **item**(`index`): `T`
136958
137387
 
136959
- Defined in: [sys/mod.ts:34](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L34)
137388
+ Defined in: [sys/mod.ts:42](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L42)
136960
137389
 
136961
137390
  通过索引获取一个对象
136962
137391
 
@@ -136980,7 +137409,7 @@ Defined in: [sys/mod.ts:34](https://github.com/maiyunnet/kebab/blob/master/sys/m
136980
137409
 
136981
137410
  > **map**\<`TU`\>(`callbackfn`): `TU`[]
136982
137411
 
136983
- Defined in: [sys/mod.ts:49](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L49)
137412
+ Defined in: [sys/mod.ts:57](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L57)
136984
137413
 
136985
137414
  重塑对象内容为数组
136986
137415
 
@@ -137006,7 +137435,7 @@ Defined in: [sys/mod.ts:49](https://github.com/maiyunnet/kebab/blob/master/sys/m
137006
137435
 
137007
137436
  > **toArray**(): `Record`\<`string`, `any`\>[]
137008
137437
 
137009
- Defined in: [sys/mod.ts:39](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L39)
137438
+ Defined in: [sys/mod.ts:47](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L47)
137010
137439
 
137011
137440
  转换为数组对象,获取的是新创建的数组
137012
137441
 
@@ -137036,6 +137465,7 @@ sys/mod/index.md
137036
137465
 
137037
137466
  ## Interfaces
137038
137467
 
137468
+ - [ICursorPage](interfaces/ICursorPage.md)
137039
137469
  - [IModUnionItem](interfaces/IModUnionItem.md)
137040
137470
  - [IRows](interfaces/IRows.md)
137041
137471
 
@@ -137043,6 +137473,59 @@ sys/mod/index.md
137043
137473
 
137044
137474
  - [TOnlyProperties](type-aliases/TOnlyProperties.md)
137045
137475
 
137476
+ sys/mod/interfaces/ICursorPage.md
137477
+ ---
137478
+
137479
+ [**Documents for @maiyunnet/kebab**](../../../index.md)
137480
+
137481
+ ***
137482
+
137483
+ [Documents for @maiyunnet/kebab](../../../index.md) / [sys/mod](../index.md) / ICursorPage
137484
+
137485
+ # Interface: ICursorPage\<T\>
137486
+
137487
+ Defined in: [sys/mod.ts:20](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L20)
137488
+
137489
+ 一批游标查询结果,hasMore 表示扫描方向上还有记录
137490
+
137491
+ ## Type Parameters
137492
+
137493
+ ### T
137494
+
137495
+ `T` *extends* `Record`\<`string`, `unknown`\> = `Record`\<`string`, `unknown`\>
137496
+
137497
+ ## Properties
137498
+
137499
+ ### hasMore
137500
+
137501
+ > **hasMore**: `boolean`
137502
+
137503
+ Defined in: [sys/mod.ts:22](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L22)
137504
+
137505
+ ***
137506
+
137507
+ ### list
137508
+
137509
+ > **list**: `T`[]
137510
+
137511
+ Defined in: [sys/mod.ts:21](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L21)
137512
+
137513
+ ***
137514
+
137515
+ ### next
137516
+
137517
+ > **next**: [`TCursorValue`](../../../lib/sql/type-aliases/TCursorValue.md)[] \| `null`
137518
+
137519
+ Defined in: [sys/mod.ts:23](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L23)
137520
+
137521
+ ***
137522
+
137523
+ ### previous
137524
+
137525
+ > **previous**: [`TCursorValue`](../../../lib/sql/type-aliases/TCursorValue.md)[] \| `null`
137526
+
137527
+ Defined in: [sys/mod.ts:24](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L24)
137528
+
137046
137529
  sys/mod/interfaces/IModUnionItem.md
137047
137530
  ---
137048
137531
 
@@ -137054,7 +137537,7 @@ sys/mod/interfaces/IModUnionItem.md
137054
137537
 
137055
137538
  # Interface: IModUnionItem
137056
137539
 
137057
- Defined in: [sys/mod.ts:1902](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1902)
137540
+ Defined in: [sys/mod.ts:2001](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2001)
137058
137541
 
137059
137542
  ## Properties
137060
137543
 
@@ -137062,7 +137545,7 @@ Defined in: [sys/mod.ts:1902](https://github.com/maiyunnet/kebab/blob/master/sys
137062
137545
 
137063
137546
  > **field**: `string`
137064
137547
 
137065
- Defined in: [sys/mod.ts:1903](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1903)
137548
+ Defined in: [sys/mod.ts:2002](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2002)
137066
137549
 
137067
137550
  ***
137068
137551
 
@@ -137070,7 +137553,7 @@ Defined in: [sys/mod.ts:1903](https://github.com/maiyunnet/kebab/blob/master/sys
137070
137553
 
137071
137554
  > `optional` **where?**: `any`
137072
137555
 
137073
- Defined in: [sys/mod.ts:1904](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1904)
137556
+ Defined in: [sys/mod.ts:2003](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L2003)
137074
137557
 
137075
137558
  sys/mod/interfaces/IRows.md
137076
137559
  ---
@@ -137083,7 +137566,7 @@ sys/mod/interfaces/IRows.md
137083
137566
 
137084
137567
  # Interface: IRows\<T\>
137085
137568
 
137086
- Defined in: [sys/mod.ts:1896](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1896)
137569
+ Defined in: [sys/mod.ts:1995](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1995)
137087
137570
 
137088
137571
  ## Extends
137089
137572
 
@@ -137101,7 +137584,7 @@ Defined in: [sys/mod.ts:1896](https://github.com/maiyunnet/kebab/blob/master/sys
137101
137584
 
137102
137585
  > `readonly` **length**: `number`
137103
137586
 
137104
- Defined in: [sys/mod.ts:1897](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1897)
137587
+ Defined in: [sys/mod.ts:1996](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1996)
137105
137588
 
137106
137589
  ## Methods
137107
137590
 
@@ -137109,7 +137592,7 @@ Defined in: [sys/mod.ts:1897](https://github.com/maiyunnet/kebab/blob/master/sys
137109
137592
 
137110
137593
  > **item**(`index`): `T`
137111
137594
 
137112
- Defined in: [sys/mod.ts:1898](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1898)
137595
+ Defined in: [sys/mod.ts:1997](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1997)
137113
137596
 
137114
137597
  #### Parameters
137115
137598
 
@@ -137127,7 +137610,7 @@ Defined in: [sys/mod.ts:1898](https://github.com/maiyunnet/kebab/blob/master/sys
137127
137610
 
137128
137611
  > **toArray**(): `Record`\<`string`, `any`\>[]
137129
137612
 
137130
- Defined in: [sys/mod.ts:1899](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1899)
137613
+ Defined in: [sys/mod.ts:1998](https://github.com/maiyunnet/kebab/blob/master/sys/mod.ts#L1998)
137131
137614
 
137132
137615
  #### Returns
137133
137616
 
@@ -137190,7 +137673,7 @@ sys/route/functions/getFormData.md
137190
137673
 
137191
137674
  > **getFormData**(`req`, `events?`, `limits?`): `Promise`\<`false` \| \{ `files`: `Record`\<`string`, [`IPostFile`](../../../index/interfaces/IPostFile.md) \| [`IPostFile`](../../../index/interfaces/IPostFile.md)[]\>; `post`: `Record`\<`string`, [`Json`](../../../index/type-aliases/Json.md)\>; \}\>
137192
137675
 
137193
- Defined in: [sys/route.ts:1037](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1037)
137676
+ Defined in: [sys/route.ts:1039](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L1039)
137194
137677
 
137195
137678
  获取 formdata 的 post
137196
137679
 
@@ -137287,7 +137770,7 @@ sys/route/functions/getPost.md
137287
137770
 
137288
137771
  > **getPost**(`req`): `Promise`\<`false` \| \{ `input`: `string`; `post`: `Record`\<`string`, `any`\>; `raw`: `Record`\<`string`, `any`\>; \}\>
137289
137772
 
137290
- Defined in: [sys/route.ts:912](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L912)
137773
+ Defined in: [sys/route.ts:914](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L914)
137291
137774
 
137292
137775
  获取 post 对象(通常已自动获取),如果是文件上传(formdata)的情况则不获取
137293
137776
 
@@ -137405,7 +137888,7 @@ sys/route/functions/unlinkUploadFiles.md
137405
137888
 
137406
137889
  > **unlinkUploadFiles**(`cctr`): `Promise`\<`void`\>
137407
137890
 
137408
- Defined in: [sys/route.ts:870](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L870)
137891
+ Defined in: [sys/route.ts:872](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L872)
137409
137892
 
137410
137893
  删除本次请求所有已上传的临时文件
137411
137894
 
@@ -137434,7 +137917,7 @@ sys/route/functions/waitCtr.md
137434
137917
 
137435
137918
  > **waitCtr**(`cctr`): `Promise`\<`void`\>
137436
137919
 
137437
- Defined in: [sys/route.ts:890](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L890)
137920
+ Defined in: [sys/route.ts:892](https://github.com/maiyunnet/kebab/blob/master/sys/route.ts#L892)
137438
137921
 
137439
137922
  等待异步任务结束,并删除临时文件,如果结束后还有事务没关闭,则会在本函数中打印控制台并且写入 log 文件
137440
137923
  此时其实已经给客户端返回了,此处等待不消耗客户端的等待时间