Crate db_core

source ·
Expand description

Starchart database operations

Traits and datastructures used in Starchart to interact with database.

To use an unsupported database with Starchart, traits present within this crate should be implemented.

Organisation

Database functionallity is divided accross various modules:

  • errors: error data structures used in this crate
  • ops: meta operations like connection pool creation, migrations and getting connection from pool

Re-exports

pub use ops::GetConnection;

Modules

useful imports for supporting a new database
represents all the ways a trait can fail using this crate
meta operations like migration and connecting to a database
useful imports for users working with a supported database
Test utilities

Structs

add new repository to database
add new user to database
create a new forge on the database
data representing a forge instance
repository
Data related to a Starchart instance
user data

Enums

Forge type: Gitea, Sourcehut, GitLab, etc. Support is currently only available for Gitea

Traits

Trait to clone SCDatabase
Starchart’s database requirements. To implement support for $Database, kindly implement this trait.

Functions

Get url from URL Utility function for uniform url format