mirror of
https://github.com/launchbadge/sqlx.git
synced 2025-12-31 13:50:55 +00:00
16 lines
384 B
Rust
16 lines
384 B
Rust
use crate::Database;
|
|
|
|
/// Represents a column from a query.
|
|
pub trait Column {
|
|
type Database: Database;
|
|
|
|
/// Returns the name of the column.
|
|
fn name(&self) -> &str;
|
|
|
|
/// Returns the (zero-based) position of the column.
|
|
fn index(&self) -> usize;
|
|
|
|
/// Returns type information of the column.
|
|
fn type_info(&self) -> &<Self::Database as Database>::TypeInfo;
|
|
}
|