| 220 | } |
| 221 | |
| 222 | void RdbSaveGraphSchema_v13(RedisModuleIO *rdb, GraphContext *gc) { |
| 223 | /* Format: |
| 224 | * attribute keys (unified schema) |
| 225 | * #node schemas |
| 226 | * node schema X #node schemas |
| 227 | * #relation schemas |
| 228 | * relation schema X #relation schemas |
| 229 | */ |
| 230 | |
| 231 | // Serialize all attribute keys |
| 232 | _RdbSaveAttributeKeys(rdb, gc); |
| 233 | |
| 234 | // #Node schemas. |
| 235 | unsigned short schema_count = GraphContext_SchemaCount(gc, SCHEMA_NODE); |
| 236 | RedisModule_SaveUnsigned(rdb, schema_count); |
| 237 | |
| 238 | // Name of label X #node schemas. |
| 239 | for(int i = 0; i < schema_count; i++) { |
| 240 | Schema *s = gc->node_schemas[i]; |
| 241 | _RdbSaveSchema(rdb, s); |
| 242 | } |
| 243 | |
| 244 | // #Relation schemas. |
| 245 | unsigned short relation_count = GraphContext_SchemaCount(gc, SCHEMA_EDGE); |
| 246 | RedisModule_SaveUnsigned(rdb, relation_count); |
| 247 | |
| 248 | // Name of label X #relation schemas. |
| 249 | for(unsigned short i = 0; i < relation_count; i++) { |
| 250 | Schema *s = gc->relation_schemas[i]; |
| 251 | _RdbSaveSchema(rdb, s); |
| 252 | } |
| 253 | } |
| 254 |
no test coverage detected