WendelLana commented on issue #1092: URL: https://github.com/apache/age/issues/1092#issuecomment-1686827460
I have revised the `get_label_id_from_entity` function to only obtain the `graph_Oid` through the graph name. Subsequently, I invoke the new function `get_label_id_from_entity_by_oid`, which performs the same job as the original `get_label_id_from_entity` function (having the `graph_Oid` as an argument instead of the `graph_name`) and returns the label id. Calls in `get_label_id_from_entity`: ``` gcd = search_graph_name_cache(graph_name); graph_oid = get_label_id_from_entity_by_oid(entity, gcd->oid); ``` New function declaration: ``` int32 get_label_id_from_entity_by_oid(agtype_value *entity, Oid graph_oid); ``` Next, I added the label id as an argument in `entity_exists` function. Additionally, I modified the `merge_vertex` and `create_vertex` functions to get the graph Oid and obtain the label ID from the vertex entity by using the `get_label_id_from_entity_by_oid` function. Then, I pass the acquired label ID to the `entity_exists` function. Extract the label ID in `create_vertex` and `merge_vertex` functions from the vertex entity: ``` label_id = get_label_id_from_entity_by_oid(v, css->graph_oid); ``` This all was done in [PR #8](https://github.com/rafsun42/age/pull/8) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@age.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org