geekorm

Type Alias PrimaryKeyInteger

Source
pub type PrimaryKeyInteger = PrimaryKey<i32>;
Expand description

Primary Key as an Integer

use geekorm::prelude::*;

#[derive(Table, Clone, Default, serde::Serialize, serde::Deserialize)]
pub struct Users {
    pub id: PrimaryKeyInteger,
    pub username: String,
}

let user = Users {
    id: PrimaryKeyInteger::from(1),
    username: String::from("JohnDoe")
};

Aliased Typeยง

struct PrimaryKeyInteger { /* private fields */ }