pub struct PrimaryKeyColumn {
pub name: String,
pub value: PrimaryKeyValue,
}
Expand description
主键列
Fields§
§name: String
列名
value: PrimaryKeyValue
列的值
Implementations§
Source§impl PrimaryKeyColumn
impl PrimaryKeyColumn
pub fn new(name: &str, value: PrimaryKeyValue) -> Self
Sourcepub fn from_string(name: &str, value: impl Into<String>) -> Self
pub fn from_string(name: &str, value: impl Into<String>) -> Self
创建字符串类型的主键列及值
Sourcepub fn from_integer(name: &str, value: i64) -> Self
pub fn from_integer(name: &str, value: i64) -> Self
创建整数类型的主键列及值
Sourcepub fn auto_increment(name: &str) -> Self
pub fn auto_increment(name: &str) -> Self
创建自增主键列,无需填充值
Trait Implementations§
Source§impl Clone for PrimaryKeyColumn
impl Clone for PrimaryKeyColumn
Source§fn clone(&self) -> PrimaryKeyColumn
fn clone(&self) -> PrimaryKeyColumn
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for PrimaryKeyColumn
impl Debug for PrimaryKeyColumn
Source§impl Default for PrimaryKeyColumn
impl Default for PrimaryKeyColumn
Source§fn default() -> PrimaryKeyColumn
fn default() -> PrimaryKeyColumn
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for PrimaryKeyColumn
impl RefUnwindSafe for PrimaryKeyColumn
impl Send for PrimaryKeyColumn
impl Sync for PrimaryKeyColumn
impl Unpin for PrimaryKeyColumn
impl UnwindSafe for PrimaryKeyColumn
Blanket Implementations§
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
Mutably borrows from an owned value. Read more