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