Expand description
§use-db-key
Primary, foreign, unique, composite, candidate, and key-column metadata.
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_key::PrimaryKey;
use use_db_name::{ColumnName, TableName};
let key = PrimaryKey::new(
TableName::new("users").expect("valid table"),
ColumnName::new("id").expect("valid column"),
);
assert_eq!(key.table().as_str(), "users");Key metadata primitives for RustUse.
Structs§
- Foreign
Key - Foreign key metadata.
- KeyColumn
- A key column reference.
- Primary
Key - Primary key metadata.
- Unique
Key - Unique key metadata.
Enums§
- KeyKind
- Broad database key kind.
Type Aliases§
- Candidate
Key - Candidate key metadata.
- Composite
Key - Composite key metadata.