pub struct SqlColumnSchema {
pub name: String,
pub declared_type: Option<String>,
pub nullable: bool,
pub default_value: Option<String>,
pub primary_key_ordinal: Option<usize>,
pub comment: Option<String>,
pub autoincrement: bool,
}Expand description
Backend-neutral SQL column metadata.
Fields§
§name: String§declared_type: Option<String>§nullable: bool§default_value: Option<String>§primary_key_ordinal: Option<usize>§comment: Option<String>Column-level comment text, when the backend exposes one.
Per br-frankenpandas-cfld (fd90.35). SQLite has no column-comment
storage so the rusqlite override always emits None. PostgreSQL
impls populate from pg_catalog.pg_description.col_description;
MySQL uses information_schema.columns.column_comment; MSSQL
reads from sys.extended_properties. Companion to the
table-level table_comment (fd90.32) — together they round
out SQLAlchemy.Inspector.get_columns() parity (its dict shape
includes a 'comment' key).
autoincrement: boolWhether the column is auto-incrementing.
Per br-frankenpandas-bkl2 (fd90.37). Completes
SQLAlchemy.Inspector.get_columns() parity (the dict shape
includes an 'autoincrement' key).
SQLite detection rule (in the rusqlite table_schema
override): true when declared_type is INTEGER
(case-insensitive) AND the column is the sole primary key
(primary_key_ordinal == Some(0)) — SQLite makes
INTEGER PRIMARY KEY an alias for the auto-increment
rowid. The optional AUTOINCREMENT keyword affects
whether IDs are reused after delete but does not change the
“is auto-incrementing” property pandas cares about.
Other backends: PG SERIAL/BIGSERIAL/IDENTITY columns
true; MySQL AUTO_INCREMENT modifier true; otherwise
false.
Trait Implementations§
Source§impl Clone for SqlColumnSchema
impl Clone for SqlColumnSchema
Source§fn clone(&self) -> SqlColumnSchema
fn clone(&self) -> SqlColumnSchema
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SqlColumnSchema
impl Debug for SqlColumnSchema
impl Eq for SqlColumnSchema
Source§impl PartialEq for SqlColumnSchema
impl PartialEq for SqlColumnSchema
impl StructuralPartialEq for SqlColumnSchema
Auto Trait Implementations§
impl Freeze for SqlColumnSchema
impl RefUnwindSafe for SqlColumnSchema
impl Send for SqlColumnSchema
impl Sync for SqlColumnSchema
impl Unpin for SqlColumnSchema
impl UnsafeUnpin for SqlColumnSchema
impl UnwindSafe for SqlColumnSchema
Blanket Implementations§
impl<T> Allocation for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.