@@ -243,20 +243,21 @@ NOTICE: graph "agload_conversion" has been created
243
243
244
244
(1 row)
245
245
246
+ -- vertex: load as agtype
246
247
SELECT create_vlabel('agload_conversion','Person1');
247
248
NOTICE: VLabel "Person1" has been created
248
249
create_vlabel
249
250
---------------
250
251
251
252
(1 row)
252
253
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 );
254
255
load_labels_from_file
255
256
-----------------------
256
257
257
258
(1 row)
258
259
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);
260
261
a
261
262
------------------------------------------------------------------------------------
262
263
{"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) $$)
267
268
{"id": 6, "bool": false, "__id__": 6, "string": "nUll", "numeric": 3.14}
268
269
(6 rows)
269
270
271
+ -- vertex: load as string
270
272
SELECT create_vlabel('agload_conversion','Person2');
271
273
NOTICE: VLabel "Person2" has been created
272
274
create_vlabel
273
275
---------------
274
276
275
277
(1 row)
276
278
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 );
278
280
load_labels_from_file
279
281
-----------------------
280
282
281
283
(1 row)
282
284
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
285
299
create_elabel
286
300
---------------
287
301
288
302
(1 row)
289
303
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 );
291
305
load_edges_from_file
292
306
----------------------
293
307
294
308
(1 row)
295
309
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);
297
311
a
298
312
--------------------------------------------------------------
299
313
{"bool": true, "string": "John Smith", "numeric": 1}
@@ -304,13 +318,39 @@ SELECT * FROM cypher('agload_conversion', $$ MATCH ()-[e]->() RETURN properties(
304
318
{"bool": false, "string": "nUll", "numeric": 3.14}
305
319
(6 rows)
306
320
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
+
307
346
SELECT drop_graph('agload_conversion', true);
308
- NOTICE: drop cascades to 5 other objects
347
+ NOTICE: drop cascades to 6 other objects
309
348
DETAIL: drop cascades to table agload_conversion._ag_label_vertex
310
349
drop cascades to table agload_conversion._ag_label_edge
311
350
drop cascades to table agload_conversion."Person1"
312
351
drop 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"
314
354
NOTICE: graph "agload_conversion" has been dropped
315
355
drop_graph
316
356
------------
0 commit comments