Skip to content

Commit fd69a92

Browse files
Reformatted code
1 parent 5781856 commit fd69a92

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/ast/ddl.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,9 @@ use sqlparser_derive::{Visit, VisitMut};
3030

3131
use crate::ast::value::escape_single_quote_string;
3232
use crate::ast::{
33-
display_comma_separated, display_separated, table_constraints::{CheckConstraint, TableConstraint}, ArgMode,
34-
CommentDef, ConditionalStatements, CreateFunctionBody, CreateFunctionUsing,
33+
display_comma_separated, display_separated,
34+
table_constraints::{CheckConstraint, TableConstraint},
35+
ArgMode, CommentDef, ConditionalStatements, CreateFunctionBody, CreateFunctionUsing,
3536
CreateTableLikeKind, CreateTableOptions, DataType, Expr, FileFormat, FunctionBehavior,
3637
FunctionCalledOnNull, FunctionDeterminismSpecifier, FunctionParallel, HiveDistributionStyle,
3738
HiveFormat, HiveIOFormat, HiveRowFormat, Ident, InitializeKind, MySQLColumnPosition,

src/parser/mod.rs

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8071,11 +8071,14 @@ impl<'a> Parser<'a> {
80718071
// since `CHECK` requires parentheses, we can parse the inner expression in ParserState::Normal
80728072
let expr: Expr = self.with_state(ParserState::Normal, |p| p.parse_expr())?;
80738073
self.expect_token(&Token::RParen)?;
8074-
Ok(Some(CheckConstraint {
8075-
name: None, // Column-level check constraints don't have names
8076-
expr: Box::new(expr),
8077-
enforced: None, // Could be extended later to support MySQL ENFORCED/NOT ENFORCED
8078-
}.into()))
8074+
Ok(Some(
8075+
CheckConstraint {
8076+
name: None, // Column-level check constraints don't have names
8077+
expr: Box::new(expr),
8078+
enforced: None, // Could be extended later to support MySQL ENFORCED/NOT ENFORCED
8079+
}
8080+
.into(),
8081+
))
80798082
} else if self.parse_keyword(Keyword::AUTO_INCREMENT)
80808083
&& dialect_of!(self is MySqlDialect | GenericDialect)
80818084
{

0 commit comments

Comments
 (0)