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§
- Collection
Name - A strongly typed database identifier wrapper:
CollectionName. - Column
Name - A strongly typed database identifier wrapper:
ColumnName. - Connection
Name - A strongly typed database identifier wrapper:
ConnectionName. - Constraint
Name - A strongly typed database identifier wrapper:
ConstraintName. - Database
Name - A strongly typed database identifier wrapper:
DatabaseName. - Driver
Name - A strongly typed database identifier wrapper:
DriverName. - Index
Name - A strongly typed database identifier wrapper:
IndexName. - Migration
Name - A strongly typed database identifier wrapper:
MigrationName. - Pool
Name - A strongly typed database identifier wrapper:
PoolName. - Relation
Name - A strongly typed database identifier wrapper:
RelationName. - Schema
Name - A strongly typed database identifier wrapper:
SchemaName. - Table
Name - A strongly typed database identifier wrapper:
TableName.
Enums§
- Database
Name Error - 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.