From 34a592bd3d5953e40d85d1455bd96ba467518eac Mon Sep 17 00:00:00 2001 From: Billy Chan Date: Thu, 18 May 2023 15:26:44 +0800 Subject: [PATCH] Upgrade to SeaQuery 0.29.0-rc.2 --- Cargo.toml | 4 ++-- src/postgres/def/types.rs | 4 ++-- src/postgres/parser/column.rs | 4 ++-- src/postgres/writer/column.rs | 4 ++-- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8a9ebb77..037247f5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -36,8 +36,8 @@ path = "src/lib.rs" [dependencies] futures = { version = "0.3", default-features = false, optional = true, features = ["alloc"] } sea-schema-derive = { version = "0.2.0", path = "sea-schema-derive", default-features = false } -sea-query = { version = "0.29.0-rc.1", default-features = false, features = ["derive"] } -sea-query-binder = { version = "0.4.0-rc.1", default-features = false, optional = true } +sea-query = { version = "0.29.0-rc.2", default-features = false, features = ["derive"] } +sea-query-binder = { version = "0.4.0-rc.2", default-features = false, optional = true } serde = { version = "1", default-features = false, optional = true, features = ["derive"] } sqlx = { version = "0.6", default-features = false, optional = true } log = { version = "0.4", default-features = false, optional = true } diff --git a/src/postgres/def/types.rs b/src/postgres/def/types.rs index 3e59330b..4d6f3791 100644 --- a/src/postgres/def/types.rs +++ b/src/postgres/def/types.rs @@ -1,4 +1,4 @@ -use sea_query::SeaRc; +use sea_query::RcOrArc; #[cfg(feature = "with-serde")] use serde::{Deserialize, Serialize}; @@ -261,7 +261,7 @@ pub struct EnumDef { #[cfg_attr(feature = "with-serde", derive(Serialize, Deserialize))] pub struct ArrayDef { /// Array type - pub col_type: Option>, + pub col_type: Option>, } impl Type { diff --git a/src/postgres/parser/column.rs b/src/postgres/parser/column.rs index e7787bdb..c932b727 100644 --- a/src/postgres/parser/column.rs +++ b/src/postgres/parser/column.rs @@ -1,7 +1,7 @@ use crate::postgres::{ def::*, discovery::EnumVariantMap, parser::yes_or_no_to_bool, query::ColumnQueryResult, }; -use sea_query::SeaRc; +use sea_query::RcOrArc; impl ColumnQueryResult { pub fn parse(self, enums: &EnumVariantMap) -> ColumnInfo { @@ -215,7 +215,7 @@ pub fn parse_array_attributes( Some(typename) => { let typename = typename.replacen("[]", "", 1); let is_enum = enums.contains_key(&typename); - Some(SeaRc::new(Type::from_str( + Some(RcOrArc::new(Type::from_str( &typename, Some(&typename), is_enum, diff --git a/src/postgres/writer/column.rs b/src/postgres/writer/column.rs index ea1d2ae7..ee1b6d91 100644 --- a/src/postgres/writer/column.rs +++ b/src/postgres/writer/column.rs @@ -1,5 +1,5 @@ use crate::postgres::def::{ColumnInfo, Type}; -use sea_query::{Alias, BlobSize, ColumnDef, ColumnType, DynIden, IntoIden, PgInterval, SeaRc}; +use sea_query::{Alias, BlobSize, ColumnDef, ColumnType, DynIden, IntoIden, PgInterval, RcOrArc}; use std::{convert::TryFrom, fmt::Write}; impl ColumnInfo { @@ -140,7 +140,7 @@ impl ColumnInfo { .collect(); ColumnType::Enum { name, variants } } - Type::Array(array_def) => ColumnType::Array(SeaRc::new(write_type( + Type::Array(array_def) => ColumnType::Array(RcOrArc::new(write_type( array_def.col_type.as_ref().expect("Array type not defined"), ))), }