returns an SIArray of all keys in graph entity properties
| 46 | |
| 47 | // returns an SIArray of all keys in graph entity properties |
| 48 | SIValue GraphEntity_Keys |
| 49 | ( |
| 50 | const GraphEntity *e |
| 51 | ) { |
| 52 | GraphContext *gc = QueryCtx_GetGraphCtx(); |
| 53 | const AttributeSet set = GraphEntity_GetAttributes(e); |
| 54 | int prop_count = AttributeSet_Count(set); |
| 55 | SIValue keys = SIArray_New(prop_count); |
| 56 | for(int i = 0; i < prop_count; i++) { |
| 57 | Attribute_ID attr_id; |
| 58 | AttributeSet_GetIdx(set, i, &attr_id); |
| 59 | const char *key = GraphContext_GetAttributeString(gc, attr_id); |
| 60 | SIArray_Append(&keys, SI_ConstStringVal(key)); |
| 61 | } |
| 62 | return keys; |
| 63 | } |
| 64 | |
| 65 | // returns a map containing all the properties in the given node, or edge. |
| 66 | SIValue GraphEntity_Properties |
no test coverage detected