| 230 | } |
| 231 | |
| 232 | GraphEntity *Record_GetGraphEntity |
| 233 | ( |
| 234 | const Record r, |
| 235 | uint idx |
| 236 | ) { |
| 237 | Entry e = r->entries[idx]; |
| 238 | switch(e.type) { |
| 239 | case REC_TYPE_NODE: |
| 240 | return (GraphEntity *)Record_GetNode(r, idx); |
| 241 | case REC_TYPE_EDGE: |
| 242 | return (GraphEntity *)Record_GetEdge(r, idx); |
| 243 | default: |
| 244 | ErrorCtx_RaiseRuntimeException("encountered unexpected type when trying to retrieve graph entity"); |
| 245 | } |
| 246 | return NULL; |
| 247 | } |
| 248 | |
| 249 | void Record_Add |
| 250 | ( |
no test coverage detected