Skip to main content

Crate use_db_key

Crate use_db_key 

Source
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§

ForeignKey
Foreign key metadata.
KeyColumn
A key column reference.
PrimaryKey
Primary key metadata.
UniqueKey
Unique key metadata.

Enums§

KeyKind
Broad database key kind.

Type Aliases§

CandidateKey
Candidate key metadata.
CompositeKey
Composite key metadata.