()
| 123 | } |
| 124 | |
| 125 | function setupSetClauseGraph(): Graph<TestSchema> { |
| 126 | const graph = new Graph({ |
| 127 | schema, |
| 128 | storage: new InMemoryGraphStorage(), |
| 129 | validateProperties: false, |
| 130 | }); |
| 131 | |
| 132 | // Create test data |
| 133 | graph.addVertex("Person", { |
| 134 | name: "Alice", |
| 135 | age: 30, |
| 136 | salary: 50000, |
| 137 | department: "Engineering", |
| 138 | }); |
| 139 | graph.addVertex("Person", { |
| 140 | name: "Bob", |
| 141 | age: 35, |
| 142 | salary: 60000, |
| 143 | department: "Sales", |
| 144 | }); |
| 145 | graph.addVertex("Person", { |
| 146 | name: "Charlie", |
| 147 | age: 25, |
| 148 | salary: 45000, |
| 149 | department: "Engineering", |
| 150 | }); |
| 151 | graph.addVertex("Person", { |
| 152 | name: "Diana", |
| 153 | age: null, |
| 154 | salary: null, |
| 155 | department: null, |
| 156 | }); |
| 157 | graph.addVertex("Person", { |
| 158 | name: "Eve", |
| 159 | age: 35, |
| 160 | salary: 70000, |
| 161 | department: "Engineering", |
| 162 | }); |
| 163 | |
| 164 | return graph; |
| 165 | } |
| 166 | |
| 167 | test("ORDER BY Enhancements - ASCENDING / DESCENDING full keywords - should parse ASCENDING keyword", () => { |
| 168 | const ast = parse("MATCH (p:Person) RETURN p ORDER BY p.age ASCENDING") as Query; |
no test coverage detected