sql-gen 0.1.3

A CLI tool for generating models based on a SQL Database using SQLx
1
2
3
4
5
6
7
8
9
10
11
12
#[derive(sqlx::FromRow)]
pub struct TableColumn {
    pub(crate) table_name: String,
    pub(crate) column_name: String,
    pub(crate) udt_name: String,
    pub(crate) is_nullable: bool,
    pub(crate) is_primary_key: bool,
    pub(crate) foreign_key_table: Option<String>,
    pub(crate) foreign_key_id: Option<String>,
    // #todo
    pub(crate) table_schema: String,
}