klauz-db 0.3.0 → 0.3.1
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 +58 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -529,4 +529,61 @@ console.log("collection.findAll(): ", collection.findAll());
|
|
|
529
529
|
]
|
|
530
530
|
//
|
|
531
531
|
```
|
|
532
|
-
<br>
|
|
532
|
+
<br>
|
|
533
|
+
|
|
534
|
+
### reset
|
|
535
|
+
Apaga todos os dados inseridos na Collection.
|
|
536
|
+
|
|
537
|
+
#### Syntax
|
|
538
|
+
```js
|
|
539
|
+
collection.reset()
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
#### Retorno
|
|
543
|
+
Não possui retorno;
|
|
544
|
+
|
|
545
|
+
#### Exemplo
|
|
546
|
+
```js
|
|
547
|
+
// Adicionando dados
|
|
548
|
+
collection.addMany([
|
|
549
|
+
{
|
|
550
|
+
nome: 'User_1',
|
|
551
|
+
admin: false
|
|
552
|
+
},
|
|
553
|
+
{
|
|
554
|
+
nome: 'User_2',
|
|
555
|
+
admin: false
|
|
556
|
+
}
|
|
557
|
+
])
|
|
558
|
+
|
|
559
|
+
|
|
560
|
+
// Resetando os dados
|
|
561
|
+
|
|
562
|
+
console.log("collection.findAll(): ", collection.findAll());
|
|
563
|
+
// Consulta antes:
|
|
564
|
+
[
|
|
565
|
+
{
|
|
566
|
+
"nome": "User_1",
|
|
567
|
+
"admin": false,
|
|
568
|
+
"_zid": 1
|
|
569
|
+
},
|
|
570
|
+
{
|
|
571
|
+
"nome": "User_2",
|
|
572
|
+
"admin": false,
|
|
573
|
+
"_zid": 2
|
|
574
|
+
}
|
|
575
|
+
]
|
|
576
|
+
//
|
|
577
|
+
|
|
578
|
+
collection.reset()
|
|
579
|
+
|
|
580
|
+
console.log("collection.findAll(): ", collection.findAll());
|
|
581
|
+
// Consulta depois:
|
|
582
|
+
[]
|
|
583
|
+
//
|
|
584
|
+
```
|
|
585
|
+
<br>
|
|
586
|
+
|
|
587
|
+
## ✒️ Autores
|
|
588
|
+
|
|
589
|
+
* **Desenvolvedor** - *Trabalho & Documentação* - [Victor Nikolaus](https://github.com/vnikolaus)
|