()
| 297 | |
| 298 | #[test] |
| 299 | fn parse_drop_index_if_exists() { |
| 300 | let stmt = ok("DROP INDEX IF EXISTS idx_name"); |
| 301 | match stmt { |
| 302 | NodedbStatement::Collection(CollectionStmt::DropIndex { |
| 303 | name, if_exists, .. |
| 304 | }) => { |
| 305 | assert_eq!(name, "idx_name"); |
| 306 | assert!(if_exists); |
| 307 | } |
| 308 | other => panic!("expected DropIndex, got {other:?}"), |
| 309 | } |
| 310 | } |
| 311 | |
| 312 | #[test] |
| 313 | fn parse_analyze() { |