| 69 | } |
| 70 | |
| 71 | static void _RdbSaveEntity |
| 72 | ( |
| 73 | RedisModuleIO *rdb, |
| 74 | const GraphEntity *e |
| 75 | ) { |
| 76 | // Format: |
| 77 | // #attributes N |
| 78 | // (name, value type, value) X N |
| 79 | |
| 80 | const AttributeSet set = GraphEntity_GetAttributes(e); |
| 81 | uint16_t attr_count = AttributeSet_Count(set); |
| 82 | |
| 83 | RedisModule_SaveUnsigned(rdb, attr_count); |
| 84 | |
| 85 | for(int i = 0; i < attr_count; i++) { |
| 86 | Attribute_ID attr_id; |
| 87 | SIValue value = AttributeSet_GetIdx(set, i, &attr_id); |
| 88 | RedisModule_SaveUnsigned(rdb, attr_id); |
| 89 | _RdbSaveSIValue(rdb, &value); |
| 90 | } |
| 91 | } |
| 92 | |
| 93 | static void _RdbSaveEdge |
| 94 | ( |
no test coverage detected