Module ockam_node::storage::database
source · Expand description
Database support
Modules§
- This module defines the migrations to apply to the application database
- This migration adds a node name column to the identity attributes table
- This migration moves attributes from identity_attributes to the authority_member table for authority nodes
- This migration updates policies to not rely on trust_context_id, also introduces
node_name
and replicates policy for each existing node - This migration moves policies attached to resource types from table “resource_policy” to “resource_type_policy”
- This migration removes orphan resources
- This module defines the migrations to apply to the appliaction database
Structs§
- Migrator is responsible for running Sql and Rust migrations side by side in the correct order, checking for conflicts, duplicates; making sure each migration runs only once
- The SqlxDatabase struct is used to create a database:
Enums§
- This enum represents the set of types that we currently support in our database Since we support only Sqlite at the moment, those types are close to what is supported by Sqlite: https://www.sqlite.org/datatype3.html
Traits§
- This trait provides some syntax for transforming sqlx errors into ockam errors
- This trait runs migrations on a given database
- Individual rust migration
- This trait can be implemented by any type that can be converted to a database type Typically an
Identifier
(to aText
), aTimestampInSeconds
(to anInteger
) etc… - This trait provides some syntax to shorten queries execution returning ()