Skip to content

Commit bb0dad8

Browse files
committed
undo rename of DropFunctionDesc
1 parent 5ce16ed commit bb0dad8

File tree

3 files changed

+14
-14
lines changed

3 files changed

+14
-14
lines changed

src/ast/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ pub enum Statement {
22102210
DropFunction {
22112211
if_exists: bool,
22122212
/// One or more function to drop
2213-
func_desc: Vec<DropFuncDesc>,
2213+
func_desc: Vec<DropFunctionDesc>,
22142214
/// `CASCADE` or `RESTRICT`
22152215
option: Option<ReferentialAction>,
22162216
},
@@ -2220,7 +2220,7 @@ pub enum Statement {
22202220
DropProcedure {
22212221
if_exists: bool,
22222222
/// One or more function to drop
2223-
proc_desc: Vec<DropFuncDesc>,
2223+
proc_desc: Vec<DropFunctionDesc>,
22242224
/// `CASCADE` or `RESTRICT`
22252225
option: Option<ReferentialAction>,
22262226
},
@@ -5910,12 +5910,12 @@ impl fmt::Display for DropFunctionOption {
59105910
#[derive(Debug, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
59115911
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
59125912
#[cfg_attr(feature = "visitor", derive(Visit, VisitMut))]
5913-
pub struct DropFuncDesc {
5913+
pub struct DropFunctionDesc {
59145914
pub name: ObjectName,
59155915
pub args: Option<Vec<OperateFunctionArg>>,
59165916
}
59175917

5918-
impl fmt::Display for DropFuncDesc {
5918+
impl fmt::Display for DropFunctionDesc {
59195919
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
59205920
write!(f, "{}", self.name)?;
59215921
if let Some(args) = &self.args {

src/parser/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4601,7 +4601,7 @@ impl<'a> Parser<'a> {
46014601
})
46024602
}
46034603

4604-
fn parse_drop_function_desc(&mut self) -> Result<DropFuncDesc, ParserError> {
4604+
fn parse_drop_function_desc(&mut self) -> Result<DropFunctionDesc, ParserError> {
46054605
let name = self.parse_object_name(false)?;
46064606

46074607
let args = if self.consume_token(&Token::LParen) {
@@ -4616,7 +4616,7 @@ impl<'a> Parser<'a> {
46164616
None
46174617
};
46184618

4619-
Ok(DropFuncDesc { name, args })
4619+
Ok(DropFunctionDesc { name, args })
46204620
}
46214621

46224622
/// See [DuckDB Docs](https://duckdb.org/docs/sql/statements/create_secret.html) for more details.

tests/sqlparser_postgres.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3546,7 +3546,7 @@ fn parse_drop_function() {
35463546
pg().verified_stmt(sql),
35473547
Statement::DropFunction {
35483548
if_exists: true,
3549-
func_desc: vec![DropFuncDesc {
3549+
func_desc: vec![DropFunctionDesc {
35503550
name: ObjectName(vec![Ident {
35513551
value: "test_func".to_string(),
35523552
quote_style: None
@@ -3562,7 +3562,7 @@ fn parse_drop_function() {
35623562
pg().verified_stmt(sql),
35633563
Statement::DropFunction {
35643564
if_exists: true,
3565-
func_desc: vec![DropFuncDesc {
3565+
func_desc: vec![DropFunctionDesc {
35663566
name: ObjectName(vec![Ident {
35673567
value: "test_func".to_string(),
35683568
quote_style: None
@@ -3587,7 +3587,7 @@ fn parse_drop_function() {
35873587
Statement::DropFunction {
35883588
if_exists: true,
35893589
func_desc: vec![
3590-
DropFuncDesc {
3590+
DropFunctionDesc {
35913591
name: ObjectName(vec![Ident {
35923592
value: "test_func1".to_string(),
35933593
quote_style: None
@@ -3605,7 +3605,7 @@ fn parse_drop_function() {
36053605
}
36063606
]),
36073607
},
3608-
DropFuncDesc {
3608+
DropFunctionDesc {
36093609
name: ObjectName(vec![Ident {
36103610
value: "test_func2".to_string(),
36113611
quote_style: None
@@ -3636,7 +3636,7 @@ fn parse_drop_procedure() {
36363636
pg().verified_stmt(sql),
36373637
Statement::DropProcedure {
36383638
if_exists: true,
3639-
proc_desc: vec![DropFuncDesc {
3639+
proc_desc: vec![DropFunctionDesc {
36403640
name: ObjectName(vec![Ident {
36413641
value: "test_proc".to_string(),
36423642
quote_style: None
@@ -3652,7 +3652,7 @@ fn parse_drop_procedure() {
36523652
pg().verified_stmt(sql),
36533653
Statement::DropProcedure {
36543654
if_exists: true,
3655-
proc_desc: vec![DropFuncDesc {
3655+
proc_desc: vec![DropFunctionDesc {
36563656
name: ObjectName(vec![Ident {
36573657
value: "test_proc".to_string(),
36583658
quote_style: None
@@ -3677,7 +3677,7 @@ fn parse_drop_procedure() {
36773677
Statement::DropProcedure {
36783678
if_exists: true,
36793679
proc_desc: vec![
3680-
DropFuncDesc {
3680+
DropFunctionDesc {
36813681
name: ObjectName(vec![Ident {
36823682
value: "test_proc1".to_string(),
36833683
quote_style: None
@@ -3695,7 +3695,7 @@ fn parse_drop_procedure() {
36953695
}
36963696
]),
36973697
},
3698-
DropFuncDesc {
3698+
DropFunctionDesc {
36993699
name: ObjectName(vec![Ident {
37003700
value: "test_proc2".to_string(),
37013701
quote_style: None

0 commit comments

Comments
 (0)