Database interface
Genesis supports different ways of interacting with the database. Regardless of the interface used, the operations remain the same. The recommended way of accessing the database is via the EntityDb.
EntityDb | Generated Repositories | RxDb | |
---|---|---|---|
Supports tables | ✔️ | ✔️ | ❌ |
Supports views | ✔️ | ✔️ | ❌ |
Supports any data type | ✔️ | ❌ | ✔️ |
Class to import | AsyncEntityDb \ RxEntityDb | [TableName]AsyncRepository \ [TableName]Rx3Repository | RxDb |
Type-safe read and write | ✔️ | ✔️ | ❌ |
Type-safe write result | ✔️ | ❌ | ❌ |
Returns data as | table or view entities | table or view entities | DbRecord |
Writes data as | table or view entities | table or view entities | DbRecord |
References indexes as | index entities | Generated methods | DbRecord and String |
Programming interface | Async or RxJava | Async or RxJava | RxJava |
Write (input) | Modify Details | Generated | Modify Details |
Write (output) | Write Result | Write Result | Write result |
Subscribe | Record Update of entity | Record Update of entity | Record Update of DbRecord |
Bulk or Range Subscribe | Bulk of entity | Bulk of entity | Bulk of DbRecord |
Available in Event Handlers | ✔️ | ❌ | ❌ |
Available in custom Request Servers | ✔ ️ | ❌ | ❌ |