From d3fed2f79a80fb9f9d5f8be4544aa453f4910983 Mon Sep 17 00:00:00 2001 From: Blankeos Date: Fri, 18 Jul 2025 21:37:50 +0800 Subject: [PATCH] fix: postgres array_depth i16 to i32. --- src/core/models/db.rs | 6 +++--- src/core/models/rust.rs | 2 +- src/mysql/models/mysql_table_column.rs | 2 +- src/postgres/models/postgres_table_column.rs | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/models/db.rs b/src/core/models/db.rs index 51e4ab0..3033eee 100644 --- a/src/core/models/db.rs +++ b/src/core/models/db.rs @@ -8,7 +8,7 @@ pub struct TableColumn { pub data_type: String, pub recommended_rust_type: Option, pub is_nullable: bool, - pub array_depth: i16, + pub array_depth: i32, pub is_unique: bool, pub is_primary_key: bool, pub foreign_key_table: Option, @@ -47,7 +47,7 @@ pub struct TableColumnBuilder { udt_name: String, data_type: String, is_nullable: bool, - array_depth: i16, + array_depth: i32, is_unique: bool, is_primary_key: bool, foreign_key_table: Option, @@ -83,7 +83,7 @@ impl TableColumnBuilder { self } - pub fn array_depth(mut self, depth: i16) -> Self { + pub fn array_depth(mut self, depth: i32) -> Self { self.array_depth = depth; self } diff --git a/src/core/models/rust.rs b/src/core/models/rust.rs index 3ecca83..e80570c 100644 --- a/src/core/models/rust.rs +++ b/src/core/models/rust.rs @@ -27,7 +27,7 @@ pub struct RustDbSetField { pub field_name: String, pub field_type: String, pub is_optional: bool, - pub array_depth: i16, + pub array_depth: i32, pub attributes: Vec, pub comment: Option, } diff --git a/src/mysql/models/mysql_table_column.rs b/src/mysql/models/mysql_table_column.rs index d22a694..bd4017b 100644 --- a/src/mysql/models/mysql_table_column.rs +++ b/src/mysql/models/mysql_table_column.rs @@ -11,7 +11,7 @@ pub struct MySqlTableColumn { pub udt_name: String, pub data_type: String, pub is_nullable: bool, - pub array_depth: i16, + pub array_depth: i32, pub is_unique: bool, pub is_primary_key: bool, pub foreign_key_table: Option, diff --git a/src/postgres/models/postgres_table_column.rs b/src/postgres/models/postgres_table_column.rs index c24b16e..16165a0 100644 --- a/src/postgres/models/postgres_table_column.rs +++ b/src/postgres/models/postgres_table_column.rs @@ -11,7 +11,7 @@ pub struct PostgresTableColumn { pub udt_name: String, pub data_type: String, pub is_nullable: bool, - pub array_depth: i16, + pub array_depth: i32, pub is_unique: bool, pub is_primary_key: bool, pub foreign_key_table: Option,