Skip to content

Commit 7551f8c

Browse files
committed
chore: codefmt
1 parent b934631 commit 7551f8c

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/query/ast/src/ast/statements/auto_increment.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub struct AutoIncrement {
2222
pub start: u64,
2323
pub step: u64,
2424
// Ensure that the generated sequence values are distributed strictly in the order of insertion time
25-
pub is_order: bool,
25+
pub is_ordered: bool,
2626
}
2727

2828
impl AutoIncrement {
@@ -32,7 +32,7 @@ impl AutoIncrement {
3232

3333
pub fn to_sql_string(&self) -> String {
3434
let string = format!("AUTOINCREMENT ({}, {}) ", self.start, self.step);
35-
if self.is_order {
35+
if self.is_ordered {
3636
string.add("ORDER")
3737
} else {
3838
string.add("NOORDER")

src/query/ast/src/parser/statement.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3239,7 +3239,7 @@ pub fn column_def(i: Input) -> IResult<ColumnDefinition> {
32393239
AutoIncrement {
32403240
start: u64,
32413241
step: u64,
3242-
is_order: bool,
3242+
is_ordered: bool,
32433243
},
32443244
}
32453245

@@ -3295,14 +3295,14 @@ pub fn column_def(i: Input) -> IResult<ColumnDefinition> {
32953295
},
32963296
|(_, params, order_token)| {
32973297
let (start, step) = params.unwrap_or((0, 1));
3298-
let is_order = order_token
3298+
let is_ordered = order_token
32993299
.map(|token| token.text().eq_ignore_ascii_case("order"))
33003300
.unwrap_or(true);
33013301

33023302
ColumnConstraint::AutoIncrement {
33033303
start,
33043304
step,
3305-
is_order,
3305+
is_ordered,
33063306
}
33073307
},
33083308
),
@@ -3373,15 +3373,15 @@ pub fn column_def(i: Input) -> IResult<ColumnDefinition> {
33733373
ColumnConstraint::AutoIncrement {
33743374
start,
33753375
step,
3376-
is_order,
3376+
is_ordered,
33773377
} => {
33783378
if matches!(def.expr, Some(ColumnExpr::Default(_))) {
33793379
return Err(nom::Err::Error(Error::from_error_kind(
33803380
i,
33813381
ErrorKind::Other("DEFAULT and AUTOINCREMENT cannot exist at the same time"),
33823382
)));
33833383
}
3384-
if !is_order {
3384+
if !is_ordered {
33853385
return Err(nom::Err::Error(Error::from_error_kind(
33863386
i,
33873387
ErrorKind::Other("AUTOINCREMENT only support ORDER now"),
@@ -3390,7 +3390,7 @@ pub fn column_def(i: Input) -> IResult<ColumnDefinition> {
33903390
def.expr = Some(ColumnExpr::AutoIncrement(AutoIncrement {
33913391
start,
33923392
step,
3393-
is_order,
3393+
is_ordered,
33943394
}))
33953395
}
33963396
}

0 commit comments

Comments
 (0)