File tree Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Expand file tree Collapse file tree 2 files changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ pub struct AutoIncrement {
22
22
pub start : u64 ,
23
23
pub step : u64 ,
24
24
// 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 ,
26
26
}
27
27
28
28
impl AutoIncrement {
@@ -32,7 +32,7 @@ impl AutoIncrement {
32
32
33
33
pub fn to_sql_string ( & self ) -> String {
34
34
let string = format ! ( "AUTOINCREMENT ({}, {}) " , self . start, self . step) ;
35
- if self . is_order {
35
+ if self . is_ordered {
36
36
string. add ( "ORDER" )
37
37
} else {
38
38
string. add ( "NOORDER" )
Original file line number Diff line number Diff line change @@ -3239,7 +3239,7 @@ pub fn column_def(i: Input) -> IResult<ColumnDefinition> {
3239
3239
AutoIncrement {
3240
3240
start : u64 ,
3241
3241
step : u64 ,
3242
- is_order : bool ,
3242
+ is_ordered : bool ,
3243
3243
} ,
3244
3244
}
3245
3245
@@ -3295,14 +3295,14 @@ pub fn column_def(i: Input) -> IResult<ColumnDefinition> {
3295
3295
} ,
3296
3296
|( _, params, order_token) | {
3297
3297
let ( start, step) = params. unwrap_or ( ( 0 , 1 ) ) ;
3298
- let is_order = order_token
3298
+ let is_ordered = order_token
3299
3299
. map ( |token| token. text ( ) . eq_ignore_ascii_case ( "order" ) )
3300
3300
. unwrap_or ( true ) ;
3301
3301
3302
3302
ColumnConstraint :: AutoIncrement {
3303
3303
start,
3304
3304
step,
3305
- is_order ,
3305
+ is_ordered ,
3306
3306
}
3307
3307
} ,
3308
3308
) ,
@@ -3373,15 +3373,15 @@ pub fn column_def(i: Input) -> IResult<ColumnDefinition> {
3373
3373
ColumnConstraint :: AutoIncrement {
3374
3374
start,
3375
3375
step,
3376
- is_order ,
3376
+ is_ordered ,
3377
3377
} => {
3378
3378
if matches ! ( def. expr, Some ( ColumnExpr :: Default ( _) ) ) {
3379
3379
return Err ( nom:: Err :: Error ( Error :: from_error_kind (
3380
3380
i,
3381
3381
ErrorKind :: Other ( "DEFAULT and AUTOINCREMENT cannot exist at the same time" ) ,
3382
3382
) ) ) ;
3383
3383
}
3384
- if !is_order {
3384
+ if !is_ordered {
3385
3385
return Err ( nom:: Err :: Error ( Error :: from_error_kind (
3386
3386
i,
3387
3387
ErrorKind :: Other ( "AUTOINCREMENT only support ORDER now" ) ,
@@ -3390,7 +3390,7 @@ pub fn column_def(i: Input) -> IResult<ColumnDefinition> {
3390
3390
def. expr = Some ( ColumnExpr :: AutoIncrement ( AutoIncrement {
3391
3391
start,
3392
3392
step,
3393
- is_order ,
3393
+ is_ordered ,
3394
3394
} ) )
3395
3395
}
3396
3396
}
You can’t perform that action at this time.
0 commit comments