export default class Edge {
    splitEdge(n) {
        let toPrefix = n.to.split("-")[0]
        let fromPrefix = n.from.split("-")[0]
        let type = n.type
        return `${fromPrefix}_${type}_${toPrefix}`
    }

    add(n) {
        let prefix = this.splitEdge(n)
        global.db.addEdge(prefix, n)
    }

    delete(n) {
        let prefix = this.splitEdge(n)
        global.db.deleteEdge(prefix, n.from.split("-")[1])
    }

    getByFrom(fromID) {
        let result = []
        for(let i = 0; i < this.entries.length; i++) {
            if(entries[i].from === fromID) {
                // let 
            }
        }
    }
}