Skip to main content

Crate use_db_name

Crate use_db_name 

Source
Expand description

§use-db-name

Strongly typed database identifier/name wrappers.

This crate is part of the use-database facade workspace. It provides small, engine-neutral vocabulary types and metadata containers. It does not connect to databases, execute queries, run migrations, parse SQL, or model engine-specific behavior.

§Example

use use_db_name::{DatabaseName, TableName};

let database = DatabaseName::new("app").expect("valid database name");
let table = TableName::new("users").expect("valid table name");

assert_eq!(database.as_str(), "app");
assert_eq!(table.to_string(), "users");

Strongly typed database names for RustUse.

Structs§

CollectionName
A strongly typed database identifier wrapper: CollectionName.
ColumnName
A strongly typed database identifier wrapper: ColumnName.
ConnectionName
A strongly typed database identifier wrapper: ConnectionName.
ConstraintName
A strongly typed database identifier wrapper: ConstraintName.
DatabaseName
A strongly typed database identifier wrapper: DatabaseName.
DriverName
A strongly typed database identifier wrapper: DriverName.
IndexName
A strongly typed database identifier wrapper: IndexName.
MigrationName
A strongly typed database identifier wrapper: MigrationName.
PoolName
A strongly typed database identifier wrapper: PoolName.
RelationName
A strongly typed database identifier wrapper: RelationName.
SchemaName
A strongly typed database identifier wrapper: SchemaName.
TableName
A strongly typed database identifier wrapper: TableName.

Enums§

DatabaseNameError
Error returned when a database identifier wrapper rejects input.

Functions§

is_valid_database_name
Returns whether the input is accepted by the generic database name validator.