Skip to content

Commit

Permalink
repo type validation option doc
Browse files Browse the repository at this point in the history
  • Loading branch information
anidotnet committed May 16, 2024
1 parent ccc3c15 commit 79966e3
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 1 deletion.
16 changes: 15 additions & 1 deletion flutter-sdk/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,18 @@ var db = await Nitrite.builder()

!!!info
The default field separator character is set to `.`.
!!!
!!!

### Disable Repository Type Validation

To disable repository type validation, you need to call `disableRepositoryTypeValidation()` method on `NitriteBuilder` instance. This method returns the same `NitriteBuilder` instance.

Repository type validation is a feature in Nitrite that ensures the type of the objects stored in the repository can be converted to and from the document. By default, the repository type validation is enabled. If you disable it,
and if you try to store an object that cannot be converted to a document, Nitrite will throw an exception during the operation.

```dart
var db = await Nitrite.builder()
.loadModule(storeModule)
.disableRepositoryTypeValidation()
.openOrCreate();
```
14 changes: 14 additions & 0 deletions java-sdk/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -190,3 +190,17 @@ Nitrite db = Nitrite.builder()
!!!info
The default field separator character is set to `.`.
!!!

### Disable Repository Type Validation

To disable repository type validation, you need to call `disableRepositoryTypeValidation()` method on `NitriteBuilder` instance. This method returns the same `NitriteBuilder` instance.

Repository type validation is a feature in Nitrite that ensures the type of the objects stored in the repository can be converted to and from the document. By default, the repository type validation is enabled. If you disable it,
and if you try to store an object that cannot be converted to a document, Nitrite will throw an exception during the operation.

```java
Nitrite db = Nitrite.builder()
.loadModule(storeModule)
.disableRepositoryTypeValidation()
.openOrCreate();
```
12 changes: 12 additions & 0 deletions kotlin-sdk/database.md
Original file line number Diff line number Diff line change
Expand Up @@ -183,3 +183,15 @@ var db = nitrite {
!!!info
By default, the field separator character is set to `.`.
!!!

### Disable Repository Type Validation

Nitrite database has a feature called repository type validation. It ensures the type of the objects stored in the repository can be converted to and from the document. By default, the repository type validation is enabled. If you disable it, and if you try to store an object that cannot be converted to a document, Nitrite will throw an exception during the operation.

To disable repository type validation, you need to set the `enableRepositoryValidation` property to `false` on `Builder` instance.

```kotlin
var db = nitrite {
enableRepositoryValidation = false
}
```

0 comments on commit 79966e3

Please sign in to comment.