sqlx_gen/introspect/
mod.rs1pub mod mysql;
2pub mod postgres;
3pub mod sqlite;
4
5#[derive(Debug, Clone)]
6#[allow(unused)]
7pub struct ColumnInfo {
8 pub name: String,
9 pub data_type: String,
11 pub udt_name: String,
13 pub is_nullable: bool,
14 pub is_primary_key: bool,
15 pub ordinal_position: i32,
16 pub schema_name: String,
17 pub column_default: Option<String>,
19}
20
21#[derive(Debug, Clone)]
22pub struct TableInfo {
23 pub schema_name: String,
24 pub name: String,
25 pub columns: Vec<ColumnInfo>,
26}
27
28#[derive(Debug, Clone)]
29pub struct EnumInfo {
30 pub schema_name: String,
31 pub name: String,
32 pub variants: Vec<String>,
33 pub default_variant: Option<String>,
35}
36
37#[derive(Debug, Clone)]
38pub struct CompositeTypeInfo {
39 pub schema_name: String,
40 pub name: String,
41 pub fields: Vec<ColumnInfo>,
42}
43
44#[derive(Debug, Clone)]
45pub struct DomainInfo {
46 pub schema_name: String,
47 pub name: String,
48 pub base_type: String,
50}
51
52#[derive(Debug, Clone, Default)]
53pub struct SchemaInfo {
54 pub tables: Vec<TableInfo>,
55 pub views: Vec<TableInfo>,
56 pub enums: Vec<EnumInfo>,
57 pub composite_types: Vec<CompositeTypeInfo>,
58 pub domains: Vec<DomainInfo>,
59}