Module models

Source
Expand description

Traits and implementations for accessing databases and caches.

Currently we only provide pure MongoDB/SQLite implementation. Mixing implementation is possible. For example, put units/devices in MongoDB and put routes in Redis. Then use a model struct and impl to mix both databases.

Modules§

application
Traits and structs for applications.
device
Traits and structs for devices.
device_route
Traits and structs for device routes.
dldata_buffer
Traits and structs for device routes.
mongodb_conn
network
Traits and structs for networks.
network_route
Traits and structs for network routes.
sqlite_conn
unit
Traits and structs for units.

Structs§

DeviceOptions
DeviceRouteOptions
MemoryCache
Pure memory cache.
MemoryOptions
MongoDbModel
Pure MongoDB model.
MongoDbOptions
MongoDB connection options.
NetworkRouteOptions
SqliteModel
Pure SQLite model.
SqliteOptions
SQLite connection options.

Enums§

CacheConnOptions
Database connection options for cache implementation.
ConnOptions
Database connection options for model implementation.

Traits§

Cache
The top level trait to get all caches.
Model
The top level trait to get all models (tables/collections).

Functions§

new
To create the database model with the specified database implementation.
new_cache
To create the database cache with the specified database implementation.