@@ -243,20 +243,21 @@ NOTICE: graph "agload_conversion" has been created
243243
244244(1 row)
245245
246+ -- vertex: load as agtype
246247SELECT create_vlabel('agload_conversion','Person1');
247248NOTICE: VLabel "Person1" has been created
248249 create_vlabel
249250---------------
250251
251252(1 row)
252253
253- SELECT load_labels_from_file('agload_conversion', 'Person1', 'age_load/conversion_vertices.csv');
254+ SELECT load_labels_from_file('agload_conversion', 'Person1', 'age_load/conversion_vertices.csv', true, true );
254255 load_labels_from_file
255256-----------------------
256257
257258(1 row)
258259
259- SELECT * FROM cypher('agload_conversion', $$ MATCH (n) RETURN properties(n) $$) as (a agtype);
260+ SELECT * FROM cypher('agload_conversion', $$ MATCH (n:Person1 ) RETURN properties(n) $$) as (a agtype);
260261 a
261262------------------------------------------------------------------------------------
262263 {"id": 1, "bool": true, "__id__": 1, "string": "John Smith", "numeric": 1}
@@ -267,33 +268,46 @@ SELECT * FROM cypher('agload_conversion', $$ MATCH (n) RETURN properties(n) $$)
267268 {"id": 6, "bool": false, "__id__": 6, "string": "nUll", "numeric": 3.14}
268269(6 rows)
269270
271+ -- vertex: load as string
270272SELECT create_vlabel('agload_conversion','Person2');
271273NOTICE: VLabel "Person2" has been created
272274 create_vlabel
273275---------------
274276
275277(1 row)
276278
277- SELECT load_labels_from_file('agload_conversion', 'Person2', 'age_load/conversion_vertices.csv');
279+ SELECT load_labels_from_file('agload_conversion', 'Person2', 'age_load/conversion_vertices.csv', true, false );
278280 load_labels_from_file
279281-----------------------
280282
281283(1 row)
282284
283- SELECT create_elabel('agload_conversion','Edges');
284- NOTICE: ELabel "Edges" has been created
285+ SELECT * FROM cypher('agload_conversion', $$ MATCH (n:Person2) RETURN properties(n) $$) as (a agtype);
286+ a
287+ -------------------------------------------------------------------------------------
288+ {"id": "1", "bool": "true", "__id__": 1, "string": "John Smith", "numeric": "1"}
289+ {"id": "2", "bool": "false", "__id__": 2, "string": "John", "numeric": "-2"}
290+ {"id": "3", "bool": "true", "__id__": 3, "string": "John Smith", "numeric": "1.4"}
291+ {"id": "4", "bool": "false", "__id__": 4, "string": "\"John\"", "numeric": "-1e10"}
292+ {"id": "5", "bool": "false", "__id__": 5, "string": "null", "numeric": "0"}
293+ {"id": "6", "bool": "false", "__id__": 6, "string": "nUll", "numeric": "3.14"}
294+ (6 rows)
295+
296+ -- edge: load as agtype
297+ SELECT create_elabel('agload_conversion','Edges1');
298+ NOTICE: ELabel "Edges1" has been created
285299 create_elabel
286300---------------
287301
288302(1 row)
289303
290- SELECT load_edges_from_file('agload_conversion', 'Edges ', 'age_load/conversion_edges.csv');
304+ SELECT load_edges_from_file('agload_conversion', 'Edges1 ', 'age_load/conversion_edges.csv', true );
291305 load_edges_from_file
292306----------------------
293307
294308(1 row)
295309
296- SELECT * FROM cypher('agload_conversion', $$ MATCH ()-[e]->() RETURN properties(e) $$) as (a agtype);
310+ SELECT * FROM cypher('agload_conversion', $$ MATCH ()-[e:Edges1 ]->() RETURN properties(e) $$) as (a agtype);
297311 a
298312--------------------------------------------------------------
299313 {"bool": true, "string": "John Smith", "numeric": 1}
@@ -304,13 +318,39 @@ SELECT * FROM cypher('agload_conversion', $$ MATCH ()-[e]->() RETURN properties(
304318 {"bool": false, "string": "nUll", "numeric": 3.14}
305319(6 rows)
306320
321+ -- edge: load as string
322+ SELECT create_elabel('agload_conversion','Edges2');
323+ NOTICE: ELabel "Edges2" has been created
324+ create_elabel
325+ ---------------
326+
327+ (1 row)
328+
329+ SELECT load_edges_from_file('agload_conversion', 'Edges2', 'age_load/conversion_edges.csv', false);
330+ load_edges_from_file
331+ ----------------------
332+
333+ (1 row)
334+
335+ SELECT * FROM cypher('agload_conversion', $$ MATCH ()-[e:Edges2]->() RETURN properties(e) $$) as (a agtype);
336+ a
337+ -------------------------------------------------------------
338+ {"bool": "true", "string": "John Smith", "numeric": "1"}
339+ {"bool": "false", "string": "John", "numeric": "-2"}
340+ {"bool": "true", "string": "John Smith", "numeric": "1.4"}
341+ {"bool": "false", "string": "\"John\"", "numeric": "-1e10"}
342+ {"bool": "false", "string": "null", "numeric": "0"}
343+ {"bool": "false", "string": "nUll", "numeric": "3.14"}
344+ (6 rows)
345+
307346SELECT drop_graph('agload_conversion', true);
308- NOTICE: drop cascades to 5 other objects
347+ NOTICE: drop cascades to 6 other objects
309348DETAIL: drop cascades to table agload_conversion._ag_label_vertex
310349drop cascades to table agload_conversion._ag_label_edge
311350drop cascades to table agload_conversion."Person1"
312351drop cascades to table agload_conversion."Person2"
313- drop cascades to table agload_conversion."Edges"
352+ drop cascades to table agload_conversion."Edges1"
353+ drop cascades to table agload_conversion."Edges2"
314354NOTICE: graph "agload_conversion" has been dropped
315355 drop_graph
316356------------
0 commit comments