Skip to content

Commit ac66d5d

Browse files
upgrade to 0.58.0, and remove the "convert"
1 parent 5384fca commit ac66d5d

19 files changed

+359
-473
lines changed

Cargo.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,9 @@ recursive-protection = ["std", "recursive"]
3939
# Enable JSON output in the `cli` example:
4040
json_example = ["serde_json", "serde"]
4141
visitor = ["sqlparser_derive"]
42-
bigdecimal-sql = ["bigdecimal", "df_sqlparser/bigdecimal"]
4342

4443
[dependencies]
4544
bigdecimal = { version = "0.4.1", features = ["serde"], optional = true }
46-
df_sqlparser = { package = "sqlparser", version = "0.55.0" }
4745
log = "0.4"
4846
recursive = { version = "0.1.1", optional = true}
4947

src/ast/data_type.rs

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,7 @@ use crate::ast::{display_comma_separated, Expr, ObjectName, StructField, UnionFi
2929

3030
use super::{value::escape_single_quote_string, ColumnDef};
3131

32-
use crate::ast::Convert;
33-
use crate::ast::DFConvert;
34-
35-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
32+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
3633
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3734
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
3835
pub enum EnumMember {
@@ -44,7 +41,7 @@ pub enum EnumMember {
4441
}
4542

4643
/// SQL data types
47-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
44+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
4845
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4946
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
5047
pub enum DataType {
@@ -834,7 +831,7 @@ fn format_clickhouse_datetime_precision_and_timezone(
834831
}
835832

836833
/// Type of brackets used for `STRUCT` literals.
837-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
834+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
838835
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
839836
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
840837
pub enum StructBracketKind {
@@ -848,7 +845,7 @@ pub enum StructBracketKind {
848845
///
849846
/// This is more related to a display information than real differences between each variant. To
850847
/// guarantee compatibility with the input query we must maintain its exact information.
851-
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
848+
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
852849
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
853850
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
854851
pub enum TimezoneInfo {
@@ -927,7 +924,7 @@ impl fmt::Display for ExactNumberInfo {
927924
/// Information about [character length][1], including length and possibly unit.
928925
///
929926
/// [1]: https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html#character-length
930-
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
927+
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
931928
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
932929
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
933930
pub enum CharacterLength {
@@ -961,7 +958,7 @@ impl fmt::Display for CharacterLength {
961958
/// Possible units for characters, initially based on 2016 ANSI [SQL Standard][1].
962959
///
963960
/// [1]: https://jakewheat.github.io/sql-overview/sql-2016-foundation-grammar.html#char-length-units
964-
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
961+
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
965962
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
966963
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
967964
pub enum CharLengthUnits {
@@ -984,7 +981,7 @@ impl fmt::Display for CharLengthUnits {
984981
}
985982
}
986983

987-
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
984+
#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
988985
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
989986
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
990987
pub enum BinaryLength {
@@ -1014,7 +1011,7 @@ impl fmt::Display for BinaryLength {
10141011
/// the syntax used to declare the array.
10151012
///
10161013
/// For example: Bigquery/Hive use `ARRAY<INT>` whereas snowflake uses ARRAY.
1017-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
1014+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
10181015
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10191016
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
10201017
pub enum ArrayElemTypeDef {

src/ast/dcl.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,9 @@
1818
//! AST types specific to GRANT/REVOKE/ROLE variants of [`Statement`](crate::ast::Statement)
1919
//! (commonly referred to as Data Control Language, or DCL)
2020
21-
use crate::ast::Convert;
2221
#[cfg(not(feature = "std"))]
2322
use alloc::vec::Vec;
2423
use core::fmt;
25-
use sqlparser_derive::DFConvert;
2624

2725
#[cfg(feature = "serde")]
2826
use serde::{Deserialize, Serialize};
@@ -36,7 +34,7 @@ use crate::ast::{display_separated, ObjectName};
3634
/// An option in `ROLE` statement.
3735
///
3836
/// <https://www.postgresql.org/docs/current/sql-createrole.html>
39-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
37+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
4038
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4139
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
4240
pub enum RoleOption {
@@ -101,7 +99,7 @@ impl fmt::Display for RoleOption {
10199
/// SET config value option:
102100
/// * SET `configuration_parameter` { TO | = } { `value` | DEFAULT }
103101
/// * SET `configuration_parameter` FROM CURRENT
104-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
102+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
105103
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
106104
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
107105
pub enum SetConfigValue {
@@ -113,7 +111,7 @@ pub enum SetConfigValue {
113111
/// RESET config option:
114112
/// * RESET `configuration_parameter`
115113
/// * RESET ALL
116-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
114+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
117115
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
118116
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
119117
pub enum ResetConfig {
@@ -122,7 +120,7 @@ pub enum ResetConfig {
122120
}
123121

124122
/// An `ALTER ROLE` (`Statement::AlterRole`) operation
125-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
123+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
126124
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
127125
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
128126
pub enum AlterRoleOperation {
@@ -202,7 +200,7 @@ impl fmt::Display for AlterRoleOperation {
202200
}
203201

204202
/// A `USE` (`Statement::Use`) operation
205-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
203+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
206204
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
207205
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
208206
pub enum Use {
@@ -236,7 +234,7 @@ impl fmt::Display for Use {
236234

237235
/// Snowflake `SECONDARY ROLES` USE variant
238236
/// See: <https://docs.snowflake.com/en/sql-reference/sql/use-secondary-roles>
239-
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash, DFConvert)]
237+
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
240238
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
241239
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
242240
pub enum SecondaryRoles {

0 commit comments

Comments
 (0)