Type Alias geekorm::PrimaryKeyString

source ·
pub type PrimaryKeyString = PrimaryKey<String>;
Expand description

PrimaryKeyString (alias) is a Primary Key as a String type

use geekorm::prelude::*;
use geekorm::PrimaryKeyString;

#[derive(Clone, GeekTable, Default)]
pub struct Users {
    pub id: PrimaryKeyString,
    pub username: String,
}

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

Aliased Type§

struct PrimaryKeyString { /* private fields */ }