Expand description
§use-database
Thin facade crate for primitive RustUse database vocabulary.
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_database::{DatabaseName, PageRequest, TableName};
let database = DatabaseName::new("app").expect("valid database name");
let table = TableName::new("users").expect("valid table name");
let page = PageRequest::new(1, 50);
assert_eq!(database.as_str(), "app");
assert_eq!(table.as_str(), "users");
assert_eq!(page.per_page(), 50);Thin facade for primitive database vocabulary crates.
Re-exports§
pub use use_db_column as column;pub use use_db_constraint as constraint;pub use use_db_core as core;pub use use_db_driver as driver;pub use use_db_index as index;pub use use_db_key as key;pub use use_db_migration as migration;pub use use_db_name as name;pub use use_db_query as query;pub use use_db_record as record;pub use use_db_relation as relation;pub use use_db_result as result;pub use use_db_row as row;pub use use_db_schema as schema;pub use use_db_table as table;pub use use_db_transaction as transaction;pub use use_db_url as url;
Modules§
- prelude
- Common database primitive re-exports.
Structs§
- Affected
Rows - A count of affected rows.
- Backend
Feature - Backend
Name - Check
Expression Label - A check expression label, not an executable expression.
- Collection
Name - A strongly typed database identifier wrapper:
CollectionName. - Column
Default - Column
Metadata - Column metadata.
- Column
Name - A strongly typed database identifier wrapper:
ColumnName. - Column
Ordinal - A one-based column ordinal.
- Column
Ref - A column reference with optional table qualification.
- Column
Type Label - Connection
Name - A strongly typed database identifier wrapper:
ConnectionName. - Constraint
Metadata - Constraint metadata.
- Constraint
Name - A strongly typed database identifier wrapper:
ConstraintName. - Constraint
Ref - Constraint reference metadata.
- Cursor
- Cursor
Position - A cursor position label.
- Database
Capability - Database
Dialect - Database
Dsn - Database
Engine - Database
Feature - Database
Host - Database
Name - A strongly typed database identifier wrapper:
DatabaseName. - Database
Path - A database URL path component.
- Database
Port - A database network port.
- Database
Scheme - A database URL scheme such as
postgresqlorsqlite. - Database
Url - Database
UrlParts - Lightweight parts extracted from a database URL.
- Database
Version - Driver
Name - A strongly typed database identifier wrapper:
DriverName. - Driver
Version - Foreign
Key - Foreign key metadata.
- HasMore
- Whether more results are available.
- Index
Column - An indexed column.
- Index
Metadata - Index metadata.
- Index
Name - A strongly typed database identifier wrapper:
IndexName. - Index
Ref - Index reference metadata.
- KeyColumn
- A key column reference.
- Limit
- Limit count metadata.
- Migration
Applied At - Migration
Checksum - Migration
Id - Migration
Name - A strongly typed database identifier wrapper:
MigrationName. - Migration
Plan - A migration plan descriptor. This does not execute migrations.
- Migration
Step - A migration step descriptor.
- Migration
Version - Offset
- Offset count metadata.
- Page
Info - Page metadata.
- Page
Request - Page request metadata.
- Pool
Name - A strongly typed database identifier wrapper:
PoolName. - Primary
Key - Primary key metadata.
- Projection
- Projection metadata.
- Query
Label - Query
Timeout - Query timeout in milliseconds.
- Record
Id - Record
Key - Record
Ref - A generic record reference.
- Record
Version - A monotonically meaningful record version value.
- Relation
Endpoint - A relation endpoint label with optionality metadata.
- Relation
Name - A strongly typed database identifier wrapper:
RelationName. - Relation
Ref - Relation reference metadata.
- Relationship
- Relationship metadata.
- Result
Page - Generic result page.
- Result
Set - Generic result set container.
- Result
SetMetadata - Result set metadata.
- RowCount
- A row count.
- RowId
- A row identifier label.
- RowNumber
- A one-based row number.
- Schema
Metadata - Schema metadata.
- Schema
Name - A strongly typed database identifier wrapper:
SchemaName. - Schema
Namespace - A schema namespace search list.
- Schema
Ref - A database schema reference.
- Schema
Version - A schema version label.
- SortKey
- Table
Metadata - Table metadata.
- Table
Name - A strongly typed database identifier wrapper:
TableName. - Table
Ref - A table reference with optional schema qualification.
- Table
Stats - Basic table statistics.
- Total
Count - Total result count metadata.
- Transaction
Id - Transaction identifier label.
- Unique
Key - Unique key metadata.
Enums§
- Backend
Kind - Backend kind metadata.
- Cardinality
- Common cardinality labels.
- Constraint
Kind - Broad constraint kind.
- Constraint
Status - Constraint status metadata.
- Database
Error - Error returned by primitive database vocabulary constructors.
- Database
Kind - Common database storage families.
- Database
Name Error - Error returned when a database identifier wrapper rejects input.
- Database
Object Kind - Common database object kinds.
- Deferrability
- Deferrability metadata.
- Driver
Capability - Driver capability metadata.
- Filter
Operator - Filter operator vocabulary.
- Index
Kind - Broad index kind.
- Index
Order - Index column sort order.
- Index
Uniqueness - Index uniqueness metadata.
- KeyKind
- Broad database key kind.
- Migration
Direction - Migration direction metadata.
- Migration
Status - Migration status metadata.
- Nullability
- Column nullability metadata.
- Query
Kind - Broad query kind.
- Query
Mode - Query mode metadata.
- Record
Status - Broad record status.
- Relation
Kind - Broad relation kind.
- RowStatus
- Broad row status.
- Schema
Object - Objects that may be described as members of a schema-like namespace.
- Sort
Direction - Sort direction metadata.
- Table
Kind - Broad table families.
- Table
Status - Broad table lifecycle status.
- Transaction
Boundary - Transaction boundary metadata.
- Transaction
Isolation - Common transaction isolation levels.
- Transaction
Mode - Transaction mode metadata.
- Transaction
Outcome - Transaction outcome metadata.
- Transaction
State - Transaction state metadata.
Type Aliases§
- Candidate
Key - Candidate key metadata.
- Composite
Key - Composite key metadata.
- Database
Result - Result alias for primitive database vocabulary operations.