@sankhyalabs/core-docs 5.20.0-dev.5 → 5.20.0-dev.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -1
- package/classes/ApplicationContext.md +31 -32
- package/classes/ArrayUtils.md +95 -83
- package/classes/AuthorizedServiceCaller.md +25 -34
- package/classes/Change.md +59 -74
- package/classes/DataUnit.md +1180 -1086
- package/classes/DataUnitAction.md +25 -42
- package/classes/DataUnitStorage.md +40 -43
- package/classes/DateUtils.md +140 -133
- package/classes/ElementIDUtils.md +123 -122
- package/classes/ErrorException.md +67 -88
- package/classes/ErrorTracking.md +20 -23
- package/classes/FieldComparator.md +35 -39
- package/classes/FloatingManager.md +195 -198
- package/classes/HTMLBuilder.md +14 -20
- package/classes/HttpProvider.md +45 -41
- package/classes/IDBRepository.md +201 -196
- package/classes/JSUtils.md +65 -66
- package/classes/KeyboardManager.md +95 -87
- package/classes/{MaskFormatter-1.md → MaskFormatter.md} +93 -128
- package/classes/NumberUtils.md +163 -152
- package/classes/ObjectUtils.md +206 -70
- package/classes/OnboardingUtils.md +36 -51
- package/classes/OverflowWatcher.md +533 -0
- package/classes/PromiseSync.md +25 -42
- package/classes/ReadyUtil.md +31 -41
- package/classes/RequestMetadata.md +29 -30
- package/classes/SearchUtils.md +18 -20
- package/classes/SelectionInfo.md +73 -74
- package/classes/ServiceCanceledException.md +193 -0
- package/classes/SkwHttpProvider.md +33 -45
- package/classes/StringUtils.md +297 -322
- package/classes/TimeFormatter.md +43 -44
- package/classes/UserAgentUtils.md +17 -20
- package/classes/VersionUtils.md +15 -18
- package/classes/WaitingChangeException.md +63 -84
- package/classes/WarningException.md +67 -88
- package/enumerations/Action.md +317 -0
- package/enumerations/ChangeOperation.md +47 -0
- package/enumerations/DataType.md +57 -0
- package/enumerations/DependencyType.md +37 -0
- package/enumerations/OverflowDirection.md +29 -0
- package/enumerations/SelectionMode.md +27 -0
- package/enumerations/SortMode.md +27 -0
- package/enumerations/UserInterface.md +177 -0
- package/functions/defaultDataLoader.md +25 -0
- package/{modules.md → globals.md} +27 -36
- package/interfaces/ChildDescriptor.md +12 -16
- package/interfaces/ChildLink.md +9 -12
- package/interfaces/DUActionInterceptor.md +10 -14
- package/interfaces/ExecutionContext.md +17 -32
- package/interfaces/FieldDescriptor.md +52 -66
- package/interfaces/Filter.md +13 -17
- package/interfaces/IElementIDInfo.md +11 -14
- package/interfaces/ILoadResult.md +11 -16
- package/interfaces/IRepository.md +106 -93
- package/interfaces/IRepositoryIndex.md +23 -30
- package/interfaces/LoadDataRequest.md +36 -45
- package/interfaces/LoadDataResponse.md +11 -14
- package/interfaces/OverFlowWatcherParams.md +67 -0
- package/interfaces/PageRequest.md +16 -20
- package/interfaces/PaginationInfo.md +24 -31
- package/interfaces/PromiseSyncCallback.md +13 -17
- package/interfaces/QuickFilter.md +17 -21
- package/interfaces/Record.md +26 -33
- package/interfaces/SavedRecord.md +33 -41
- package/interfaces/Sort.md +12 -16
- package/interfaces/SortingProvider.md +10 -13
- package/interfaces/UnitMetadata.md +16 -21
- package/interfaces/WaitingChange.md +16 -20
- package/namespaces/MaskFormatter/README.md +17 -0
- package/namespaces/MaskFormatter/type-aliases/MaskCharacter.md +13 -0
- package/namespaces/MaskFormatter/variables/MaskCharacter.md +13 -0
- package/package.json +1 -1
- package/type-aliases/DataUnitEventOptions.md +17 -0
- package/type-aliases/OnOverflowCallBack.md +25 -0
- package/variables/OVERFLOWED_CLASS_NAME.md +13 -0
- package/enums/Action.md +0 -305
- package/enums/ChangeOperation.md +0 -52
- package/enums/DataType.md +0 -63
- package/enums/DependencyType.md +0 -41
- package/enums/SelectionMode.md +0 -30
- package/enums/SortMode.md +0 -30
- package/enums/UserInterface.md +0 -195
- package/modules/MaskFormatter.md +0 -37
package/classes/IDBRepository.md
CHANGED
@@ -1,6 +1,10 @@
|
|
1
|
-
[
|
1
|
+
[**@sankhyalabs/core**](../README.md) • **Docs**
|
2
2
|
|
3
|
-
|
3
|
+
***
|
4
|
+
|
5
|
+
[@sankhyalabs/core](../globals.md) / IDBRepository
|
6
|
+
|
7
|
+
# Class: IDBRepository\<T\>
|
4
8
|
|
5
9
|
Abstração para simplificar o uso do indexed DB
|
6
10
|
|
@@ -11,74 +15,45 @@ além de permitir filtros e ordenações compostas
|
|
11
15
|
|
12
16
|
## Type parameters
|
13
17
|
|
14
|
-
|
15
|
-
| :------ |
|
16
|
-
| `T` |
|
18
|
+
• **T**
|
17
19
|
|
18
20
|
## Implements
|
19
21
|
|
20
|
-
- [`IRepository`](../interfaces/IRepository.md)
|
22
|
+
- [`IRepository`](../interfaces/IRepository.md)\<`T`\>
|
21
23
|
|
22
|
-
##
|
24
|
+
## Constructors
|
23
25
|
|
24
|
-
###
|
26
|
+
### new IDBRepository()
|
25
27
|
|
26
|
-
|
28
|
+
> **new IDBRepository**\<`T`\>(`dbName`, `dbVersion`, `storeName`, `indexKeyPath`, `indexes`?): [`IDBRepository`](IDBRepository.md)\<`T`\>
|
27
29
|
|
28
|
-
|
30
|
+
Construtor padrão
|
29
31
|
|
30
|
-
|
31
|
-
- [\_db](IDBRepository.md#_db)
|
32
|
-
- [\_dbName](IDBRepository.md#_dbname)
|
33
|
-
- [\_dbVersion](IDBRepository.md#_dbversion)
|
34
|
-
- [\_indexKeyPath](IDBRepository.md#_indexkeypath)
|
35
|
-
- [\_indexes](IDBRepository.md#_indexes)
|
36
|
-
- [\_operating](IDBRepository.md#_operating)
|
37
|
-
- [\_storeName](IDBRepository.md#_storename)
|
32
|
+
#### Parameters
|
38
33
|
|
39
|
-
|
34
|
+
• **dbName**: `string`
|
40
35
|
|
41
|
-
|
42
|
-
- [count](IDBRepository.md#count)
|
43
|
-
- [createStore](IDBRepository.md#createstore)
|
44
|
-
- [delete](IDBRepository.md#delete)
|
45
|
-
- [distict](IDBRepository.md#distict)
|
46
|
-
- [getAddedItems](IDBRepository.md#getaddeditems)
|
47
|
-
- [getItemPosition](IDBRepository.md#getitemposition)
|
48
|
-
- [getItemPositionByAdded](IDBRepository.md#getitempositionbyadded)
|
49
|
-
- [insert](IDBRepository.md#insert)
|
50
|
-
- [isEmpty](IDBRepository.md#isempty)
|
51
|
-
- [isOperating](IDBRepository.md#isoperating)
|
52
|
-
- [load](IDBRepository.md#load)
|
53
|
-
- [openDB](IDBRepository.md#opendb)
|
54
|
-
- [push](IDBRepository.md#push)
|
55
|
-
- [update](IDBRepository.md#update)
|
36
|
+
Nome do DB
|
56
37
|
|
57
|
-
|
38
|
+
• **dbVersion**: `number`
|
58
39
|
|
59
|
-
|
40
|
+
Versão do DB
|
60
41
|
|
61
|
-
• **
|
42
|
+
• **storeName**: `string`
|
62
43
|
|
63
|
-
|
44
|
+
Nome da store
|
64
45
|
|
65
|
-
|
46
|
+
• **indexKeyPath**: `string`
|
66
47
|
|
67
|
-
|
68
|
-
| :------ |
|
69
|
-
| `T` |
|
48
|
+
Um atributo que identifique os objetos guardados
|
70
49
|
|
71
|
-
|
50
|
+
• **indexes?**: [`IRepositoryIndex`](../interfaces/IRepositoryIndex.md)[]
|
72
51
|
|
73
|
-
|
74
|
-
| :------ | :------ | :------ |
|
75
|
-
| `dbName` | `string` | Nome do DB |
|
76
|
-
| `dbVersion` | `number` | Versão do DB |
|
77
|
-
| `storeName` | `string` | Nome da store |
|
78
|
-
| `indexKeyPath` | `string` | Um atributo que identifique os objetos guardados |
|
79
|
-
| `indexes?` | [`IRepositoryIndex`](../interfaces/IRepositoryIndex.md)[] | - |
|
52
|
+
#### Returns
|
80
53
|
|
81
|
-
|
54
|
+
[`IDBRepository`](IDBRepository.md)\<`T`\>
|
55
|
+
|
56
|
+
#### Source
|
82
57
|
|
83
58
|
src/repository/indexeddb/IDBRepository.ts:35
|
84
59
|
|
@@ -86,320 +61,341 @@ src/repository/indexeddb/IDBRepository.ts:35
|
|
86
61
|
|
87
62
|
### \_addedStoreName
|
88
63
|
|
89
|
-
|
64
|
+
> `private` **\_addedStoreName**: `string`
|
90
65
|
|
91
|
-
####
|
66
|
+
#### Source
|
92
67
|
|
93
68
|
src/repository/indexeddb/IDBRepository.ts:21
|
94
69
|
|
95
|
-
|
70
|
+
***
|
96
71
|
|
97
|
-
### \_db
|
72
|
+
### \_db?
|
98
73
|
|
99
|
-
|
74
|
+
> `private` `optional` **\_db**: `IDBPDatabase`\<`unknown`\>
|
100
75
|
|
101
|
-
####
|
76
|
+
#### Source
|
102
77
|
|
103
78
|
src/repository/indexeddb/IDBRepository.ts:24
|
104
79
|
|
105
|
-
|
80
|
+
***
|
106
81
|
|
107
82
|
### \_dbName
|
108
83
|
|
109
|
-
|
84
|
+
> `private` **\_dbName**: `string`
|
110
85
|
|
111
|
-
####
|
86
|
+
#### Source
|
112
87
|
|
113
88
|
src/repository/indexeddb/IDBRepository.ts:18
|
114
89
|
|
115
|
-
|
90
|
+
***
|
116
91
|
|
117
92
|
### \_dbVersion
|
118
93
|
|
119
|
-
|
94
|
+
> `private` **\_dbVersion**: `number`
|
120
95
|
|
121
|
-
####
|
96
|
+
#### Source
|
122
97
|
|
123
98
|
src/repository/indexeddb/IDBRepository.ts:19
|
124
99
|
|
125
|
-
|
100
|
+
***
|
126
101
|
|
127
102
|
### \_indexKeyPath
|
128
103
|
|
129
|
-
|
104
|
+
> `private` **\_indexKeyPath**: `string`
|
130
105
|
|
131
|
-
####
|
106
|
+
#### Source
|
132
107
|
|
133
108
|
src/repository/indexeddb/IDBRepository.ts:22
|
134
109
|
|
135
|
-
|
110
|
+
***
|
136
111
|
|
137
|
-
### \_indexes
|
112
|
+
### \_indexes?
|
138
113
|
|
139
|
-
|
114
|
+
> `private` `optional` **\_indexes**: [`IRepositoryIndex`](../interfaces/IRepositoryIndex.md)[]
|
140
115
|
|
141
|
-
####
|
116
|
+
#### Source
|
142
117
|
|
143
118
|
src/repository/indexeddb/IDBRepository.ts:23
|
144
119
|
|
145
|
-
|
120
|
+
***
|
146
121
|
|
147
122
|
### \_operating
|
148
123
|
|
149
|
-
|
124
|
+
> `private` **\_operating**: `boolean` = `true`
|
150
125
|
|
151
|
-
####
|
126
|
+
#### Source
|
152
127
|
|
153
128
|
src/repository/indexeddb/IDBRepository.ts:25
|
154
129
|
|
155
|
-
|
130
|
+
***
|
156
131
|
|
157
132
|
### \_storeName
|
158
133
|
|
159
|
-
|
134
|
+
> `private` **\_storeName**: `string`
|
160
135
|
|
161
|
-
####
|
136
|
+
#### Source
|
162
137
|
|
163
138
|
src/repository/indexeddb/IDBRepository.ts:20
|
164
139
|
|
165
140
|
## Methods
|
166
141
|
|
167
|
-
### clear
|
142
|
+
### clear()
|
168
143
|
|
169
|
-
|
144
|
+
> **clear**(): `Promise`\<`void`\>
|
170
145
|
|
171
146
|
Limpa todo o repositório
|
172
147
|
|
173
148
|
#### Returns
|
174
149
|
|
175
|
-
`Promise
|
150
|
+
`Promise`\<`void`\>
|
176
151
|
|
177
152
|
Promessa de execução
|
178
153
|
|
179
154
|
#### Implementation of
|
180
155
|
|
181
|
-
[IRepository](../interfaces/IRepository.md).[clear](../interfaces/IRepository.md#clear)
|
156
|
+
[`IRepository`](../interfaces/IRepository.md).[`clear`](../interfaces/IRepository.md#clear)
|
182
157
|
|
183
|
-
####
|
158
|
+
#### Source
|
184
159
|
|
185
160
|
src/repository/indexeddb/IDBRepository.ts:123
|
186
161
|
|
187
|
-
|
162
|
+
***
|
188
163
|
|
189
|
-
### count
|
164
|
+
### count()
|
190
165
|
|
191
|
-
|
166
|
+
> **count**(): `Promise`\<`number`\>
|
192
167
|
|
193
168
|
Conta os itens do repositório
|
194
169
|
|
195
170
|
#### Returns
|
196
171
|
|
197
|
-
`Promise
|
172
|
+
`Promise`\<`number`\>
|
198
173
|
|
199
174
|
Promessa de quantidade
|
200
175
|
|
201
176
|
#### Implementation of
|
202
177
|
|
203
|
-
[IRepository](../interfaces/IRepository.md).[count](../interfaces/IRepository.md#count)
|
178
|
+
[`IRepository`](../interfaces/IRepository.md).[`count`](../interfaces/IRepository.md#count)
|
204
179
|
|
205
|
-
####
|
180
|
+
#### Source
|
206
181
|
|
207
182
|
src/repository/indexeddb/IDBRepository.ts:236
|
208
183
|
|
209
|
-
|
184
|
+
***
|
210
185
|
|
211
|
-
### createStore
|
186
|
+
### createStore()
|
212
187
|
|
213
|
-
|
188
|
+
> `private` **createStore**(`db`, `name`, `indexPrefix`): `void`
|
214
189
|
|
215
190
|
#### Parameters
|
216
191
|
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
192
|
+
• **db**: `IDBPDatabase`\<`unknown`\>
|
193
|
+
|
194
|
+
• **name**: `string`
|
195
|
+
|
196
|
+
• **indexPrefix**: `string`= `""`
|
222
197
|
|
223
198
|
#### Returns
|
224
199
|
|
225
200
|
`void`
|
226
201
|
|
227
|
-
####
|
202
|
+
#### Source
|
228
203
|
|
229
204
|
src/repository/indexeddb/IDBRepository.ts:271
|
230
205
|
|
231
|
-
|
206
|
+
***
|
232
207
|
|
233
|
-
### delete
|
208
|
+
### delete()
|
234
209
|
|
235
|
-
|
210
|
+
> **delete**(`items`): `Promise`\<`void`\>
|
236
211
|
|
237
212
|
Remove itens do repositório
|
238
213
|
|
239
214
|
#### Parameters
|
240
215
|
|
241
|
-
|
242
|
-
|
243
|
-
|
216
|
+
• **items**: `T`[]
|
217
|
+
|
218
|
+
Os itens a serem removidos
|
244
219
|
|
245
220
|
#### Returns
|
246
221
|
|
247
|
-
`Promise
|
222
|
+
`Promise`\<`void`\>
|
248
223
|
|
249
224
|
Promessa de execução
|
250
225
|
|
251
226
|
#### Implementation of
|
252
227
|
|
253
|
-
[IRepository](../interfaces/IRepository.md).[delete](../interfaces/IRepository.md#delete)
|
228
|
+
[`IRepository`](../interfaces/IRepository.md).[`delete`](../interfaces/IRepository.md#delete)
|
254
229
|
|
255
|
-
####
|
230
|
+
#### Source
|
256
231
|
|
257
232
|
src/repository/indexeddb/IDBRepository.ts:138
|
258
233
|
|
259
|
-
|
234
|
+
***
|
260
235
|
|
261
|
-
### distict
|
236
|
+
### distict()
|
262
237
|
|
263
|
-
|
238
|
+
> **distict**(`itemProcessor`): `Promise`\<`Map`\<`string`, `any`\>\>
|
264
239
|
|
265
240
|
Itera todos os items colecionando os valores distintos.
|
266
241
|
|
267
242
|
#### Parameters
|
268
243
|
|
269
|
-
|
270
|
-
|
271
|
-
|
244
|
+
• **itemProcessor**
|
245
|
+
|
246
|
+
Uma função que processa um item e gera a chave e valor
|
272
247
|
|
273
248
|
#### Returns
|
274
249
|
|
275
|
-
`Promise
|
250
|
+
`Promise`\<`Map`\<`string`, `any`\>\>
|
276
251
|
|
277
252
|
Promessa de array com os valores distintos.
|
278
253
|
|
279
254
|
#### Implementation of
|
280
255
|
|
281
|
-
[IRepository](../interfaces/IRepository.md).[distict](../interfaces/IRepository.md#distict)
|
256
|
+
[`IRepository`](../interfaces/IRepository.md).[`distict`](../interfaces/IRepository.md#distict)
|
282
257
|
|
283
|
-
####
|
258
|
+
#### Source
|
284
259
|
|
285
260
|
src/repository/indexeddb/IDBRepository.ts:78
|
286
261
|
|
287
|
-
|
262
|
+
***
|
288
263
|
|
289
|
-
### getAddedItems
|
264
|
+
### getAddedItems()
|
290
265
|
|
291
|
-
|
266
|
+
> `private` **getAddedItems**(`db`): `Promise`\<`IAddedItem`\<`T`\>[]\>
|
292
267
|
|
293
268
|
#### Parameters
|
294
269
|
|
295
|
-
|
296
|
-
| :------ | :------ |
|
297
|
-
| `db` | `IDBPDatabase`<`unknown`\> |
|
270
|
+
• **db**: `IDBPDatabase`\<`unknown`\>
|
298
271
|
|
299
272
|
#### Returns
|
300
273
|
|
301
|
-
`Promise
|
274
|
+
`Promise`\<`IAddedItem`\<`T`\>[]\>
|
302
275
|
|
303
|
-
####
|
276
|
+
#### Source
|
304
277
|
|
305
278
|
src/repository/indexeddb/IDBRepository.ts:319
|
306
279
|
|
307
|
-
|
280
|
+
***
|
281
|
+
|
282
|
+
### getFromCache()
|
283
|
+
|
284
|
+
> **getFromCache**(): `undefined` \| `T`[]
|
308
285
|
|
309
|
-
|
286
|
+
Retorna todos os registros que estão em cache no momento
|
310
287
|
|
311
|
-
|
288
|
+
#### Returns
|
289
|
+
|
290
|
+
`undefined` \| `T`[]
|
291
|
+
|
292
|
+
Todos registros que estão em cache no momento
|
293
|
+
|
294
|
+
#### Implementation of
|
295
|
+
|
296
|
+
[`IRepository`](../interfaces/IRepository.md).[`getFromCache`](../interfaces/IRepository.md#getfromcache)
|
297
|
+
|
298
|
+
#### Source
|
299
|
+
|
300
|
+
src/repository/indexeddb/IDBRepository.ts:324
|
301
|
+
|
302
|
+
***
|
303
|
+
|
304
|
+
### getItemPosition()
|
305
|
+
|
306
|
+
> `private` **getItemPosition**(`db`, `itemTest`): `Promise`\<`number`\>
|
312
307
|
|
313
308
|
#### Parameters
|
314
309
|
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
| `itemTest` | (`item`: `any`) => `boolean` |
|
310
|
+
• **db**: `IDBPDatabase`\<`unknown`\>
|
311
|
+
|
312
|
+
• **itemTest**
|
319
313
|
|
320
314
|
#### Returns
|
321
315
|
|
322
|
-
`Promise
|
316
|
+
`Promise`\<`number`\>
|
323
317
|
|
324
|
-
####
|
318
|
+
#### Source
|
325
319
|
|
326
320
|
src/repository/indexeddb/IDBRepository.ts:284
|
327
321
|
|
328
|
-
|
322
|
+
***
|
329
323
|
|
330
|
-
### getItemPositionByAdded
|
324
|
+
### getItemPositionByAdded()
|
331
325
|
|
332
|
-
|
326
|
+
> `private` **getItemPositionByAdded**(`db`, `itemTest`): `Promise`\<`number`\>
|
333
327
|
|
334
328
|
#### Parameters
|
335
329
|
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
| `itemTest` | (`item`: `any`) => `boolean` |
|
330
|
+
• **db**: `IDBPDatabase`\<`unknown`\>
|
331
|
+
|
332
|
+
• **itemTest**
|
340
333
|
|
341
334
|
#### Returns
|
342
335
|
|
343
|
-
`Promise
|
336
|
+
`Promise`\<`number`\>
|
344
337
|
|
345
|
-
####
|
338
|
+
#### Source
|
346
339
|
|
347
340
|
src/repository/indexeddb/IDBRepository.ts:307
|
348
341
|
|
349
|
-
|
342
|
+
***
|
350
343
|
|
351
|
-
### insert
|
344
|
+
### insert()
|
352
345
|
|
353
|
-
|
346
|
+
> **insert**(`itemReference`, `items`): `Promise`\<`void`\>
|
354
347
|
|
355
348
|
Insere itens em uma posição de referência
|
356
349
|
|
357
350
|
#### Parameters
|
358
351
|
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
352
|
+
• **itemReference**: `T`
|
353
|
+
|
354
|
+
O item posterior aos inseridos
|
355
|
+
|
356
|
+
• **items**: `T`[]
|
357
|
+
|
358
|
+
Os itens a serem inseridos
|
363
359
|
|
364
360
|
#### Returns
|
365
361
|
|
366
|
-
`Promise
|
362
|
+
`Promise`\<`void`\>
|
367
363
|
|
368
364
|
Promessa de execução
|
369
365
|
|
370
366
|
#### Implementation of
|
371
367
|
|
372
|
-
[IRepository](../interfaces/IRepository.md).[insert](../interfaces/IRepository.md#insert)
|
368
|
+
[`IRepository`](../interfaces/IRepository.md).[`insert`](../interfaces/IRepository.md#insert)
|
373
369
|
|
374
|
-
####
|
370
|
+
#### Source
|
375
371
|
|
376
372
|
src/repository/indexeddb/IDBRepository.ts:194
|
377
373
|
|
378
|
-
|
374
|
+
***
|
379
375
|
|
380
|
-
### isEmpty
|
376
|
+
### isEmpty()
|
381
377
|
|
382
|
-
|
378
|
+
> **isEmpty**(): `Promise`\<`boolean`\>
|
383
379
|
|
384
380
|
Determina se o repositório está vazio ou ainda não foi criado.
|
385
381
|
|
386
382
|
#### Returns
|
387
383
|
|
388
|
-
`Promise
|
384
|
+
`Promise`\<`boolean`\>
|
389
385
|
|
390
386
|
#### Implementation of
|
391
387
|
|
392
|
-
[IRepository](../interfaces/IRepository.md).[isEmpty](../interfaces/IRepository.md#isempty)
|
388
|
+
[`IRepository`](../interfaces/IRepository.md).[`isEmpty`](../interfaces/IRepository.md#isempty)
|
393
389
|
|
394
|
-
####
|
390
|
+
#### Source
|
395
391
|
|
396
392
|
src/repository/indexeddb/IDBRepository.ts:218
|
397
393
|
|
398
|
-
|
394
|
+
***
|
399
395
|
|
400
|
-
### isOperating
|
396
|
+
### isOperating()
|
401
397
|
|
402
|
-
|
398
|
+
> **isOperating**(): `boolean`
|
403
399
|
|
404
400
|
Determina se o repositório está em condições normais de funcionamento.
|
405
401
|
Caso o banco tenha sido excluido, retorna false.
|
@@ -410,109 +406,118 @@ Caso o banco tenha sido excluido, retorna false.
|
|
410
406
|
|
411
407
|
#### Implementation of
|
412
408
|
|
413
|
-
[IRepository](../interfaces/IRepository.md).[isOperating](../interfaces/IRepository.md#isoperating)
|
409
|
+
[`IRepository`](../interfaces/IRepository.md).[`isOperating`](../interfaces/IRepository.md#isoperating)
|
414
410
|
|
415
|
-
####
|
411
|
+
#### Source
|
416
412
|
|
417
413
|
src/repository/indexeddb/IDBRepository.ts:214
|
418
414
|
|
419
|
-
|
415
|
+
***
|
420
416
|
|
421
|
-
### load
|
417
|
+
### load()
|
422
418
|
|
423
|
-
|
419
|
+
> **load**(`filterFunction`?, `sortingFunction`?, `offset`?, `limit`?): `Promise`\<[`ILoadResult`](../interfaces/ILoadResult.md)\<`T`\>\>
|
424
420
|
|
425
421
|
Recupera registros do repositório
|
426
422
|
|
427
423
|
#### Parameters
|
428
424
|
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
425
|
+
• **filterFunction?**
|
426
|
+
|
427
|
+
Teste para determinar se um registro está no universo desejado
|
428
|
+
|
429
|
+
• **sortingFunction?**
|
430
|
+
|
431
|
+
Critério comparação para ordenação
|
432
|
+
|
433
|
+
• **offset?**: `number`
|
434
|
+
|
435
|
+
Determina que o resultado descarta os registros iniciais
|
436
|
+
|
437
|
+
• **limit?**: `number`
|
438
|
+
|
439
|
+
Descarta o resultado a partir de uma quantidade de registros
|
435
440
|
|
436
441
|
#### Returns
|
437
442
|
|
438
|
-
`Promise
|
443
|
+
`Promise`\<[`ILoadResult`](../interfaces/ILoadResult.md)\<`T`\>\>
|
439
444
|
|
440
445
|
Promessa de um array que satisfaça aos critérios informados
|
441
446
|
|
442
447
|
#### Implementation of
|
443
448
|
|
444
|
-
[IRepository](../interfaces/IRepository.md).[load](../interfaces/IRepository.md#load)
|
449
|
+
[`IRepository`](../interfaces/IRepository.md).[`load`](../interfaces/IRepository.md#load)
|
445
450
|
|
446
|
-
####
|
451
|
+
#### Source
|
447
452
|
|
448
453
|
src/repository/indexeddb/IDBRepository.ts:44
|
449
454
|
|
450
|
-
|
455
|
+
***
|
451
456
|
|
452
|
-
### openDB
|
457
|
+
### openDB()
|
453
458
|
|
454
|
-
|
459
|
+
> `private` **openDB**(): `Promise`\<`IDBPDatabase`\<`unknown`\>\>
|
455
460
|
|
456
461
|
#### Returns
|
457
462
|
|
458
|
-
`Promise
|
463
|
+
`Promise`\<`IDBPDatabase`\<`unknown`\>\>
|
459
464
|
|
460
|
-
####
|
465
|
+
#### Source
|
461
466
|
|
462
467
|
src/repository/indexeddb/IDBRepository.ts:250
|
463
468
|
|
464
|
-
|
469
|
+
***
|
465
470
|
|
466
|
-
### push
|
471
|
+
### push()
|
467
472
|
|
468
|
-
|
473
|
+
> **push**(`items`): `Promise`\<`void`\>
|
469
474
|
|
470
475
|
Adiciona registros no final do repositório
|
471
476
|
|
472
477
|
#### Parameters
|
473
478
|
|
474
|
-
|
475
|
-
|
476
|
-
|
479
|
+
• **items**: `T`[]
|
480
|
+
|
481
|
+
Os items a serem adicionados
|
477
482
|
|
478
483
|
#### Returns
|
479
484
|
|
480
|
-
`Promise
|
485
|
+
`Promise`\<`void`\>
|
481
486
|
|
482
487
|
Promessa de execução
|
483
488
|
|
484
489
|
#### Implementation of
|
485
490
|
|
486
|
-
[IRepository](../interfaces/IRepository.md).[push](../interfaces/IRepository.md#push)
|
491
|
+
[`IRepository`](../interfaces/IRepository.md).[`push`](../interfaces/IRepository.md#push)
|
487
492
|
|
488
|
-
####
|
493
|
+
#### Source
|
489
494
|
|
490
495
|
src/repository/indexeddb/IDBRepository.ts:103
|
491
496
|
|
492
|
-
|
497
|
+
***
|
493
498
|
|
494
|
-
### update
|
499
|
+
### update()
|
495
500
|
|
496
|
-
|
501
|
+
> **update**(`items`): `Promise`\<`void`\>
|
497
502
|
|
498
503
|
Altera itens já persistido no repositório
|
499
504
|
|
500
505
|
#### Parameters
|
501
506
|
|
502
|
-
|
503
|
-
|
504
|
-
|
507
|
+
• **items**: `T`[]
|
508
|
+
|
509
|
+
Os itens a serem alterados
|
505
510
|
|
506
511
|
#### Returns
|
507
512
|
|
508
|
-
`Promise
|
513
|
+
`Promise`\<`void`\>
|
509
514
|
|
510
515
|
Promessa de execução
|
511
516
|
|
512
517
|
#### Implementation of
|
513
518
|
|
514
|
-
[IRepository](../interfaces/IRepository.md).[update](../interfaces/IRepository.md#update)
|
519
|
+
[`IRepository`](../interfaces/IRepository.md).[`update`](../interfaces/IRepository.md#update)
|
515
520
|
|
516
|
-
####
|
521
|
+
#### Source
|
517
522
|
|
518
523
|
src/repository/indexeddb/IDBRepository.ts:165
|