markgomer opened a new pull request, #1200:
URL: https://github.com/apache/age/pull/1200

   `load_labels_from_file` and `load_edges_from_file` now checks if there's 
already a graph and label with the provided name and creates it if there isn't. 
So it won't need to issue `SELECT create_graph();` and `SELECT 
create_vlabel();` with these functions calls.
   
   Importing csv files **before**:
   
   ```sql
   SELECT create_graph('agload');
   SELECT create_vlabel('agload','Country');
   SELECT load_labels_from_file('agload', 'Country', '/countries.csv');
   
   SELECT create_elabel('agload','has_city');
   SELECT load_edges_from_file('agload', 'has_city', 'edges.csv');
   ```
   
   Importing csv files **after** proposed changes:
   
   ```sql
   SELECT load_labels_from_file('agload_test_graph', 'Country', 
'age_load/countries.csv');
   NOTICE:  graph "agload_test_graph" has been created
   NOTICE:  VLabel "Country" has been created
    load_labels_from_file 
   -----------------------
    
   (1 row)
   
   SELECT load_edges_from_file('agload_test_graph', 'has_city', 
'age_load/edges.csv');
   NOTICE:  ELabel "has_city" has been created
    load_edges_from_file 
   ----------------------
    
   (1 row)
   ```
   
   These proposed changes may improve user experience by increasing automation 
and requiring less commands for the same task, also decreasing error chances of 
wrong issued commands.
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to