@aiao/rxdb-test 0.0.9 → 0.0.11

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.
@@ -0,0 +1,23 @@
1
+ export {};
2
+ /**
3
+ * Cross-framework test fixtures for findByCursor / useInfiniteScroll
4
+ *
5
+ * These JSON fixtures define parameterized test data that all three frameworks
6
+ * (Angular, React, Vue) import in their respective test files to verify
7
+ * behavioral consistency.
8
+ *
9
+ * Usage in test files:
10
+ * ```ts
11
+ * import limitZero from '@aiao/rxdb-test/cross-framework-fixtures/find-by-cursor-limit-zero.json';
12
+ * // or via direct relative path
13
+ * ```
14
+ *
15
+ * Fixture files:
16
+ * - find-by-cursor-limit-zero.json — limit=0 edge case
17
+ * - find-by-cursor-limit-one.json — limit=1 single item
18
+ * - find-by-cursor-empty-dataset.json — no data
19
+ * - find-by-cursor-exact-division.json — data count is exact multiple of limit
20
+ * - find-by-cursor-reactive-option-change.json — options change stability
21
+ * - find-by-cursor-unsubscribe-no-leak.json — cleanup / no leak contract
22
+ */
23
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cross-framework-fixtures/index.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;GAoBG"}
@@ -1129,15 +1129,15 @@ export declare class Todo extends EntityBase implements IEntity {
1129
1129
  export declare class MenuSimple extends TreeAdjacencyListEntityBase implements ITreeEntity {
1130
1130
  static [ENTITY_STATIC_TYPES]: MenuSimpleStaticTypes;
1131
1131
  /**
1132
- * children
1132
+ * 子节点
1133
1133
  */
1134
1134
  readonly children$: RelationEntitiesObservable<MenuSimple>;
1135
1135
  /**
1136
- * parent
1136
+ * 父节点
1137
1137
  */
1138
1138
  readonly parent$: RelationEntityObservable<typeof MenuSimple>;
1139
1139
  /**
1140
- * parent id
1140
+ * 父节点 id
1141
1141
  */
1142
1142
  parentId?: UUID | null;
1143
1143
  /**
@@ -1260,19 +1260,19 @@ MenuSimple.findDescendants({ entityId: root.id, level: 1 }).subscribe(children =
1260
1260
  export declare class MenuLarge extends TreeAdjacencyListEntityBase implements ITreeEntity {
1261
1261
  static [ENTITY_STATIC_TYPES]: MenuLargeStaticTypes;
1262
1262
  /**
1263
- * children
1263
+ * 子节点
1264
1264
  */
1265
1265
  readonly children$: RelationEntitiesObservable<MenuLarge>;
1266
1266
  /**
1267
- * hasChildren
1267
+ * 是否有子节点
1268
1268
  */
1269
1269
  readonly hasChildren?: boolean | null;
1270
1270
  /**
1271
- * parent
1271
+ * 父节点
1272
1272
  */
1273
1273
  readonly parent$: RelationEntityObservable<typeof MenuLarge>;
1274
1274
  /**
1275
- * parent id
1275
+ * 父节点 id
1276
1276
  */
1277
1277
  parentId?: UUID | null;
1278
1278
  /**
@@ -1395,11 +1395,11 @@ MenuLarge.findDescendants({ entityId: root.id, level: 1 }).subscribe(children =>
1395
1395
  export declare class FileNode extends TreeAdjacencyListEntityBase implements ITreeEntity {
1396
1396
  static [ENTITY_STATIC_TYPES]: FileNodeStaticTypes;
1397
1397
  /**
1398
- * children
1398
+ * 子节点
1399
1399
  */
1400
1400
  readonly children$: RelationEntitiesObservable<FileNode>;
1401
1401
  /**
1402
- * parent
1402
+ * 父节点
1403
1403
  */
1404
1404
  readonly parent$: RelationEntityObservable<typeof FileNode>;
1405
1405
  /**
@@ -1411,7 +1411,7 @@ export declare class FileNode extends TreeAdjacencyListEntityBase implements ITr
1411
1411
  */
1412
1412
  name: string;
1413
1413
  /**
1414
- * parent id
1414
+ * 父节点 id
1415
1415
  */
1416
1416
  parentId?: UUID | null;
1417
1417
  /**
@@ -1538,15 +1538,15 @@ FileNode.findDescendants({ entityId: root.id, level: 1 }).subscribe(children =>
1538
1538
  export declare class FileLarge extends TreeAdjacencyListEntityBase implements ITreeEntity {
1539
1539
  static [ENTITY_STATIC_TYPES]: FileLargeStaticTypes;
1540
1540
  /**
1541
- * children
1541
+ * 子节点
1542
1542
  */
1543
1543
  readonly children$: RelationEntitiesObservable<FileLarge>;
1544
1544
  /**
1545
- * hasChildren
1545
+ * 是否有子节点
1546
1546
  */
1547
1547
  readonly hasChildren?: boolean | null;
1548
1548
  /**
1549
- * parent
1549
+ * 父节点
1550
1550
  */
1551
1551
  readonly parent$: RelationEntityObservable<typeof FileLarge>;
1552
1552
  /**
@@ -1558,7 +1558,7 @@ export declare class FileLarge extends TreeAdjacencyListEntityBase implements IT
1558
1558
  */
1559
1559
  name: string;
1560
1560
  /**
1561
- * parent id
1561
+ * 父节点 id
1562
1562
  */
1563
1563
  parentId?: UUID | null;
1564
1564
  /**
@@ -4,37 +4,46 @@ TypeDemo = __decorateClass(
4
4
  [
5
5
  Entity({
6
6
  name: "TypeDemo",
7
+ tableName: "type_demo",
7
8
  properties: [
8
9
  {
9
10
  name: "string",
10
- type: PropertyType.string
11
+ type: PropertyType.string,
12
+ columnName: "string"
11
13
  },
12
14
  {
13
15
  name: "number",
14
- type: PropertyType.number
16
+ type: PropertyType.number,
17
+ columnName: "number"
15
18
  },
16
19
  {
17
20
  name: "integer",
18
- type: PropertyType.integer
21
+ type: PropertyType.integer,
22
+ columnName: "integer"
19
23
  },
20
24
  {
21
25
  name: "boolean",
22
- type: PropertyType.boolean
26
+ type: PropertyType.boolean,
27
+ columnName: "boolean"
23
28
  },
24
29
  {
25
30
  name: "date",
26
- type: PropertyType.date
31
+ type: PropertyType.date,
32
+ columnName: "date"
27
33
  },
28
34
  {
29
35
  name: "stringArray",
36
+ columnName: "string_array",
30
37
  type: PropertyType.stringArray
31
38
  },
32
39
  {
33
40
  name: "numberArray",
41
+ columnName: "number_array",
34
42
  type: PropertyType.numberArray
35
43
  },
36
44
  {
37
45
  name: "keyValue",
46
+ columnName: "key_value",
38
47
  type: PropertyType.keyValue,
39
48
  properties: [
40
49
  {
@@ -61,7 +70,8 @@ TypeDemo = __decorateClass(
61
70
  },
62
71
  {
63
72
  name: "json",
64
- type: PropertyType.json
73
+ type: PropertyType.json,
74
+ columnName: "json"
65
75
  }
66
76
  ],
67
77
  repository: "Repository",
@@ -82,15 +92,18 @@ Todo = __decorateClass(
82
92
  [
83
93
  Entity({
84
94
  name: "Todo",
95
+ tableName: "todos",
85
96
  properties: [
86
97
  {
87
98
  name: "title",
88
- type: PropertyType.string
99
+ type: PropertyType.string,
100
+ columnName: "title"
89
101
  },
90
102
  {
91
103
  name: "completed",
92
104
  type: PropertyType.boolean,
93
- default: false
105
+ default: false,
106
+ columnName: "completed"
94
107
  }
95
108
  ],
96
109
  repository: "Repository",
@@ -111,13 +124,16 @@ MenuSimple = __decorateClass(
111
124
  [
112
125
  Entity({
113
126
  name: "MenuSimple",
127
+ tableName: "menu_simple",
114
128
  properties: [
115
129
  {
116
130
  name: "title",
117
- type: PropertyType.string
131
+ type: PropertyType.string,
132
+ columnName: "title"
118
133
  },
119
134
  {
120
135
  name: "sortOrder",
136
+ columnName: "sort_order",
121
137
  type: PropertyType.string,
122
138
  nullable: true
123
139
  }
@@ -147,13 +163,16 @@ MenuLarge = __decorateClass(
147
163
  [
148
164
  Entity({
149
165
  name: "MenuLarge",
166
+ tableName: "menu_large",
150
167
  properties: [
151
168
  {
152
169
  name: "title",
153
- type: PropertyType.string
170
+ type: PropertyType.string,
171
+ columnName: "title"
154
172
  },
155
173
  {
156
174
  name: "sortOrder",
175
+ columnName: "sort_order",
157
176
  type: PropertyType.string,
158
177
  nullable: true
159
178
  }
@@ -183,31 +202,37 @@ FileNode = __decorateClass(
183
202
  [
184
203
  Entity({
185
204
  name: "FileNode",
205
+ tableName: "file_node",
186
206
  properties: [
187
207
  {
188
208
  name: "name",
189
209
  type: PropertyType.string,
190
- nullable: false
210
+ nullable: false,
211
+ columnName: "name"
191
212
  },
192
213
  {
193
214
  name: "type",
194
215
  type: PropertyType.string,
195
- nullable: false
216
+ nullable: false,
217
+ columnName: "type"
196
218
  },
197
219
  {
198
220
  name: "sortOrder",
221
+ columnName: "sort_order",
199
222
  type: PropertyType.string,
200
223
  nullable: true
201
224
  },
202
225
  {
203
226
  name: "extension",
204
227
  type: PropertyType.string,
205
- nullable: true
228
+ nullable: true,
229
+ columnName: "extension"
206
230
  },
207
231
  {
208
232
  name: "size",
209
233
  type: PropertyType.number,
210
- nullable: true
234
+ nullable: true,
235
+ columnName: "size"
211
236
  }
212
237
  ],
213
238
  features: {
@@ -252,31 +277,37 @@ FileLarge = __decorateClass(
252
277
  [
253
278
  Entity({
254
279
  name: "FileLarge",
280
+ tableName: "file_large",
255
281
  properties: [
256
282
  {
257
283
  name: "name",
258
284
  type: PropertyType.string,
259
- nullable: false
285
+ nullable: false,
286
+ columnName: "name"
260
287
  },
261
288
  {
262
289
  name: "type",
263
290
  type: PropertyType.string,
264
- nullable: false
291
+ nullable: false,
292
+ columnName: "type"
265
293
  },
266
294
  {
267
295
  name: "sortOrder",
296
+ columnName: "sort_order",
268
297
  type: PropertyType.string,
269
298
  nullable: true
270
299
  },
271
300
  {
272
301
  name: "extension",
273
302
  type: PropertyType.string,
274
- nullable: true
303
+ nullable: true,
304
+ columnName: "extension"
275
305
  },
276
306
  {
277
307
  name: "size",
278
308
  type: PropertyType.number,
279
- nullable: true
309
+ nullable: true,
310
+ columnName: "size"
280
311
  }
281
312
  ],
282
313
  features: {
@@ -1568,15 +1568,15 @@ declare module "@aiao/rxdb" {
1568
1568
  */
1569
1569
  User: typeof User;
1570
1570
  /**
1571
- * SKUAttributes
1571
+ * SKU属性关联
1572
1572
  */
1573
1573
  SKUAttributes: typeof SKUAttributes;
1574
1574
  /**
1575
- * SKU
1575
+ * 库存单元
1576
1576
  */
1577
1577
  SKU: typeof SKU;
1578
1578
  /**
1579
- * Product
1579
+ * 产品
1580
1580
  */
1581
1581
  Product: typeof Product;
1582
1582
  /**
@@ -1596,11 +1596,11 @@ declare module "@aiao/rxdb" {
1596
1596
  */
1597
1597
  Category: typeof Category;
1598
1598
  /**
1599
- * AttributeValue
1599
+ * 属性值
1600
1600
  */
1601
1601
  AttributeValue: typeof AttributeValue;
1602
1602
  /**
1603
- * Attribute
1603
+ * 属性
1604
1604
  */
1605
1605
  Attribute: typeof Attribute;
1606
1606
  }
@@ -1754,15 +1754,15 @@ export interface SKUStaticTypes {
1754
1754
  */
1755
1755
  export interface SKUInitData {
1756
1756
  /**
1757
- * code
1757
+ * SKU编码
1758
1758
  */
1759
1759
  code?: string;
1760
1760
  /**
1761
- * price
1761
+ * 价格
1762
1762
  */
1763
1763
  price?: number;
1764
1764
  /**
1765
- * stock
1765
+ * 库存
1766
1766
  */
1767
1767
  stock?: number;
1768
1768
  }
@@ -1810,11 +1810,11 @@ export interface ProductStaticTypes {
1810
1810
  */
1811
1811
  export interface ProductInitData {
1812
1812
  /**
1813
- * name
1813
+ * 产品名称
1814
1814
  */
1815
1815
  name?: string;
1816
1816
  /**
1817
- * description
1817
+ * 产品描述
1818
1818
  */
1819
1819
  description?: string | null;
1820
1820
  }
@@ -2066,7 +2066,7 @@ export interface AttributeValueStaticTypes {
2066
2066
  */
2067
2067
  export interface AttributeValueInitData {
2068
2068
  /**
2069
- * name
2069
+ * 属性值名称
2070
2070
  */
2071
2071
  name?: string;
2072
2072
  }
@@ -2114,7 +2114,7 @@ export interface AttributeStaticTypes {
2114
2114
  */
2115
2115
  export interface AttributeInitData {
2116
2116
  /**
2117
- * name
2117
+ * 属性名称
2118
2118
  */
2119
2119
  name?: string;
2120
2120
  }
@@ -2125,11 +2125,11 @@ export interface AttributeInitData {
2125
2125
  export declare class User extends EntityBase implements IEntity {
2126
2126
  static [ENTITY_STATIC_TYPES]: UserStaticTypes;
2127
2127
  /**
2128
- * idCard
2128
+ * 身份证
2129
2129
  */
2130
2130
  readonly idCard$: RelationEntityObservable<typeof IdCard>;
2131
2131
  /**
2132
- * orders
2132
+ * 订单
2133
2133
  */
2134
2134
  readonly orders$: RelationEntitiesObservable<Order>;
2135
2135
  /**
@@ -2142,7 +2142,7 @@ export declare class User extends EntityBase implements IEntity {
2142
2142
  */
2143
2143
  gender?: string | null;
2144
2144
  /**
2145
- * idCard id
2145
+ * 身份证 id
2146
2146
  */
2147
2147
  idCardId?: UUID | null;
2148
2148
  /**
@@ -2222,32 +2222,32 @@ export declare class User extends EntityBase implements IEntity {
2222
2222
  }
2223
2223
 
2224
2224
  /**
2225
- * SKUAttributes
2225
+ * SKU属性关联
2226
2226
  */
2227
2227
  export declare class SKUAttributes extends EntityBase implements IEntity {
2228
2228
  static [ENTITY_STATIC_TYPES]: SKUAttributesStaticTypes;
2229
2229
  /**
2230
- * attribute
2230
+ * 属性
2231
2231
  */
2232
2232
  readonly attribute$: RelationEntityObservable<typeof Attribute>;
2233
2233
  /**
2234
- * sku
2234
+ * SKU
2235
2235
  */
2236
2236
  readonly sku$: RelationEntityObservable<typeof SKU>;
2237
2237
  /**
2238
- * value
2238
+ * 属性值
2239
2239
  */
2240
2240
  readonly value$: RelationEntityObservable<typeof AttributeValue>;
2241
2241
  /**
2242
- * attribute id
2242
+ * 属性 id
2243
2243
  */
2244
2244
  attributeId: UUID;
2245
2245
  /**
2246
- * sku id
2246
+ * SKU id
2247
2247
  */
2248
2248
  skuId: UUID;
2249
2249
  /**
2250
- * value id
2250
+ * 属性值 id
2251
2251
  */
2252
2252
  valueId: UUID;
2253
2253
  /**
@@ -2319,32 +2319,32 @@ export declare class SKUAttributes extends EntityBase implements IEntity {
2319
2319
  }
2320
2320
 
2321
2321
  /**
2322
- * SKU
2322
+ * 库存单元
2323
2323
  */
2324
2324
  export declare class SKU extends EntityBase implements IEntity {
2325
2325
  static [ENTITY_STATIC_TYPES]: SKUStaticTypes;
2326
2326
  /**
2327
- * attributes
2327
+ * 属性列表
2328
2328
  */
2329
2329
  readonly attributes$: RelationEntitiesObservable<SKUAttributes>;
2330
2330
  /**
2331
- * product
2331
+ * 所属产品
2332
2332
  */
2333
2333
  readonly product$: RelationEntityObservable<typeof Product>;
2334
2334
  /**
2335
- * code
2335
+ * SKU编码
2336
2336
  */
2337
2337
  code: string;
2338
2338
  /**
2339
- * price
2339
+ * 价格
2340
2340
  */
2341
2341
  price: number;
2342
2342
  /**
2343
- * product id
2343
+ * 所属产品 id
2344
2344
  */
2345
2345
  productId: UUID;
2346
2346
  /**
2347
- * stock
2347
+ * 库存
2348
2348
  */
2349
2349
  stock: number;
2350
2350
  /**
@@ -2416,20 +2416,20 @@ export declare class SKU extends EntityBase implements IEntity {
2416
2416
  }
2417
2417
 
2418
2418
  /**
2419
- * Product
2419
+ * 产品
2420
2420
  */
2421
2421
  export declare class Product extends EntityBase implements IEntity {
2422
2422
  static [ENTITY_STATIC_TYPES]: ProductStaticTypes;
2423
2423
  /**
2424
- * skus
2424
+ * SKU列表
2425
2425
  */
2426
2426
  readonly skus$: RelationEntitiesObservable<SKU>;
2427
2427
  /**
2428
- * description
2428
+ * 产品描述
2429
2429
  */
2430
2430
  description?: string | null;
2431
2431
  /**
2432
- * name
2432
+ * 产品名称
2433
2433
  */
2434
2434
  name: string;
2435
2435
  /**
@@ -2506,15 +2506,15 @@ export declare class Product extends EntityBase implements IEntity {
2506
2506
  export declare class OrderItem extends EntityBase implements IEntity {
2507
2507
  static [ENTITY_STATIC_TYPES]: OrderItemStaticTypes;
2508
2508
  /**
2509
- * categories
2509
+ * 分类
2510
2510
  */
2511
2511
  readonly categories$: RelationEntitiesObservable<Category>;
2512
2512
  /**
2513
- * order
2513
+ * 所属订单
2514
2514
  */
2515
2515
  readonly order$: RelationEntityObservable<typeof Order>;
2516
2516
  /**
2517
- * order id
2517
+ * 所属订单 id
2518
2518
  */
2519
2519
  orderId: UUID;
2520
2520
  /**
@@ -2603,11 +2603,11 @@ export declare class OrderItem extends EntityBase implements IEntity {
2603
2603
  export declare class Order extends EntityBase implements IEntity {
2604
2604
  static [ENTITY_STATIC_TYPES]: OrderStaticTypes;
2605
2605
  /**
2606
- * items
2606
+ * 订单项
2607
2607
  */
2608
2608
  readonly items$: RelationEntitiesObservable<OrderItem>;
2609
2609
  /**
2610
- * owner
2610
+ * 所有者
2611
2611
  */
2612
2612
  readonly owner$: RelationEntityObservable<typeof User>;
2613
2613
  /**
@@ -2619,7 +2619,7 @@ export declare class Order extends EntityBase implements IEntity {
2619
2619
  */
2620
2620
  number: string;
2621
2621
  /**
2622
- * owner id
2622
+ * 所有者 id
2623
2623
  */
2624
2624
  ownerId: UUID;
2625
2625
  /**
@@ -2696,7 +2696,7 @@ export declare class Order extends EntityBase implements IEntity {
2696
2696
  export declare class IdCard extends EntityBase implements IEntity {
2697
2697
  static [ENTITY_STATIC_TYPES]: IdCardStaticTypes;
2698
2698
  /**
2699
- * owner
2699
+ * 持有人
2700
2700
  */
2701
2701
  readonly owner$: RelationEntityObservable<typeof User>;
2702
2702
  /**
@@ -2704,7 +2704,7 @@ export declare class IdCard extends EntityBase implements IEntity {
2704
2704
  */
2705
2705
  code: string;
2706
2706
  /**
2707
- * owner id
2707
+ * 持有人 id
2708
2708
  */
2709
2709
  ownerId: UUID;
2710
2710
  /**
@@ -2781,7 +2781,7 @@ export declare class IdCard extends EntityBase implements IEntity {
2781
2781
  export declare class Category extends EntityBase implements IEntity {
2782
2782
  static [ENTITY_STATIC_TYPES]: CategoryStaticTypes;
2783
2783
  /**
2784
- * orderItems
2784
+ * 订单项
2785
2785
  */
2786
2786
  readonly orderItems$: RelationEntitiesObservable<OrderItem>;
2787
2787
  /**
@@ -2857,24 +2857,24 @@ export declare class Category extends EntityBase implements IEntity {
2857
2857
  }
2858
2858
 
2859
2859
  /**
2860
- * AttributeValue
2860
+ * 属性值
2861
2861
  */
2862
2862
  export declare class AttributeValue extends EntityBase implements IEntity {
2863
2863
  static [ENTITY_STATIC_TYPES]: AttributeValueStaticTypes;
2864
2864
  /**
2865
- * attribute
2865
+ * 所属属性
2866
2866
  */
2867
2867
  readonly attribute$: RelationEntityObservable<typeof Attribute>;
2868
2868
  /**
2869
- * skuAttributeValues
2869
+ * SKU属性值关联
2870
2870
  */
2871
2871
  readonly skuAttributeValues$: RelationEntitiesObservable<SKUAttributes>;
2872
2872
  /**
2873
- * attribute id
2873
+ * 所属属性 id
2874
2874
  */
2875
2875
  attributeId: UUID;
2876
2876
  /**
2877
- * name
2877
+ * 属性值名称
2878
2878
  */
2879
2879
  name: string;
2880
2880
  /**
@@ -2946,20 +2946,20 @@ export declare class AttributeValue extends EntityBase implements IEntity {
2946
2946
  }
2947
2947
 
2948
2948
  /**
2949
- * Attribute
2949
+ * 属性
2950
2950
  */
2951
2951
  export declare class Attribute extends EntityBase implements IEntity {
2952
2952
  static [ENTITY_STATIC_TYPES]: AttributeStaticTypes;
2953
2953
  /**
2954
- * skuAttributes
2954
+ * SKU属性关联
2955
2955
  */
2956
2956
  readonly skuAttributes$: RelationEntitiesObservable<SKUAttributes>;
2957
2957
  /**
2958
- * values
2958
+ * 属性值列表
2959
2959
  */
2960
2960
  readonly values$: RelationEntitiesObservable<AttributeValue>;
2961
2961
  /**
2962
- * name
2962
+ * 属性名称
2963
2963
  */
2964
2964
  name: string;
2965
2965
  /**