Skip to content

Commit 30c20f8

Browse files
Formatted code
1 parent 5bb6cb3 commit 30c20f8

File tree

4 files changed

+33
-23
lines changed

4 files changed

+33
-23
lines changed

src/ast/ddl.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1040,7 +1040,7 @@ pub enum IndexType {
10401040
GiST,
10411041
SPGiST,
10421042
BRIN,
1043-
Bloom
1043+
Bloom,
10441044
}
10451045

10461046
impl fmt::Display for IndexType {

src/ast/dml.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,12 @@ use sqlparser_derive::{Visit, VisitMut};
3232
pub use super::ddl::{ColumnDef, TableConstraint};
3333

3434
use super::{
35-
display_comma_separated, display_separated, operator_classes::IndexOperatorClass, query::InputFormatClause, Assignment, ClusteredBy, CommentDef, Expr, FileFormat, FromTable, HiveDistributionStyle, HiveFormat, HiveIOFormat, HiveRowFormat, Ident, IndexType, InsertAliases, MysqlInsertPriority, ObjectName, OnCommit, OnInsert, OneOrManyWithParens, OrderByExpr, Query, RowAccessPolicy, SelectItem, Setting, SqlOption, SqliteOnConflict, StorageSerializationPolicy, TableEngine, TableObject, TableWithJoins, Tag, WrappedCollection
35+
display_comma_separated, display_separated, operator_classes::IndexOperatorClass,
36+
query::InputFormatClause, Assignment, ClusteredBy, CommentDef, Expr, FileFormat, FromTable,
37+
HiveDistributionStyle, HiveFormat, HiveIOFormat, HiveRowFormat, Ident, IndexType,
38+
InsertAliases, MysqlInsertPriority, ObjectName, OnCommit, OnInsert, OneOrManyWithParens,
39+
OrderByExpr, Query, RowAccessPolicy, SelectItem, Setting, SqlOption, SqliteOnConflict,
40+
StorageSerializationPolicy, TableEngine, TableObject, TableWithJoins, Tag, WrappedCollection,
3641
};
3742

3843
/// Index column type.

tests/sqlparser_common.rs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8434,13 +8434,15 @@ fn parse_create_index() {
84348434
asc: None,
84358435
nulls_first: None,
84368436
with_fill: None,
8437-
}.into(),
8437+
}
8438+
.into(),
84388439
OrderByExpr {
84398440
expr: Expr::Identifier(Ident::new("age")),
84408441
asc: Some(false),
84418442
nulls_first: None,
84428443
with_fill: None,
8443-
}.into(),
8444+
}
8445+
.into(),
84448446
];
84458447
match verified_stmt(sql) {
84468448
Statement::CreateIndex(CreateIndex {
@@ -8470,13 +8472,15 @@ fn test_create_index_with_using_function() {
84708472
asc: None,
84718473
nulls_first: None,
84728474
with_fill: None,
8473-
}.into(),
8475+
}
8476+
.into(),
84748477
OrderByExpr {
84758478
expr: Expr::Identifier(Ident::new("age")),
84768479
asc: Some(false),
84778480
nulls_first: None,
84788481
with_fill: None,
8479-
}.into(),
8482+
}
8483+
.into(),
84808484
];
84818485
match verified_stmt(sql) {
84828486
Statement::CreateIndex(CreateIndex {
@@ -8514,7 +8518,8 @@ fn test_create_index_with_with_clause() {
85148518
asc: None,
85158519
nulls_first: None,
85168520
with_fill: None,
8517-
}.into()];
8521+
}
8522+
.into()];
85188523
let with_parameters = vec![
85198524
Expr::BinaryOp {
85208525
left: Box::new(Expr::Identifier(Ident::new("fillfactor"))),

tests/sqlparser_postgres.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2511,20 +2511,20 @@ fn parse_create_users_name_trgm_index() {
25112511
args: FunctionArguments::List(FunctionArgumentList {
25122512
duplicate_treatment: None,
25132513
args: vec![
2514-
FunctionArg::Unnamed(FunctionArgExpr::Expr(
2515-
Expr::Identifier(Ident {
2514+
FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Identifier(
2515+
Ident {
25162516
value: "first_name".to_owned(),
25172517
quote_style: None,
25182518
span: Span::empty()
2519-
})
2520-
)),
2521-
FunctionArg::Unnamed(FunctionArgExpr::Expr(
2522-
Expr::Identifier(Ident {
2519+
}
2520+
))),
2521+
FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Identifier(
2522+
Ident {
25232523
value: "last_name".to_owned(),
25242524
quote_style: None,
25252525
span: Span::empty()
2526-
})
2527-
))
2526+
}
2527+
)))
25282528
],
25292529
clauses: vec![]
25302530
}),
@@ -2585,20 +2585,20 @@ fn parse_create_projects_name_description_trgm_index() {
25852585
args: FunctionArguments::List(FunctionArgumentList {
25862586
duplicate_treatment: None,
25872587
args: vec![
2588-
FunctionArg::Unnamed(FunctionArgExpr::Expr(
2589-
Expr::Identifier(Ident {
2588+
FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Identifier(
2589+
Ident {
25902590
value: "name".to_owned(),
25912591
quote_style: None,
25922592
span: Span::empty()
2593-
})
2594-
)),
2595-
FunctionArg::Unnamed(FunctionArgExpr::Expr(
2596-
Expr::Identifier(Ident {
2593+
}
2594+
))),
2595+
FunctionArg::Unnamed(FunctionArgExpr::Expr(Expr::Identifier(
2596+
Ident {
25972597
value: "description".to_owned(),
25982598
quote_style: None,
25992599
span: Span::empty()
2600-
})
2601-
))
2600+
}
2601+
)))
26022602
],
26032603
clauses: vec![]
26042604
}),

0 commit comments

Comments
 (0)