1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
use crateConverter;
use crateWysgyResult;
use crate;
use crateNode;
use crateRel;
use glob;
use Table;
use ;
use max;
use error;
use fs;
use ;
use PathBuf;
use ;
// TODO: refactor into
// 1. GRAPH Operations
// These should be the actual graph operations on the nodes and relations.
// ex: link nodes, add node, remove node (and all rels with node), remove rel
// allow multiple links between nodes?
// 2. FILE Operations
// files naming should be completely indenpendent of graph operations
// to ensure that, we should not use files naming as part of the file contents
// ex: saving nodes to files - what should the name of a node be?
// (i) let user specify - CURRENT
// (ii) assign a name randomly, generated by time?
// (iii) assign incrementing numbers as names - n1, n2 - n is a prepending for node
//
// ex: saving rels to files
// (i) {src}_{dst} - CURRENT
// (ii) folder structure named by id (can delete entire folder of n1 when deleting node
// n2)
// -- n1
// -- n2
// -- r1
// -- r2
//
// -- n2
// -- n1
// -- r1
// -- r2
// (iii)
// 3. API Functions