pub struct Column {
pub name: String,
pub declared_type: String,
pub column_type: Option<ColumnType>,
pub not_null: bool,
pub default_value: Option<String>,
pub primary_key: u32,
pub data_column: Option<DataColumn>,
}Expand description
Metadata for one column of a user table, from PRAGMA table_info.
Fields§
§name: StringColumn name.
declared_type: StringThe declared type exactly as stored in the schema (e.g. "TEXT(64)",
"VARCHAR(20)", or the empty string for a column declared without a
type). Preserved verbatim even when it is outside the spec vocabulary.
column_type: Option<ColumnType>The declared type parsed into the spec vocabulary, or None when
Column::declared_type is outside it (lenient readers keep the raw
string).
not_null: boolWhether the column has a NOT NULL constraint.
default_value: Option<String>The column default as SQL source text, or None for no default.
primary_key: u32Position of the column within the primary key: 0 if it is not part of
the key, otherwise its 1-based position. SQLite reports a composite key
as 1, 2, …; a conformant GeoPackage feature or attribute table has a
single INTEGER primary key column reported as 1.
data_column: Option<DataColumn>The column’s gpkg_data_columns row, for a file with the
gpkg_schema extension: a human-readable name and title, a
description, a MIME type, and the name of any constraint its values are
subject to.
None for a file without the extension, or a column it does not
describe. Resolve DataColumn::constraint_name with
GeoPackage::column_constraint.