File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2819,6 +2819,7 @@ pub struct CreateIndex {
28192819 /// whether the index is created concurrently
28202820 pub concurrently : bool ,
28212821 /// whether the index is created asynchronously
2822+ /// [DSQL]: <https://docs.aws.amazon.com/aurora-dsql/latest/userguide/working-with-create-index-async.html>
28222823 pub r#async : bool ,
28232824 /// IF NOT EXISTS clause
28242825 pub if_not_exists : bool ,
Original file line number Diff line number Diff line change @@ -9623,6 +9623,12 @@ fn test_create_index_with_with_clause() {
96239623 }
96249624}
96259625
9626+ #[test]
9627+ fn parse_create_index_async() {
9628+ verified_stmt("CREATE INDEX ASYNC my_index ON my_table(col1)");
9629+ verified_stmt("CREATE UNIQUE INDEX ASYNC my_index ON my_table(col1)");
9630+ }
9631+
96269632#[test]
96279633fn parse_drop_index() {
96289634 let sql = "DROP INDEX idx_a";
Original file line number Diff line number Diff line change @@ -3227,26 +3227,6 @@ fn parse_create_index_concurrently() {
32273227 }
32283228}
32293229
3230- #[ test]
3231- fn parse_create_index_async ( ) {
3232- pg ( ) . verified_stmt ( "CREATE INDEX ASYNC my_index ON my_table(col1)" ) ;
3233-
3234- let sql = "CREATE UNIQUE INDEX ASYNC my_index ON my_table(col1)" ;
3235- match pg ( ) . verified_stmt ( sql) {
3236- Statement :: CreateIndex ( CreateIndex {
3237- unique,
3238- concurrently,
3239- r#async,
3240- ..
3241- } ) => {
3242- assert ! ( unique) ;
3243- assert ! ( !concurrently) ;
3244- assert ! ( r#async) ;
3245- }
3246- _ => unreachable ! ( ) ,
3247- }
3248- }
3249-
32503230#[ test]
32513231fn parse_create_index_with_predicate ( ) {
32523232 let sql = "CREATE INDEX IF NOT EXISTS my_index ON my_table(col1, col2) WHERE col3 IS NULL" ;
You can’t perform that action at this time.
0 commit comments