@aiao/rxdb-test 0.0.5 → 0.0.7
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/dist/entities/index.d.ts +1363 -102
- package/dist/entities/index.js +272 -7
- package/dist/graph/index.d.ts +16 -0
- package/dist/graph/index.js +3 -0
- package/dist/shop/index.d.ts +449 -551
- package/dist/shop/index.js +64 -18
- package/dist/system/index.d.ts +745 -245
- package/dist/system/index.js +180 -30
- package/package.json +7 -3
package/dist/system/index.d.ts
CHANGED
|
@@ -1,6 +1,119 @@
|
|
|
1
|
-
import { BooleanRules, CountOptions, DateRules, ENTITY_STATIC_TYPES, EntityType, FindAllOptions, FindOneOptions, FindOneOrFailOptions, FindOptions, FindTreeOptions,
|
|
1
|
+
import { BooleanRules, CountOptions, DateRules, ENTITY_STATIC_TYPES, EntityType, FindAllOptions, FindByCursorOptions, FindOneOptions, FindOneOrFailOptions, FindOptions, FindTreeOptions, IEntity, ITreeEntity, NumberRules, RelationBooleanRules, RelationDateRules, RelationEntitiesObservable, RelationEntityObservable, RelationExistsRules, RelationNumberRules, RelationStringRules, RelationUUIDRules, RuleGroupBase, StringRules, UUID, UUIDRules } from '@aiao/rxdb';
|
|
2
2
|
import { Observable } from 'rxjs';
|
|
3
3
|
|
|
4
|
+
/**
|
|
5
|
+
* rule
|
|
6
|
+
*/
|
|
7
|
+
declare type RxDBRepositorySyncRule = StringRules<RxDBRepositorySync, 'id'>
|
|
8
|
+
| StringRules<RxDBRepositorySync, 'namespace'>
|
|
9
|
+
| StringRules<RxDBRepositorySync, 'entity'>
|
|
10
|
+
| StringRules<RxDBRepositorySync, 'syncType'>
|
|
11
|
+
| NumberRules<RxDBRepositorySync, 'lastPushedChangeId'>
|
|
12
|
+
| DateRules<RxDBRepositorySync, 'lastPushedAt'>
|
|
13
|
+
| DateRules<RxDBRepositorySync, 'lastPulledAt'>
|
|
14
|
+
| NumberRules<RxDBRepositorySync, 'lastPullRemoteChangeId'>
|
|
15
|
+
| BooleanRules<RxDBRepositorySync, 'enabled'>
|
|
16
|
+
| DateRules<RxDBRepositorySync, 'createdAt'>
|
|
17
|
+
| DateRules<RxDBRepositorySync, 'updatedAt'>
|
|
18
|
+
| StringRules<RxDBRepositorySync, 'branchId'>
|
|
19
|
+
| RelationExistsRules<'branch', RxDBBranchRuleGroup>
|
|
20
|
+
| RelationStringRules<'branch.id', string>
|
|
21
|
+
| RelationBooleanRules<'branch.activated', boolean>
|
|
22
|
+
| RelationNumberRules<'branch.fromChangeId', number | null>
|
|
23
|
+
| RelationBooleanRules<'branch.local', boolean>
|
|
24
|
+
| RelationBooleanRules<'branch.remote', boolean>
|
|
25
|
+
| RelationDateRules<'branch.createdAt', Date | null>
|
|
26
|
+
| RelationDateRules<'branch.updatedAt', Date | null>
|
|
27
|
+
| StringRules<RxDBBranch, 'parentId'>
|
|
28
|
+
| RelationNumberRules<'branch.changes.id', number>
|
|
29
|
+
| RelationNumberRules<'branch.changes.remoteId', number | null>
|
|
30
|
+
| RelationStringRules<'branch.changes.type', string>
|
|
31
|
+
| RelationUUIDRules<'branch.changes.transactionId', UUID | null>
|
|
32
|
+
| RelationStringRules<'branch.changes.namespace', string>
|
|
33
|
+
| RelationStringRules<'branch.changes.entity', string>
|
|
34
|
+
| RelationUUIDRules<'branch.changes.entityId', UUID>
|
|
35
|
+
| RelationDateRules<'branch.changes.createdAt', Date>
|
|
36
|
+
| RelationDateRules<'branch.changes.updatedAt', Date>
|
|
37
|
+
| RelationDateRules<'branch.changes.revertChangedAt', Date | null>
|
|
38
|
+
| RelationNumberRules<'branch.changes.revertChangeId', number | null>
|
|
39
|
+
| RelationDateRules<'branch.changes.redoInvalidatedAt', Date | null>
|
|
40
|
+
| StringRules<RxDBChange, 'branchId'>
|
|
41
|
+
| RelationStringRules<'branch.children.id', string>
|
|
42
|
+
| RelationBooleanRules<'branch.children.activated', boolean>
|
|
43
|
+
| RelationNumberRules<'branch.children.fromChangeId', number | null>
|
|
44
|
+
| RelationBooleanRules<'branch.children.local', boolean>
|
|
45
|
+
| RelationBooleanRules<'branch.children.remote', boolean>
|
|
46
|
+
| RelationDateRules<'branch.children.createdAt', Date | null>
|
|
47
|
+
| RelationDateRules<'branch.children.updatedAt', Date | null>
|
|
48
|
+
| RelationStringRules<'branch.parent.id', string>
|
|
49
|
+
| RelationBooleanRules<'branch.parent.activated', boolean>
|
|
50
|
+
| RelationNumberRules<'branch.parent.fromChangeId', number | null>
|
|
51
|
+
| RelationBooleanRules<'branch.parent.local', boolean>
|
|
52
|
+
| RelationBooleanRules<'branch.parent.remote', boolean>
|
|
53
|
+
| RelationDateRules<'branch.parent.createdAt', Date | null>
|
|
54
|
+
| RelationDateRules<'branch.parent.updatedAt', Date | null>;
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* RuleGroupBase
|
|
58
|
+
*/
|
|
59
|
+
export declare type RxDBRepositorySyncRuleGroup = RuleGroupBase<typeof RxDBRepositorySync,
|
|
60
|
+
|'id'
|
|
61
|
+
|'namespace'
|
|
62
|
+
|'entity'
|
|
63
|
+
|'syncType'
|
|
64
|
+
|'lastPushedChangeId'
|
|
65
|
+
|'lastPushedAt'
|
|
66
|
+
|'lastPulledAt'
|
|
67
|
+
|'lastPullRemoteChangeId'
|
|
68
|
+
|'enabled'
|
|
69
|
+
|'createdAt'
|
|
70
|
+
|'updatedAt'
|
|
71
|
+
|'branchId'
|
|
72
|
+
|'branch'
|
|
73
|
+
|'branch.id'
|
|
74
|
+
|'branch.activated'
|
|
75
|
+
|'branch.fromChangeId'
|
|
76
|
+
|'branch.local'
|
|
77
|
+
|'branch.remote'
|
|
78
|
+
|'branch.createdAt'
|
|
79
|
+
|'branch.updatedAt'
|
|
80
|
+
|'parentId'
|
|
81
|
+
|'branch.changes.id'
|
|
82
|
+
|'branch.changes.remoteId'
|
|
83
|
+
|'branch.changes.type'
|
|
84
|
+
|'branch.changes.transactionId'
|
|
85
|
+
|'branch.changes.namespace'
|
|
86
|
+
|'branch.changes.entity'
|
|
87
|
+
|'branch.changes.entityId'
|
|
88
|
+
|'branch.changes.createdAt'
|
|
89
|
+
|'branch.changes.updatedAt'
|
|
90
|
+
|'branch.changes.revertChangedAt'
|
|
91
|
+
|'branch.changes.revertChangeId'
|
|
92
|
+
|'branch.changes.redoInvalidatedAt'
|
|
93
|
+
|'branchId'
|
|
94
|
+
|'branch.children.id'
|
|
95
|
+
|'branch.children.activated'
|
|
96
|
+
|'branch.children.fromChangeId'
|
|
97
|
+
|'branch.children.local'
|
|
98
|
+
|'branch.children.remote'
|
|
99
|
+
|'branch.children.createdAt'
|
|
100
|
+
|'branch.children.updatedAt'
|
|
101
|
+
|'parentId'
|
|
102
|
+
|'branch.parent.id'
|
|
103
|
+
|'branch.parent.activated'
|
|
104
|
+
|'branch.parent.fromChangeId'
|
|
105
|
+
|'branch.parent.local'
|
|
106
|
+
|'branch.parent.remote'
|
|
107
|
+
|'branch.parent.createdAt'
|
|
108
|
+
|'branch.parent.updatedAt'
|
|
109
|
+
|'parentId',
|
|
110
|
+
RxDBRepositorySyncRule>;
|
|
111
|
+
|
|
112
|
+
/**
|
|
113
|
+
* OrderByField
|
|
114
|
+
*/
|
|
115
|
+
declare type RxDBRepositorySyncOrderByField = "id" | "namespace" | "entity" | "syncType" | "lastPushedChangeId" | "lastPushedAt" | "lastPulledAt" | "lastPullRemoteChangeId" | "enabled" | "createdAt" | "updatedAt";
|
|
116
|
+
|
|
4
117
|
/**
|
|
5
118
|
* rule
|
|
6
119
|
*/
|
|
@@ -9,9 +122,9 @@ declare type RxDBMigrationRule = NumberRules<RxDBMigration, 'id'>
|
|
|
9
122
|
| DateRules<RxDBMigration, 'executedAt'>;
|
|
10
123
|
|
|
11
124
|
/**
|
|
12
|
-
*
|
|
125
|
+
* RuleGroupBase
|
|
13
126
|
*/
|
|
14
|
-
export declare type RxDBMigrationRuleGroup =
|
|
127
|
+
export declare type RxDBMigrationRuleGroup = RuleGroupBase<typeof RxDBMigration,
|
|
15
128
|
|'id'
|
|
16
129
|
|'name'
|
|
17
130
|
|'executedAt',
|
|
@@ -26,6 +139,7 @@ declare type RxDBMigrationOrderByField = "id" | "name" | "executedAt";
|
|
|
26
139
|
* rule
|
|
27
140
|
*/
|
|
28
141
|
declare type RxDBChangeRule = NumberRules<RxDBChange, 'id'>
|
|
142
|
+
| NumberRules<RxDBChange, 'remoteId'>
|
|
29
143
|
| StringRules<RxDBChange, 'type'>
|
|
30
144
|
| UUIDRules<RxDBChange, 'transactionId'>
|
|
31
145
|
| StringRules<RxDBChange, 'namespace'>
|
|
@@ -35,38 +149,50 @@ declare type RxDBChangeRule = NumberRules<RxDBChange, 'id'>
|
|
|
35
149
|
| DateRules<RxDBChange, 'updatedAt'>
|
|
36
150
|
| DateRules<RxDBChange, 'revertChangedAt'>
|
|
37
151
|
| NumberRules<RxDBChange, 'revertChangeId'>
|
|
38
|
-
|
|
|
39
|
-
|
|
|
40
|
-
|
|
|
41
|
-
| RelationStringRules<'children.type', string>
|
|
42
|
-
| RelationUUIDRules<'children.transactionId', UUID | null>
|
|
43
|
-
| RelationStringRules<'children.namespace', string | null>
|
|
44
|
-
| RelationStringRules<'children.entity', string | null>
|
|
45
|
-
| RelationUUIDRules<'children.entityId', UUID | null>
|
|
46
|
-
| RelationDateRules<'children.createdAt', Date | null>
|
|
47
|
-
| RelationDateRules<'children.updatedAt', Date | null>
|
|
48
|
-
| RelationDateRules<'children.revertChangedAt', Date | null>
|
|
49
|
-
| RelationNumberRules<'children.revertChangeId', any | null>
|
|
50
|
-
| RelationNumberRules<'parent.id', any>
|
|
51
|
-
| RelationStringRules<'parent.type', string>
|
|
52
|
-
| RelationUUIDRules<'parent.transactionId', UUID | null>
|
|
53
|
-
| RelationStringRules<'parent.namespace', string | null>
|
|
54
|
-
| RelationStringRules<'parent.entity', string | null>
|
|
55
|
-
| RelationUUIDRules<'parent.entityId', UUID | null>
|
|
56
|
-
| RelationDateRules<'parent.createdAt', Date | null>
|
|
57
|
-
| RelationDateRules<'parent.updatedAt', Date | null>
|
|
58
|
-
| RelationDateRules<'parent.revertChangedAt', Date | null>
|
|
59
|
-
| RelationNumberRules<'parent.revertChangeId', any | null>
|
|
152
|
+
| DateRules<RxDBChange, 'redoInvalidatedAt'>
|
|
153
|
+
| StringRules<RxDBChange, 'branchId'>
|
|
154
|
+
| RelationExistsRules<'branch', RxDBBranchRuleGroup>
|
|
60
155
|
| RelationStringRules<'branch.id', string>
|
|
61
156
|
| RelationBooleanRules<'branch.activated', boolean>
|
|
157
|
+
| RelationNumberRules<'branch.fromChangeId', number | null>
|
|
62
158
|
| RelationBooleanRules<'branch.local', boolean>
|
|
63
|
-
| RelationBooleanRules<'branch.remote', boolean
|
|
159
|
+
| RelationBooleanRules<'branch.remote', boolean>
|
|
160
|
+
| RelationDateRules<'branch.createdAt', Date | null>
|
|
161
|
+
| RelationDateRules<'branch.updatedAt', Date | null>
|
|
162
|
+
| StringRules<RxDBBranch, 'parentId'>
|
|
163
|
+
| RelationStringRules<'branch.repositorySyncs.id', string>
|
|
164
|
+
| RelationStringRules<'branch.repositorySyncs.namespace', string>
|
|
165
|
+
| RelationStringRules<'branch.repositorySyncs.entity', string>
|
|
166
|
+
| RelationStringRules<'branch.repositorySyncs.syncType', string>
|
|
167
|
+
| RelationNumberRules<'branch.repositorySyncs.lastPushedChangeId', number | null>
|
|
168
|
+
| RelationDateRules<'branch.repositorySyncs.lastPushedAt', Date | null>
|
|
169
|
+
| RelationDateRules<'branch.repositorySyncs.lastPulledAt', Date | null>
|
|
170
|
+
| RelationNumberRules<'branch.repositorySyncs.lastPullRemoteChangeId', number | null>
|
|
171
|
+
| RelationBooleanRules<'branch.repositorySyncs.enabled', boolean>
|
|
172
|
+
| RelationDateRules<'branch.repositorySyncs.createdAt', Date | null>
|
|
173
|
+
| RelationDateRules<'branch.repositorySyncs.updatedAt', Date | null>
|
|
174
|
+
| StringRules<RxDBRepositorySync, 'branchId'>
|
|
175
|
+
| RelationStringRules<'branch.children.id', string>
|
|
176
|
+
| RelationBooleanRules<'branch.children.activated', boolean>
|
|
177
|
+
| RelationNumberRules<'branch.children.fromChangeId', number | null>
|
|
178
|
+
| RelationBooleanRules<'branch.children.local', boolean>
|
|
179
|
+
| RelationBooleanRules<'branch.children.remote', boolean>
|
|
180
|
+
| RelationDateRules<'branch.children.createdAt', Date | null>
|
|
181
|
+
| RelationDateRules<'branch.children.updatedAt', Date | null>
|
|
182
|
+
| RelationStringRules<'branch.parent.id', string>
|
|
183
|
+
| RelationBooleanRules<'branch.parent.activated', boolean>
|
|
184
|
+
| RelationNumberRules<'branch.parent.fromChangeId', number | null>
|
|
185
|
+
| RelationBooleanRules<'branch.parent.local', boolean>
|
|
186
|
+
| RelationBooleanRules<'branch.parent.remote', boolean>
|
|
187
|
+
| RelationDateRules<'branch.parent.createdAt', Date | null>
|
|
188
|
+
| RelationDateRules<'branch.parent.updatedAt', Date | null>;
|
|
64
189
|
|
|
65
190
|
/**
|
|
66
|
-
*
|
|
191
|
+
* RuleGroupBase
|
|
67
192
|
*/
|
|
68
|
-
export declare type RxDBChangeRuleGroup =
|
|
193
|
+
export declare type RxDBChangeRuleGroup = RuleGroupBase<typeof RxDBChange,
|
|
69
194
|
|'id'
|
|
195
|
+
|'remoteId'
|
|
70
196
|
|'type'
|
|
71
197
|
|'transactionId'
|
|
72
198
|
|'namespace'
|
|
@@ -76,110 +202,122 @@ export declare type RxDBChangeRuleGroup = RuleGroupCustom<typeof RxDBChange,
|
|
|
76
202
|
|'updatedAt'
|
|
77
203
|
|'revertChangedAt'
|
|
78
204
|
|'revertChangeId'
|
|
79
|
-
|'
|
|
80
|
-
|'branchId'
|
|
81
|
-
|'children.id'
|
|
82
|
-
|'children.type'
|
|
83
|
-
|'children.transactionId'
|
|
84
|
-
|'children.namespace'
|
|
85
|
-
|'children.entity'
|
|
86
|
-
|'children.entityId'
|
|
87
|
-
|'children.createdAt'
|
|
88
|
-
|'children.updatedAt'
|
|
89
|
-
|'children.revertChangedAt'
|
|
90
|
-
|'children.revertChangeId'
|
|
91
|
-
|'parentId'
|
|
92
|
-
|'branchId'
|
|
93
|
-
|'parent.id'
|
|
94
|
-
|'parent.type'
|
|
95
|
-
|'parent.transactionId'
|
|
96
|
-
|'parent.namespace'
|
|
97
|
-
|'parent.entity'
|
|
98
|
-
|'parent.entityId'
|
|
99
|
-
|'parent.createdAt'
|
|
100
|
-
|'parent.updatedAt'
|
|
101
|
-
|'parent.revertChangedAt'
|
|
102
|
-
|'parent.revertChangeId'
|
|
103
|
-
|'parentId'
|
|
205
|
+
|'redoInvalidatedAt'
|
|
104
206
|
|'branchId'
|
|
207
|
+
|'branch'
|
|
105
208
|
|'branch.id'
|
|
106
209
|
|'branch.activated'
|
|
210
|
+
|'branch.fromChangeId'
|
|
107
211
|
|'branch.local'
|
|
108
|
-
|'branch.remote'
|
|
212
|
+
|'branch.remote'
|
|
213
|
+
|'branch.createdAt'
|
|
214
|
+
|'branch.updatedAt'
|
|
215
|
+
|'parentId'
|
|
216
|
+
|'branch.repositorySyncs.id'
|
|
217
|
+
|'branch.repositorySyncs.namespace'
|
|
218
|
+
|'branch.repositorySyncs.entity'
|
|
219
|
+
|'branch.repositorySyncs.syncType'
|
|
220
|
+
|'branch.repositorySyncs.lastPushedChangeId'
|
|
221
|
+
|'branch.repositorySyncs.lastPushedAt'
|
|
222
|
+
|'branch.repositorySyncs.lastPulledAt'
|
|
223
|
+
|'branch.repositorySyncs.lastPullRemoteChangeId'
|
|
224
|
+
|'branch.repositorySyncs.enabled'
|
|
225
|
+
|'branch.repositorySyncs.createdAt'
|
|
226
|
+
|'branch.repositorySyncs.updatedAt'
|
|
227
|
+
|'branchId'
|
|
228
|
+
|'branch.children.id'
|
|
229
|
+
|'branch.children.activated'
|
|
230
|
+
|'branch.children.fromChangeId'
|
|
231
|
+
|'branch.children.local'
|
|
232
|
+
|'branch.children.remote'
|
|
233
|
+
|'branch.children.createdAt'
|
|
234
|
+
|'branch.children.updatedAt'
|
|
235
|
+
|'parentId'
|
|
236
|
+
|'branch.parent.id'
|
|
237
|
+
|'branch.parent.activated'
|
|
238
|
+
|'branch.parent.fromChangeId'
|
|
239
|
+
|'branch.parent.local'
|
|
240
|
+
|'branch.parent.remote'
|
|
241
|
+
|'branch.parent.createdAt'
|
|
242
|
+
|'branch.parent.updatedAt'
|
|
243
|
+
|'parentId',
|
|
109
244
|
RxDBChangeRule>;
|
|
110
245
|
|
|
111
246
|
/**
|
|
112
247
|
* OrderByField
|
|
113
248
|
*/
|
|
114
|
-
declare type RxDBChangeOrderByField = "id" | "type" | "transactionId" | "namespace" | "entity" | "entityId" | "inversePatch" | "patch" | "createdAt" | "updatedAt" | "revertChangedAt" | "revertChangeId";
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* TreeRule
|
|
118
|
-
*/
|
|
119
|
-
declare type RxDBChangeTreeRule = RelationStringRules<'children.type', string>
|
|
120
|
-
| RelationUUIDRules<'children.transactionId', UUID | null>
|
|
121
|
-
| RelationStringRules<'children.namespace', string | null>
|
|
122
|
-
| RelationStringRules<'children.entity', string | null>
|
|
123
|
-
| RelationUUIDRules<'children.entityId', UUID | null>
|
|
124
|
-
| RelationDateRules<'children.createdAt', Date | null>
|
|
125
|
-
| RelationDateRules<'children.updatedAt', Date | null>
|
|
126
|
-
| RelationDateRules<'children.revertChangedAt', Date | null>
|
|
127
|
-
| RelationNumberRules<'children.revertChangeId', any | null>;
|
|
128
|
-
|
|
129
|
-
/**
|
|
130
|
-
* TreeRuleGroup
|
|
131
|
-
*/
|
|
132
|
-
export declare type RxDBChangeTreeRuleGroup = RuleGroupCustom<typeof RxDBChange, 'children.type' | 'children.transactionId' | 'children.namespace' | 'children.entity' | 'children.entityId' | 'children.createdAt' | 'children.updatedAt' | 'children.revertChangedAt' | 'children.revertChangeId', RxDBChangeTreeRule>;
|
|
249
|
+
declare type RxDBChangeOrderByField = "id" | "remoteId" | "type" | "transactionId" | "namespace" | "entity" | "entityId" | "inversePatch" | "patch" | "createdAt" | "updatedAt" | "revertChangedAt" | "revertChangeId" | "redoInvalidatedAt";
|
|
133
250
|
|
|
134
251
|
/**
|
|
135
252
|
* rule
|
|
136
253
|
*/
|
|
137
254
|
declare type RxDBBranchRule = StringRules<RxDBBranch, 'id'>
|
|
138
255
|
| BooleanRules<RxDBBranch, 'activated'>
|
|
256
|
+
| NumberRules<RxDBBranch, 'fromChangeId'>
|
|
139
257
|
| BooleanRules<RxDBBranch, 'local'>
|
|
140
258
|
| BooleanRules<RxDBBranch, 'remote'>
|
|
141
|
-
|
|
|
259
|
+
| DateRules<RxDBBranch, 'createdAt'>
|
|
260
|
+
| DateRules<RxDBBranch, 'updatedAt'>
|
|
261
|
+
| StringRules<RxDBBranch, 'parentId'>
|
|
262
|
+
| RelationExistsRules<'changes', RxDBChangeRuleGroup>
|
|
263
|
+
| RelationNumberRules<'changes.id', number>
|
|
264
|
+
| RelationNumberRules<'changes.remoteId', number | null>
|
|
142
265
|
| RelationStringRules<'changes.type', string>
|
|
143
266
|
| RelationUUIDRules<'changes.transactionId', UUID | null>
|
|
144
|
-
| RelationStringRules<'changes.namespace', string
|
|
145
|
-
| RelationStringRules<'changes.entity', string
|
|
146
|
-
| RelationUUIDRules<'changes.entityId', UUID
|
|
147
|
-
| RelationDateRules<'changes.createdAt', Date
|
|
148
|
-
| RelationDateRules<'changes.updatedAt', Date
|
|
267
|
+
| RelationStringRules<'changes.namespace', string>
|
|
268
|
+
| RelationStringRules<'changes.entity', string>
|
|
269
|
+
| RelationUUIDRules<'changes.entityId', UUID>
|
|
270
|
+
| RelationDateRules<'changes.createdAt', Date>
|
|
271
|
+
| RelationDateRules<'changes.updatedAt', Date>
|
|
149
272
|
| RelationDateRules<'changes.revertChangedAt', Date | null>
|
|
150
|
-
| RelationNumberRules<'changes.revertChangeId',
|
|
151
|
-
|
|
|
152
|
-
|
|
|
153
|
-
|
|
|
154
|
-
| RelationStringRules<'
|
|
155
|
-
|
|
|
156
|
-
| RelationStringRules<'
|
|
157
|
-
| RelationStringRules<'
|
|
158
|
-
|
|
|
159
|
-
| RelationDateRules<'
|
|
160
|
-
| RelationDateRules<'
|
|
161
|
-
|
|
|
162
|
-
|
|
|
163
|
-
|
|
|
164
|
-
|
|
|
165
|
-
|
|
|
166
|
-
|
|
|
167
|
-
| RelationStringRules<'
|
|
168
|
-
|
|
|
169
|
-
|
|
|
170
|
-
|
|
|
171
|
-
|
|
|
172
|
-
|
|
|
273
|
+
| RelationNumberRules<'changes.revertChangeId', number | null>
|
|
274
|
+
| RelationDateRules<'changes.redoInvalidatedAt', Date | null>
|
|
275
|
+
| StringRules<RxDBChange, 'branchId'>
|
|
276
|
+
| RelationExistsRules<'repositorySyncs', RxDBRepositorySyncRuleGroup>
|
|
277
|
+
| RelationStringRules<'repositorySyncs.id', string>
|
|
278
|
+
| RelationStringRules<'repositorySyncs.namespace', string>
|
|
279
|
+
| RelationStringRules<'repositorySyncs.entity', string>
|
|
280
|
+
| RelationStringRules<'repositorySyncs.syncType', string>
|
|
281
|
+
| RelationNumberRules<'repositorySyncs.lastPushedChangeId', number | null>
|
|
282
|
+
| RelationDateRules<'repositorySyncs.lastPushedAt', Date | null>
|
|
283
|
+
| RelationDateRules<'repositorySyncs.lastPulledAt', Date | null>
|
|
284
|
+
| RelationNumberRules<'repositorySyncs.lastPullRemoteChangeId', number | null>
|
|
285
|
+
| RelationBooleanRules<'repositorySyncs.enabled', boolean>
|
|
286
|
+
| RelationDateRules<'repositorySyncs.createdAt', Date | null>
|
|
287
|
+
| RelationDateRules<'repositorySyncs.updatedAt', Date | null>
|
|
288
|
+
| StringRules<RxDBRepositorySync, 'branchId'>
|
|
289
|
+
| RelationExistsRules<'children', RxDBBranchRuleGroup>
|
|
290
|
+
| RelationStringRules<'children.id', string>
|
|
291
|
+
| RelationBooleanRules<'children.activated', boolean>
|
|
292
|
+
| RelationNumberRules<'children.fromChangeId', number | null>
|
|
293
|
+
| RelationBooleanRules<'children.local', boolean>
|
|
294
|
+
| RelationBooleanRules<'children.remote', boolean>
|
|
295
|
+
| RelationDateRules<'children.createdAt', Date | null>
|
|
296
|
+
| RelationDateRules<'children.updatedAt', Date | null>
|
|
297
|
+
| RelationExistsRules<'parent', RxDBBranchRuleGroup>
|
|
298
|
+
| RelationStringRules<'parent.id', string>
|
|
299
|
+
| RelationBooleanRules<'parent.activated', boolean>
|
|
300
|
+
| RelationNumberRules<'parent.fromChangeId', number | null>
|
|
301
|
+
| RelationBooleanRules<'parent.local', boolean>
|
|
302
|
+
| RelationBooleanRules<'parent.remote', boolean>
|
|
303
|
+
| RelationDateRules<'parent.createdAt', Date | null>
|
|
304
|
+
| RelationDateRules<'parent.updatedAt', Date | null>;
|
|
173
305
|
|
|
174
306
|
/**
|
|
175
|
-
*
|
|
307
|
+
* RuleGroupBase
|
|
176
308
|
*/
|
|
177
|
-
export declare type RxDBBranchRuleGroup =
|
|
309
|
+
export declare type RxDBBranchRuleGroup = RuleGroupBase<typeof RxDBBranch,
|
|
178
310
|
|'id'
|
|
179
311
|
|'activated'
|
|
312
|
+
|'fromChangeId'
|
|
180
313
|
|'local'
|
|
181
314
|
|'remote'
|
|
315
|
+
|'createdAt'
|
|
316
|
+
|'updatedAt'
|
|
317
|
+
|'parentId'
|
|
318
|
+
|'changes'
|
|
182
319
|
|'changes.id'
|
|
320
|
+
|'changes.remoteId'
|
|
183
321
|
|'changes.type'
|
|
184
322
|
|'changes.transactionId'
|
|
185
323
|
|'changes.namespace'
|
|
@@ -189,38 +327,60 @@ export declare type RxDBBranchRuleGroup = RuleGroupCustom<typeof RxDBBranch,
|
|
|
189
327
|
|'changes.updatedAt'
|
|
190
328
|
|'changes.revertChangedAt'
|
|
191
329
|
|'changes.revertChangeId'
|
|
192
|
-
|'
|
|
330
|
+
|'changes.redoInvalidatedAt'
|
|
193
331
|
|'branchId'
|
|
194
|
-
|'
|
|
195
|
-
|'
|
|
196
|
-
|'
|
|
197
|
-
|'
|
|
198
|
-
|'
|
|
199
|
-
|'
|
|
200
|
-
|'
|
|
201
|
-
|'
|
|
202
|
-
|'
|
|
203
|
-
|'
|
|
204
|
-
|'
|
|
332
|
+
|'repositorySyncs'
|
|
333
|
+
|'repositorySyncs.id'
|
|
334
|
+
|'repositorySyncs.namespace'
|
|
335
|
+
|'repositorySyncs.entity'
|
|
336
|
+
|'repositorySyncs.syncType'
|
|
337
|
+
|'repositorySyncs.lastPushedChangeId'
|
|
338
|
+
|'repositorySyncs.lastPushedAt'
|
|
339
|
+
|'repositorySyncs.lastPulledAt'
|
|
340
|
+
|'repositorySyncs.lastPullRemoteChangeId'
|
|
341
|
+
|'repositorySyncs.enabled'
|
|
342
|
+
|'repositorySyncs.createdAt'
|
|
343
|
+
|'repositorySyncs.updatedAt'
|
|
205
344
|
|'branchId'
|
|
206
|
-
|'
|
|
207
|
-
|'
|
|
208
|
-
|'
|
|
209
|
-
|'
|
|
210
|
-
|'
|
|
211
|
-
|'
|
|
212
|
-
|'
|
|
213
|
-
|'
|
|
214
|
-
|'changes.parent.revertChangedAt'
|
|
215
|
-
|'changes.parent.revertChangeId'
|
|
345
|
+
|'children'
|
|
346
|
+
|'children.id'
|
|
347
|
+
|'children.activated'
|
|
348
|
+
|'children.fromChangeId'
|
|
349
|
+
|'children.local'
|
|
350
|
+
|'children.remote'
|
|
351
|
+
|'children.createdAt'
|
|
352
|
+
|'children.updatedAt'
|
|
216
353
|
|'parentId'
|
|
217
|
-
|'
|
|
354
|
+
|'parent'
|
|
355
|
+
|'parent.id'
|
|
356
|
+
|'parent.activated'
|
|
357
|
+
|'parent.fromChangeId'
|
|
358
|
+
|'parent.local'
|
|
359
|
+
|'parent.remote'
|
|
360
|
+
|'parent.createdAt'
|
|
361
|
+
|'parent.updatedAt'
|
|
362
|
+
|'parentId',
|
|
218
363
|
RxDBBranchRule>;
|
|
219
364
|
|
|
220
365
|
/**
|
|
221
366
|
* OrderByField
|
|
222
367
|
*/
|
|
223
|
-
declare type RxDBBranchOrderByField = "id" | "activated" | "local" | "remote";
|
|
368
|
+
declare type RxDBBranchOrderByField = "id" | "activated" | "fromChangeId" | "local" | "remote" | "createdAt" | "updatedAt";
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* TreeRule
|
|
372
|
+
*/
|
|
373
|
+
declare type RxDBBranchTreeRule = RelationBooleanRules<'children.activated', boolean>
|
|
374
|
+
| RelationNumberRules<'children.fromChangeId', number | null>
|
|
375
|
+
| RelationBooleanRules<'children.local', boolean>
|
|
376
|
+
| RelationBooleanRules<'children.remote', boolean>
|
|
377
|
+
| RelationDateRules<'children.createdAt', Date | null>
|
|
378
|
+
| RelationDateRules<'children.updatedAt', Date | null>;
|
|
379
|
+
|
|
380
|
+
/**
|
|
381
|
+
* TreeRuleGroup
|
|
382
|
+
*/
|
|
383
|
+
export declare type RxDBBranchTreeRuleGroup = RuleGroupBase<typeof RxDBBranch, 'children.activated' | 'children.fromChangeId' | 'children.local' | 'children.remote' | 'children.createdAt' | 'children.updatedAt', RxDBBranchTreeRule>;
|
|
224
384
|
|
|
225
385
|
/**
|
|
226
386
|
* rxdb
|
|
@@ -230,6 +390,10 @@ declare module "@aiao/rxdb" {
|
|
|
230
390
|
* RxDB
|
|
231
391
|
*/
|
|
232
392
|
interface RxDB {
|
|
393
|
+
/**
|
|
394
|
+
* RxDBRepositorySync
|
|
395
|
+
*/
|
|
396
|
+
RxDBRepositorySync: typeof RxDBRepositorySync;
|
|
233
397
|
/**
|
|
234
398
|
* RxDBMigration
|
|
235
399
|
*/
|
|
@@ -245,6 +409,97 @@ declare module "@aiao/rxdb" {
|
|
|
245
409
|
}
|
|
246
410
|
}
|
|
247
411
|
|
|
412
|
+
/**
|
|
413
|
+
* 静态类型
|
|
414
|
+
*/
|
|
415
|
+
export interface RxDBRepositorySyncStaticTypes {
|
|
416
|
+
/**
|
|
417
|
+
* id 类型
|
|
418
|
+
*/
|
|
419
|
+
idType: string;
|
|
420
|
+
/**
|
|
421
|
+
* 查询选项
|
|
422
|
+
*/
|
|
423
|
+
getOptions: string;
|
|
424
|
+
/**
|
|
425
|
+
* 查询选项
|
|
426
|
+
*/
|
|
427
|
+
findOneOrFailOptions: FindOneOrFailOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>;
|
|
428
|
+
/**
|
|
429
|
+
* 查询选项
|
|
430
|
+
*/
|
|
431
|
+
findOptions: FindOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>;
|
|
432
|
+
/**
|
|
433
|
+
* 查询选项
|
|
434
|
+
*/
|
|
435
|
+
findOneOptions: FindOneOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>;
|
|
436
|
+
/**
|
|
437
|
+
* 查询选项
|
|
438
|
+
*/
|
|
439
|
+
findAllOptions: FindAllOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>;
|
|
440
|
+
/**
|
|
441
|
+
* 查询选项
|
|
442
|
+
*/
|
|
443
|
+
findByCursorOptions: FindByCursorOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>;
|
|
444
|
+
/**
|
|
445
|
+
* 查询选项
|
|
446
|
+
*/
|
|
447
|
+
countOptions: CountOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup>;
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
/**
|
|
451
|
+
* 初始化数据
|
|
452
|
+
*/
|
|
453
|
+
export interface RxDBRepositorySyncInitData {
|
|
454
|
+
/**
|
|
455
|
+
* id
|
|
456
|
+
*/
|
|
457
|
+
id?: string;
|
|
458
|
+
/**
|
|
459
|
+
* namespace
|
|
460
|
+
*/
|
|
461
|
+
namespace?: string;
|
|
462
|
+
/**
|
|
463
|
+
* entity
|
|
464
|
+
*/
|
|
465
|
+
entity?: string;
|
|
466
|
+
/**
|
|
467
|
+
* syncType
|
|
468
|
+
* @default 'none'
|
|
469
|
+
*/
|
|
470
|
+
syncType?: string;
|
|
471
|
+
/**
|
|
472
|
+
* lastPushedChangeId
|
|
473
|
+
*/
|
|
474
|
+
lastPushedChangeId?: number | null;
|
|
475
|
+
/**
|
|
476
|
+
* lastPushedAt
|
|
477
|
+
*/
|
|
478
|
+
lastPushedAt?: Date | null;
|
|
479
|
+
/**
|
|
480
|
+
* lastPulledAt
|
|
481
|
+
*/
|
|
482
|
+
lastPulledAt?: Date | null;
|
|
483
|
+
/**
|
|
484
|
+
* lastPullRemoteChangeId
|
|
485
|
+
*/
|
|
486
|
+
lastPullRemoteChangeId?: number | null;
|
|
487
|
+
/**
|
|
488
|
+
* enabled
|
|
489
|
+
*/
|
|
490
|
+
enabled?: boolean;
|
|
491
|
+
/**
|
|
492
|
+
* createdAt
|
|
493
|
+
* @default new Date()
|
|
494
|
+
*/
|
|
495
|
+
createdAt?: Date | null;
|
|
496
|
+
/**
|
|
497
|
+
* updatedAt
|
|
498
|
+
* @default new Date()
|
|
499
|
+
*/
|
|
500
|
+
updatedAt?: Date | null;
|
|
501
|
+
}
|
|
502
|
+
|
|
248
503
|
/**
|
|
249
504
|
* 静态类型
|
|
250
505
|
*/
|
|
@@ -273,6 +528,10 @@ export interface RxDBMigrationStaticTypes {
|
|
|
273
528
|
* 查询选项
|
|
274
529
|
*/
|
|
275
530
|
findAllOptions: FindAllOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>;
|
|
531
|
+
/**
|
|
532
|
+
* 查询选项
|
|
533
|
+
*/
|
|
534
|
+
findByCursorOptions: FindByCursorOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>;
|
|
276
535
|
/**
|
|
277
536
|
* 查询选项
|
|
278
537
|
*/
|
|
@@ -286,7 +545,7 @@ export interface RxDBMigrationInitData {
|
|
|
286
545
|
/**
|
|
287
546
|
* id
|
|
288
547
|
*/
|
|
289
|
-
id?:
|
|
548
|
+
id?: number;
|
|
290
549
|
/**
|
|
291
550
|
* name
|
|
292
551
|
*/
|
|
@@ -329,35 +588,11 @@ export interface RxDBChangeStaticTypes {
|
|
|
329
588
|
/**
|
|
330
589
|
* 查询选项
|
|
331
590
|
*/
|
|
332
|
-
|
|
333
|
-
/**
|
|
334
|
-
* 查询的实体
|
|
335
|
-
*/
|
|
336
|
-
entity: RxDBChange;
|
|
337
|
-
/**
|
|
338
|
-
* 查询选项
|
|
339
|
-
*/
|
|
340
|
-
findRootOptions: FindTreeRootOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>;
|
|
591
|
+
findByCursorOptions: FindByCursorOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>;
|
|
341
592
|
/**
|
|
342
593
|
* 查询选项
|
|
343
594
|
*/
|
|
344
|
-
|
|
345
|
-
/**
|
|
346
|
-
* 查询选项
|
|
347
|
-
*/
|
|
348
|
-
findDescendantsOptions: FindTreeOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>;
|
|
349
|
-
/**
|
|
350
|
-
* 查询选项
|
|
351
|
-
*/
|
|
352
|
-
countDescendantsOptions: FindTreeOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>;
|
|
353
|
-
/**
|
|
354
|
-
* 查询选项
|
|
355
|
-
*/
|
|
356
|
-
findAncestorsOptions: FindTreeOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>;
|
|
357
|
-
/**
|
|
358
|
-
* 查询选项
|
|
359
|
-
*/
|
|
360
|
-
countAncestorsOptions: FindTreeOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>;
|
|
595
|
+
countOptions: CountOptions<typeof RxDBChange,RxDBChangeRuleGroup>;
|
|
361
596
|
}
|
|
362
597
|
|
|
363
598
|
/**
|
|
@@ -367,7 +602,11 @@ export interface RxDBChangeInitData {
|
|
|
367
602
|
/**
|
|
368
603
|
* id
|
|
369
604
|
*/
|
|
370
|
-
id?:
|
|
605
|
+
id?: number;
|
|
606
|
+
/**
|
|
607
|
+
* remoteId
|
|
608
|
+
*/
|
|
609
|
+
remoteId?: number | null;
|
|
371
610
|
/**
|
|
372
611
|
* type
|
|
373
612
|
*/
|
|
@@ -379,33 +618,33 @@ export interface RxDBChangeInitData {
|
|
|
379
618
|
/**
|
|
380
619
|
* namespace
|
|
381
620
|
*/
|
|
382
|
-
namespace?: string
|
|
621
|
+
namespace?: string;
|
|
383
622
|
/**
|
|
384
623
|
* entity
|
|
385
624
|
*/
|
|
386
|
-
entity?: string
|
|
625
|
+
entity?: string;
|
|
387
626
|
/**
|
|
388
627
|
* entityId
|
|
389
628
|
*/
|
|
390
|
-
entityId?: UUID
|
|
629
|
+
entityId?: UUID;
|
|
391
630
|
/**
|
|
392
631
|
* inversePatch
|
|
393
632
|
*/
|
|
394
|
-
inversePatch?: any | null;
|
|
633
|
+
inversePatch?: Record<string, any> | null;
|
|
395
634
|
/**
|
|
396
635
|
* patch
|
|
397
636
|
*/
|
|
398
|
-
patch?: any | null;
|
|
637
|
+
patch?: Record<string, any> | null;
|
|
399
638
|
/**
|
|
400
639
|
* createdAt
|
|
401
640
|
* @default new Date()
|
|
402
641
|
*/
|
|
403
|
-
createdAt?: Date
|
|
642
|
+
createdAt?: Date;
|
|
404
643
|
/**
|
|
405
644
|
* updatedAt
|
|
406
645
|
* @default new Date()
|
|
407
646
|
*/
|
|
408
|
-
updatedAt?: Date
|
|
647
|
+
updatedAt?: Date;
|
|
409
648
|
/**
|
|
410
649
|
* revertChangedAt
|
|
411
650
|
*/
|
|
@@ -413,7 +652,11 @@ export interface RxDBChangeInitData {
|
|
|
413
652
|
/**
|
|
414
653
|
* revertChangeId
|
|
415
654
|
*/
|
|
416
|
-
revertChangeId?:
|
|
655
|
+
revertChangeId?: number | null;
|
|
656
|
+
/**
|
|
657
|
+
* redoInvalidatedAt
|
|
658
|
+
*/
|
|
659
|
+
redoInvalidatedAt?: Date | null;
|
|
417
660
|
}
|
|
418
661
|
|
|
419
662
|
/**
|
|
@@ -444,10 +687,34 @@ export interface RxDBBranchStaticTypes {
|
|
|
444
687
|
* 查询选项
|
|
445
688
|
*/
|
|
446
689
|
findAllOptions: FindAllOptions<typeof RxDBBranch,RxDBBranchRuleGroup,RxDBBranchOrderByField>;
|
|
690
|
+
/**
|
|
691
|
+
* 查询选项
|
|
692
|
+
*/
|
|
693
|
+
findByCursorOptions: FindByCursorOptions<typeof RxDBBranch,RxDBBranchRuleGroup,RxDBBranchOrderByField>;
|
|
447
694
|
/**
|
|
448
695
|
* 查询选项
|
|
449
696
|
*/
|
|
450
697
|
countOptions: CountOptions<typeof RxDBBranch,RxDBBranchRuleGroup>;
|
|
698
|
+
/**
|
|
699
|
+
* 查询的实体
|
|
700
|
+
*/
|
|
701
|
+
entity: RxDBBranch;
|
|
702
|
+
/**
|
|
703
|
+
* 查询选项
|
|
704
|
+
*/
|
|
705
|
+
findDescendantsOptions: FindTreeOptions<typeof RxDBBranch,RxDBBranchTreeRuleGroup>;
|
|
706
|
+
/**
|
|
707
|
+
* 查询选项
|
|
708
|
+
*/
|
|
709
|
+
countDescendantsOptions: FindTreeOptions<typeof RxDBBranch,RxDBBranchTreeRuleGroup>;
|
|
710
|
+
/**
|
|
711
|
+
* 查询选项
|
|
712
|
+
*/
|
|
713
|
+
findAncestorsOptions: FindTreeOptions<typeof RxDBBranch,RxDBBranchTreeRuleGroup>;
|
|
714
|
+
/**
|
|
715
|
+
* 查询选项
|
|
716
|
+
*/
|
|
717
|
+
countAncestorsOptions: FindTreeOptions<typeof RxDBBranch,RxDBBranchTreeRuleGroup>;
|
|
451
718
|
}
|
|
452
719
|
|
|
453
720
|
/**
|
|
@@ -462,6 +729,10 @@ export interface RxDBBranchInitData {
|
|
|
462
729
|
* activated
|
|
463
730
|
*/
|
|
464
731
|
activated?: boolean;
|
|
732
|
+
/**
|
|
733
|
+
* fromChangeId
|
|
734
|
+
*/
|
|
735
|
+
fromChangeId?: number | null;
|
|
465
736
|
/**
|
|
466
737
|
* local
|
|
467
738
|
*/
|
|
@@ -470,59 +741,216 @@ export interface RxDBBranchInitData {
|
|
|
470
741
|
* remote
|
|
471
742
|
*/
|
|
472
743
|
remote?: boolean;
|
|
744
|
+
/**
|
|
745
|
+
* createdAt
|
|
746
|
+
* @default new Date()
|
|
747
|
+
*/
|
|
748
|
+
createdAt?: Date | null;
|
|
749
|
+
/**
|
|
750
|
+
* updatedAt
|
|
751
|
+
* @default new Date()
|
|
752
|
+
*/
|
|
753
|
+
updatedAt?: Date | null;
|
|
754
|
+
}
|
|
755
|
+
|
|
756
|
+
/**
|
|
757
|
+
* RxDBRepositorySync
|
|
758
|
+
*/
|
|
759
|
+
export declare class RxDBRepositorySync {
|
|
760
|
+
static [ENTITY_STATIC_TYPES]: RxDBRepositorySyncStaticTypes;
|
|
761
|
+
/**
|
|
762
|
+
* branch
|
|
763
|
+
*/
|
|
764
|
+
readonly branch$: RelationEntityObservable<typeof RxDBBranch>;
|
|
765
|
+
/**
|
|
766
|
+
* createdAt
|
|
767
|
+
* @default new Date()
|
|
768
|
+
*/
|
|
769
|
+
readonly createdAt?: Date | null;
|
|
770
|
+
/**
|
|
771
|
+
* updatedAt
|
|
772
|
+
* @default new Date()
|
|
773
|
+
*/
|
|
774
|
+
readonly updatedAt?: Date | null;
|
|
775
|
+
/**
|
|
776
|
+
* branch id
|
|
777
|
+
*/
|
|
778
|
+
branchId: string;
|
|
779
|
+
/**
|
|
780
|
+
* enabled
|
|
781
|
+
*/
|
|
782
|
+
enabled: boolean;
|
|
783
|
+
/**
|
|
784
|
+
* entity
|
|
785
|
+
*/
|
|
786
|
+
entity: string;
|
|
787
|
+
/**
|
|
788
|
+
* id
|
|
789
|
+
*/
|
|
790
|
+
id: string;
|
|
791
|
+
/**
|
|
792
|
+
* lastPulledAt
|
|
793
|
+
*/
|
|
794
|
+
lastPulledAt?: Date | null;
|
|
795
|
+
/**
|
|
796
|
+
* lastPullRemoteChangeId
|
|
797
|
+
*/
|
|
798
|
+
lastPullRemoteChangeId?: number | null;
|
|
799
|
+
/**
|
|
800
|
+
* lastPushedAt
|
|
801
|
+
*/
|
|
802
|
+
lastPushedAt?: Date | null;
|
|
803
|
+
/**
|
|
804
|
+
* lastPushedChangeId
|
|
805
|
+
*/
|
|
806
|
+
lastPushedChangeId?: number | null;
|
|
807
|
+
/**
|
|
808
|
+
* namespace
|
|
809
|
+
*/
|
|
810
|
+
namespace: string;
|
|
811
|
+
/**
|
|
812
|
+
* syncType
|
|
813
|
+
* @default 'none'
|
|
814
|
+
*/
|
|
815
|
+
syncType: string;
|
|
816
|
+
/**
|
|
817
|
+
* 初始化数据
|
|
818
|
+
* @param initData 初始化数据
|
|
819
|
+
*/
|
|
820
|
+
constructor(initData?: RxDBRepositorySyncInitData);
|
|
821
|
+
/**
|
|
822
|
+
* 统计实体数量
|
|
823
|
+
* @param options 查询选项
|
|
824
|
+
* @example
|
|
825
|
+
* RxDBRepositorySync.count({ where: { combinator: 'and', rules: [] } }).subscribe(total => console.log(total));
|
|
826
|
+
*/
|
|
827
|
+
static count(options: CountOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup>): Observable<number>;
|
|
828
|
+
/**
|
|
829
|
+
* 查询多个实体
|
|
830
|
+
* @param options 查询选项
|
|
831
|
+
* @example
|
|
832
|
+
* RxDBRepositorySync.find({ where: { combinator: 'and', rules: [] }] }).subscribe(list => console.log(list));
|
|
833
|
+
*/
|
|
834
|
+
static find(options: FindOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>): Observable<RxDBRepositorySync[]>;
|
|
835
|
+
/**
|
|
836
|
+
* 查询所有实体
|
|
837
|
+
* @param options 查询选项
|
|
838
|
+
* @example
|
|
839
|
+
* RxDBRepositorySync.findAll({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
840
|
+
*/
|
|
841
|
+
static findAll(options: FindAllOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>): Observable<RxDBRepositorySync[]>;
|
|
842
|
+
/**
|
|
843
|
+
* 游标分页查询
|
|
844
|
+
* @param options 查询选项
|
|
845
|
+
* @example
|
|
846
|
+
* RxDBRepositorySync.findByCursor({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
847
|
+
*/
|
|
848
|
+
static findByCursor(options: FindByCursorOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>): Observable<RxDBRepositorySync[]>;
|
|
849
|
+
/**
|
|
850
|
+
* 查询单个实体,未找到时返回 undefined
|
|
851
|
+
* @param options 查询选项
|
|
852
|
+
* @example
|
|
853
|
+
* RxDBRepositorySync.findOne({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
854
|
+
*/
|
|
855
|
+
static findOne(options: FindOneOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>): Observable<RxDBRepositorySync | undefined>;
|
|
856
|
+
/**
|
|
857
|
+
* 查询单个实体,未找到时抛出错误
|
|
858
|
+
* @param options 查询选项
|
|
859
|
+
* @example
|
|
860
|
+
* RxDBRepositorySync.findOneOrFail({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
861
|
+
*/
|
|
862
|
+
static findOneOrFail(options: FindOneOrFailOptions<typeof RxDBRepositorySync,RxDBRepositorySyncRuleGroup,RxDBRepositorySyncOrderByField>): Observable<RxDBRepositorySync>;
|
|
863
|
+
/**
|
|
864
|
+
* 根据 ID 获取单个实体
|
|
865
|
+
* @param options 查询选项
|
|
866
|
+
* @example
|
|
867
|
+
* RxDBRepositorySync.get('123').subscribe(entity => console.log(entity));
|
|
868
|
+
*/
|
|
869
|
+
static get(options: string): Observable<RxDBRepositorySync>;
|
|
870
|
+
/**
|
|
871
|
+
* 删除
|
|
872
|
+
*/
|
|
873
|
+
remove(): Promise<RxDBRepositorySync>;
|
|
874
|
+
/**
|
|
875
|
+
* 重置数据
|
|
876
|
+
*/
|
|
877
|
+
reset(): void;
|
|
878
|
+
/**
|
|
879
|
+
* 保存
|
|
880
|
+
*/
|
|
881
|
+
save(): Promise<RxDBRepositorySync>;
|
|
473
882
|
}
|
|
474
883
|
|
|
475
884
|
/**
|
|
476
885
|
* RxDBMigration
|
|
477
886
|
*/
|
|
478
|
-
export declare class RxDBMigration
|
|
887
|
+
export declare class RxDBMigration {
|
|
888
|
+
static [ENTITY_STATIC_TYPES]: RxDBMigrationStaticTypes;
|
|
479
889
|
/**
|
|
480
890
|
* executedAt
|
|
481
891
|
* @default new Date()
|
|
482
892
|
*/
|
|
483
|
-
executedAt: Date;
|
|
893
|
+
readonly executedAt: Date;
|
|
484
894
|
/**
|
|
485
895
|
* name
|
|
486
896
|
*/
|
|
487
|
-
name: string;
|
|
488
|
-
[ENTITY_STATIC_TYPES]: RxDBMigrationStaticTypes;
|
|
897
|
+
readonly name: string;
|
|
489
898
|
/**
|
|
490
899
|
* id
|
|
491
900
|
*/
|
|
492
|
-
id:
|
|
901
|
+
id: number;
|
|
493
902
|
/**
|
|
494
903
|
* 初始化数据
|
|
495
904
|
* @param initData 初始化数据
|
|
496
905
|
*/
|
|
497
906
|
constructor(initData?: RxDBMigrationInitData);
|
|
498
907
|
/**
|
|
499
|
-
*
|
|
908
|
+
* 统计实体数量
|
|
500
909
|
* @param options 查询选项
|
|
910
|
+
* @example
|
|
911
|
+
* RxDBMigration.count({ where: { combinator: 'and', rules: [] } }).subscribe(total => console.log(total));
|
|
501
912
|
*/
|
|
502
913
|
static count(options: CountOptions<typeof RxDBMigration,RxDBMigrationRuleGroup>): Observable<number>;
|
|
503
914
|
/**
|
|
504
|
-
*
|
|
915
|
+
* 查询多个实体
|
|
505
916
|
* @param options 查询选项
|
|
917
|
+
* @example
|
|
918
|
+
* RxDBMigration.find({ where: { combinator: 'and', rules: [] }] }).subscribe(list => console.log(list));
|
|
506
919
|
*/
|
|
507
920
|
static find(options: FindOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration[]>;
|
|
508
921
|
/**
|
|
509
|
-
*
|
|
922
|
+
* 查询所有实体
|
|
510
923
|
* @param options 查询选项
|
|
924
|
+
* @example
|
|
925
|
+
* RxDBMigration.findAll({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
511
926
|
*/
|
|
512
927
|
static findAll(options: FindAllOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration[]>;
|
|
513
928
|
/**
|
|
514
|
-
*
|
|
929
|
+
* 游标分页查询
|
|
930
|
+
* @param options 查询选项
|
|
931
|
+
* @example
|
|
932
|
+
* RxDBMigration.findByCursor({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
933
|
+
*/
|
|
934
|
+
static findByCursor(options: FindByCursorOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration[]>;
|
|
935
|
+
/**
|
|
936
|
+
* 查询单个实体,未找到时返回 undefined
|
|
515
937
|
* @param options 查询选项
|
|
938
|
+
* @example
|
|
939
|
+
* RxDBMigration.findOne({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
516
940
|
*/
|
|
517
941
|
static findOne(options: FindOneOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration | undefined>;
|
|
518
942
|
/**
|
|
519
|
-
*
|
|
943
|
+
* 查询单个实体,未找到时抛出错误
|
|
520
944
|
* @param options 查询选项
|
|
945
|
+
* @example
|
|
946
|
+
* RxDBMigration.findOneOrFail({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
521
947
|
*/
|
|
522
948
|
static findOneOrFail(options: FindOneOrFailOptions<typeof RxDBMigration,RxDBMigrationRuleGroup,RxDBMigrationOrderByField>): Observable<RxDBMigration>;
|
|
523
949
|
/**
|
|
524
|
-
*
|
|
950
|
+
* 根据 ID 获取单个实体
|
|
525
951
|
* @param options 查询选项
|
|
952
|
+
* @example
|
|
953
|
+
* RxDBMigration.get('123').subscribe(entity => console.log(entity));
|
|
526
954
|
*/
|
|
527
955
|
static get(options: number): Observable<RxDBMigration>;
|
|
528
956
|
/**
|
|
@@ -542,66 +970,62 @@ export declare class RxDBMigration implements IEntityStaticType {
|
|
|
542
970
|
/**
|
|
543
971
|
* RxDBChange
|
|
544
972
|
*/
|
|
545
|
-
export declare class RxDBChange
|
|
973
|
+
export declare class RxDBChange {
|
|
974
|
+
static [ENTITY_STATIC_TYPES]: RxDBChangeStaticTypes;
|
|
546
975
|
/**
|
|
547
976
|
* branch
|
|
548
977
|
*/
|
|
549
|
-
branch$: RelationEntityObservable<RxDBBranch
|
|
550
|
-
/**
|
|
551
|
-
* branch id
|
|
552
|
-
*/
|
|
553
|
-
branchId?: string;
|
|
554
|
-
/**
|
|
555
|
-
* children
|
|
556
|
-
*/
|
|
557
|
-
children$: RelationEntitiesObservable<RxDBChange>;
|
|
978
|
+
readonly branch$: RelationEntityObservable<typeof RxDBBranch>;
|
|
558
979
|
/**
|
|
559
980
|
* createdAt
|
|
560
981
|
* @default new Date()
|
|
561
982
|
*/
|
|
562
|
-
createdAt
|
|
983
|
+
readonly createdAt: Date;
|
|
563
984
|
/**
|
|
564
985
|
* entity
|
|
565
986
|
*/
|
|
566
|
-
entity
|
|
987
|
+
readonly entity: string;
|
|
567
988
|
/**
|
|
568
989
|
* entityId
|
|
569
990
|
*/
|
|
570
|
-
entityId
|
|
991
|
+
readonly entityId: UUID;
|
|
571
992
|
/**
|
|
572
993
|
* inversePatch
|
|
573
994
|
*/
|
|
574
|
-
inversePatch?: any | null;
|
|
995
|
+
readonly inversePatch?: Record<string, any> | null;
|
|
575
996
|
/**
|
|
576
997
|
* namespace
|
|
577
998
|
*/
|
|
578
|
-
namespace
|
|
999
|
+
readonly namespace: string;
|
|
579
1000
|
/**
|
|
580
|
-
*
|
|
1001
|
+
* patch
|
|
581
1002
|
*/
|
|
582
|
-
|
|
1003
|
+
readonly patch?: Record<string, any> | null;
|
|
583
1004
|
/**
|
|
584
|
-
*
|
|
1005
|
+
* remoteId
|
|
585
1006
|
*/
|
|
586
|
-
|
|
587
|
-
/**
|
|
588
|
-
* patch
|
|
589
|
-
*/
|
|
590
|
-
patch?: any | null;
|
|
1007
|
+
readonly remoteId?: number | null;
|
|
591
1008
|
/**
|
|
592
1009
|
* type
|
|
593
1010
|
*/
|
|
594
|
-
type: string;
|
|
1011
|
+
readonly type: string;
|
|
595
1012
|
/**
|
|
596
1013
|
* updatedAt
|
|
597
1014
|
* @default new Date()
|
|
598
1015
|
*/
|
|
599
|
-
updatedAt
|
|
600
|
-
|
|
1016
|
+
readonly updatedAt: Date;
|
|
1017
|
+
/**
|
|
1018
|
+
* branch id
|
|
1019
|
+
*/
|
|
1020
|
+
branchId?: string | null;
|
|
601
1021
|
/**
|
|
602
1022
|
* id
|
|
603
1023
|
*/
|
|
604
|
-
id:
|
|
1024
|
+
id: number;
|
|
1025
|
+
/**
|
|
1026
|
+
* redoInvalidatedAt
|
|
1027
|
+
*/
|
|
1028
|
+
redoInvalidatedAt?: Date | null;
|
|
605
1029
|
/**
|
|
606
1030
|
* revertChangedAt
|
|
607
1031
|
*/
|
|
@@ -609,7 +1033,7 @@ export declare class RxDBChange implements IEntityStaticType {
|
|
|
609
1033
|
/**
|
|
610
1034
|
* revertChangeId
|
|
611
1035
|
*/
|
|
612
|
-
revertChangeId?:
|
|
1036
|
+
revertChangeId?: number | null;
|
|
613
1037
|
/**
|
|
614
1038
|
* transactionId
|
|
615
1039
|
*/
|
|
@@ -620,63 +1044,52 @@ export declare class RxDBChange implements IEntityStaticType {
|
|
|
620
1044
|
*/
|
|
621
1045
|
constructor(initData?: RxDBChangeInitData);
|
|
622
1046
|
/**
|
|
623
|
-
*
|
|
1047
|
+
* 统计实体数量
|
|
624
1048
|
* @param options 查询选项
|
|
1049
|
+
* @example
|
|
1050
|
+
* RxDBChange.count({ where: { combinator: 'and', rules: [] } }).subscribe(total => console.log(total));
|
|
625
1051
|
*/
|
|
626
1052
|
static count(options: CountOptions<typeof RxDBChange,RxDBChangeRuleGroup>): Observable<number>;
|
|
627
1053
|
/**
|
|
628
|
-
*
|
|
629
|
-
* @param options 查询选项
|
|
630
|
-
*/
|
|
631
|
-
static countAncestors(options?: FindTreeOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>): Observable<number>;
|
|
632
|
-
/**
|
|
633
|
-
* 查询子孙实体数量
|
|
634
|
-
* @param options 查询选项
|
|
635
|
-
*/
|
|
636
|
-
static countDescendants(options?: FindTreeOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>): Observable<number>;
|
|
637
|
-
/**
|
|
638
|
-
* 查询子孙实体数量
|
|
639
|
-
* @param options 查询选项
|
|
640
|
-
*/
|
|
641
|
-
static countRoot(options?: FindTreeRootOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>): Observable<number>;
|
|
642
|
-
/**
|
|
643
|
-
* find 查询
|
|
1054
|
+
* 查询多个实体
|
|
644
1055
|
* @param options 查询选项
|
|
1056
|
+
* @example
|
|
1057
|
+
* RxDBChange.find({ where: { combinator: 'and', rules: [] }] }).subscribe(list => console.log(list));
|
|
645
1058
|
*/
|
|
646
1059
|
static find(options: FindOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange[]>;
|
|
647
1060
|
/**
|
|
648
|
-
*
|
|
1061
|
+
* 查询所有实体
|
|
649
1062
|
* @param options 查询选项
|
|
1063
|
+
* @example
|
|
1064
|
+
* RxDBChange.findAll({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
650
1065
|
*/
|
|
651
1066
|
static findAll(options: FindAllOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange[]>;
|
|
652
1067
|
/**
|
|
653
|
-
*
|
|
1068
|
+
* 游标分页查询
|
|
654
1069
|
* @param options 查询选项
|
|
1070
|
+
* @example
|
|
1071
|
+
* RxDBChange.findByCursor({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
655
1072
|
*/
|
|
656
|
-
static
|
|
1073
|
+
static findByCursor(options: FindByCursorOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange[]>;
|
|
657
1074
|
/**
|
|
658
|
-
*
|
|
659
|
-
* @param options 查询选项
|
|
660
|
-
*/
|
|
661
|
-
static findDescendants(options?: FindTreeOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>): Observable<RxDBChange[]>;
|
|
662
|
-
/**
|
|
663
|
-
* findOne 查询
|
|
1075
|
+
* 查询单个实体,未找到时返回 undefined
|
|
664
1076
|
* @param options 查询选项
|
|
1077
|
+
* @example
|
|
1078
|
+
* RxDBChange.findOne({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
665
1079
|
*/
|
|
666
1080
|
static findOne(options: FindOneOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange | undefined>;
|
|
667
1081
|
/**
|
|
668
|
-
*
|
|
1082
|
+
* 查询单个实体,未找到时抛出错误
|
|
669
1083
|
* @param options 查询选项
|
|
1084
|
+
* @example
|
|
1085
|
+
* RxDBChange.findOneOrFail({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
670
1086
|
*/
|
|
671
1087
|
static findOneOrFail(options: FindOneOrFailOptions<typeof RxDBChange,RxDBChangeRuleGroup,RxDBChangeOrderByField>): Observable<RxDBChange>;
|
|
672
1088
|
/**
|
|
673
|
-
*
|
|
674
|
-
* @param options 查询选项
|
|
675
|
-
*/
|
|
676
|
-
static findRoot(options?: FindTreeRootOptions<typeof RxDBChange,RxDBChangeTreeRuleGroup>): Observable<RxDBChange[]>;
|
|
677
|
-
/**
|
|
678
|
-
* get 查询
|
|
1089
|
+
* 根据 ID 获取单个实体
|
|
679
1090
|
* @param options 查询选项
|
|
1091
|
+
* @example
|
|
1092
|
+
* RxDBChange.get('123').subscribe(entity => console.log(entity));
|
|
680
1093
|
*/
|
|
681
1094
|
static get(options: number): Observable<RxDBChange>;
|
|
682
1095
|
/**
|
|
@@ -696,16 +1109,42 @@ export declare class RxDBChange implements IEntityStaticType {
|
|
|
696
1109
|
/**
|
|
697
1110
|
* RxDBBranch
|
|
698
1111
|
*/
|
|
699
|
-
export declare class RxDBBranch
|
|
1112
|
+
export declare class RxDBBranch {
|
|
1113
|
+
static [ENTITY_STATIC_TYPES]: RxDBBranchStaticTypes;
|
|
700
1114
|
/**
|
|
701
1115
|
* changes
|
|
702
1116
|
*/
|
|
703
|
-
changes$: RelationEntitiesObservable<RxDBChange>;
|
|
704
|
-
|
|
1117
|
+
readonly changes$: RelationEntitiesObservable<RxDBChange>;
|
|
1118
|
+
/**
|
|
1119
|
+
* children
|
|
1120
|
+
*/
|
|
1121
|
+
readonly children$: RelationEntitiesObservable<RxDBBranch>;
|
|
1122
|
+
/**
|
|
1123
|
+
* createdAt
|
|
1124
|
+
* @default new Date()
|
|
1125
|
+
*/
|
|
1126
|
+
readonly createdAt?: Date | null;
|
|
1127
|
+
/**
|
|
1128
|
+
* parent
|
|
1129
|
+
*/
|
|
1130
|
+
readonly parent$: RelationEntityObservable<typeof RxDBBranch>;
|
|
1131
|
+
/**
|
|
1132
|
+
* repositorySyncs
|
|
1133
|
+
*/
|
|
1134
|
+
readonly repositorySyncs$: RelationEntitiesObservable<RxDBRepositorySync>;
|
|
1135
|
+
/**
|
|
1136
|
+
* updatedAt
|
|
1137
|
+
* @default new Date()
|
|
1138
|
+
*/
|
|
1139
|
+
readonly updatedAt?: Date | null;
|
|
705
1140
|
/**
|
|
706
1141
|
* activated
|
|
707
1142
|
*/
|
|
708
1143
|
activated: boolean;
|
|
1144
|
+
/**
|
|
1145
|
+
* fromChangeId
|
|
1146
|
+
*/
|
|
1147
|
+
fromChangeId?: number | null;
|
|
709
1148
|
/**
|
|
710
1149
|
* id
|
|
711
1150
|
*/
|
|
@@ -714,6 +1153,10 @@ export declare class RxDBBranch implements IEntityStaticType {
|
|
|
714
1153
|
* local
|
|
715
1154
|
*/
|
|
716
1155
|
local: boolean;
|
|
1156
|
+
/**
|
|
1157
|
+
* parent id
|
|
1158
|
+
*/
|
|
1159
|
+
parentId?: string | null;
|
|
717
1160
|
/**
|
|
718
1161
|
* remote
|
|
719
1162
|
*/
|
|
@@ -724,33 +1167,90 @@ export declare class RxDBBranch implements IEntityStaticType {
|
|
|
724
1167
|
*/
|
|
725
1168
|
constructor(initData?: RxDBBranchInitData);
|
|
726
1169
|
/**
|
|
727
|
-
*
|
|
1170
|
+
* 统计实体数量
|
|
728
1171
|
* @param options 查询选项
|
|
1172
|
+
* @example
|
|
1173
|
+
* RxDBBranch.count({ where: { combinator: 'and', rules: [] } }).subscribe(total => console.log(total));
|
|
729
1174
|
*/
|
|
730
1175
|
static count(options: CountOptions<typeof RxDBBranch,RxDBBranchRuleGroup>): Observable<number>;
|
|
731
1176
|
/**
|
|
732
|
-
*
|
|
1177
|
+
* 统计祖先实体数量(不包含自身)
|
|
1178
|
+
* @param options 查询选项
|
|
1179
|
+
* @example
|
|
1180
|
+
* // 统计某节点的祖先层级深度
|
|
1181
|
+
RxDBBranch.countAncestors({ entityId: grand.id }).subscribe(depth => console.log(depth));
|
|
1182
|
+
*/
|
|
1183
|
+
static countAncestors(options?: FindTreeOptions<typeof RxDBBranch,RxDBBranchTreeRuleGroup>): Observable<number>;
|
|
1184
|
+
/**
|
|
1185
|
+
* 统计子孙实体数量(不包含自身)
|
|
1186
|
+
* @param options 查询选项
|
|
1187
|
+
* @example
|
|
1188
|
+
* // 统计某节点下的后代数量
|
|
1189
|
+
RxDBBranch.countDescendants({ entityId: root.id }).subscribe(count => console.log(count));
|
|
1190
|
+
*/
|
|
1191
|
+
static countDescendants(options?: FindTreeOptions<typeof RxDBBranch,RxDBBranchTreeRuleGroup>): Observable<number>;
|
|
1192
|
+
/**
|
|
1193
|
+
* 查询多个实体
|
|
733
1194
|
* @param options 查询选项
|
|
1195
|
+
* @example
|
|
1196
|
+
* RxDBBranch.find({ where: { combinator: 'and', rules: [] }] }).subscribe(list => console.log(list));
|
|
734
1197
|
*/
|
|
735
1198
|
static find(options: FindOptions<typeof RxDBBranch,RxDBBranchRuleGroup,RxDBBranchOrderByField>): Observable<RxDBBranch[]>;
|
|
736
1199
|
/**
|
|
737
|
-
*
|
|
1200
|
+
* 查询所有实体
|
|
738
1201
|
* @param options 查询选项
|
|
1202
|
+
* @example
|
|
1203
|
+
* RxDBBranch.findAll({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
739
1204
|
*/
|
|
740
1205
|
static findAll(options: FindAllOptions<typeof RxDBBranch,RxDBBranchRuleGroup,RxDBBranchOrderByField>): Observable<RxDBBranch[]>;
|
|
741
1206
|
/**
|
|
742
|
-
*
|
|
1207
|
+
* 查询祖先实体(包含自身)
|
|
1208
|
+
* @param options 查询选项
|
|
1209
|
+
* @example
|
|
1210
|
+
* // 查询某节点的所有祖先(面包屑导航)
|
|
1211
|
+
RxDBBranch.findAncestors({ entityId: grand.id }).subscribe(ancestors => console.log(ancestors));
|
|
1212
|
+
|
|
1213
|
+
// 仅查询直接父节点(level 1)
|
|
1214
|
+
RxDBBranch.findAncestors({ entityId: grand.id, level: 1 }).subscribe(parents => console.log(parents));
|
|
1215
|
+
*/
|
|
1216
|
+
static findAncestors(options?: FindTreeOptions<typeof RxDBBranch,RxDBBranchTreeRuleGroup>): Observable<RxDBBranch[]>;
|
|
1217
|
+
/**
|
|
1218
|
+
* 游标分页查询
|
|
1219
|
+
* @param options 查询选项
|
|
1220
|
+
* @example
|
|
1221
|
+
* RxDBBranch.findByCursor({ where: { combinator: 'and', rules: [] } }).subscribe(list => console.log(list));
|
|
1222
|
+
*/
|
|
1223
|
+
static findByCursor(options: FindByCursorOptions<typeof RxDBBranch,RxDBBranchRuleGroup,RxDBBranchOrderByField>): Observable<RxDBBranch[]>;
|
|
1224
|
+
/**
|
|
1225
|
+
* 查询子孙实体(包含自身)
|
|
1226
|
+
* @param options 查询选项
|
|
1227
|
+
* @example
|
|
1228
|
+
* // 查询某节点的所有后代
|
|
1229
|
+
RxDBBranch.findDescendants({ entityId: root.id }).subscribe(list => console.log(list));
|
|
1230
|
+
|
|
1231
|
+
// 仅查询直接子节点(level 1)
|
|
1232
|
+
RxDBBranch.findDescendants({ entityId: root.id, level: 1 }).subscribe(children => console.log(children));
|
|
1233
|
+
*/
|
|
1234
|
+
static findDescendants(options?: FindTreeOptions<typeof RxDBBranch,RxDBBranchTreeRuleGroup>): Observable<RxDBBranch[]>;
|
|
1235
|
+
/**
|
|
1236
|
+
* 查询单个实体,未找到时返回 undefined
|
|
743
1237
|
* @param options 查询选项
|
|
1238
|
+
* @example
|
|
1239
|
+
* RxDBBranch.findOne({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
744
1240
|
*/
|
|
745
1241
|
static findOne(options: FindOneOptions<typeof RxDBBranch,RxDBBranchRuleGroup,RxDBBranchOrderByField>): Observable<RxDBBranch | undefined>;
|
|
746
1242
|
/**
|
|
747
|
-
*
|
|
1243
|
+
* 查询单个实体,未找到时抛出错误
|
|
748
1244
|
* @param options 查询选项
|
|
1245
|
+
* @example
|
|
1246
|
+
* RxDBBranch.findOneOrFail({ where: { combinator: 'and', rules: [] } }).subscribe(entity => console.log(entity));
|
|
749
1247
|
*/
|
|
750
1248
|
static findOneOrFail(options: FindOneOrFailOptions<typeof RxDBBranch,RxDBBranchRuleGroup,RxDBBranchOrderByField>): Observable<RxDBBranch>;
|
|
751
1249
|
/**
|
|
752
|
-
*
|
|
1250
|
+
* 根据 ID 获取单个实体
|
|
753
1251
|
* @param options 查询选项
|
|
1252
|
+
* @example
|
|
1253
|
+
* RxDBBranch.get('123').subscribe(entity => console.log(entity));
|
|
754
1254
|
*/
|
|
755
1255
|
static get(options: string): Observable<RxDBBranch>;
|
|
756
1256
|
/**
|