()
| 117 | |
| 118 | #[test] |
| 119 | fn parse_create_collection() { |
| 120 | let stmt = ok("CREATE COLLECTION users (id INT, name TEXT)"); |
| 121 | match stmt { |
| 122 | NodedbStatement::Collection(CollectionStmt::CreateCollection { |
| 123 | name, |
| 124 | if_not_exists, |
| 125 | .. |
| 126 | }) => { |
| 127 | assert_eq!(name, "users"); |
| 128 | assert!(!if_not_exists); |
| 129 | } |
| 130 | other => panic!("expected CreateCollection, got {other:?}"), |
| 131 | } |
| 132 | } |
| 133 | |
| 134 | #[test] |
| 135 | fn parse_create_collection_if_not_exists() { |