/// <summary> /// Updates the given node within the database system. /// </summary> /// <param name="node">The node to update</param> public void UpdateNode(BasicNodeModel node) { // Update the node in the autocomplete database using (CassandraDriver autocompleteDriver = new CassandraDriver()) { autocompleteDriver.UpdateNode(node); } // Update the node in the graph database using (NeoDriver graphDriver = new NeoDriver()) { graphDriver.UpdateNode(node); } }
/// <summary> /// Deletes the node with the specified id from the database. /// </summary> /// <param name="id">The id of the node to delete</param> public void DeleteNode(Guid id) { // Delete the node from the autocomplete database using (CassandraDriver autocompleteDriver = new CassandraDriver()) { autocompleteDriver.DeleteNode(id.ToString()); } // Delete the node from the graph database using (NeoDriver graphDriver = new NeoDriver()) { graphDriver.DeleteNode(id); } }
/// <summary> /// Adds the given node into the database system. /// </summary> /// <param name="node">The node to add to the system</param> public void AddNode(BasicNodeModel node) { // Map the node's information for information marked as "New addition" MapNewAdditions(ref node); // Add the node into the autocomplete database using (CassandraDriver autocompleteDriver = new CassandraDriver()) { autocompleteDriver.AddNode(node); } // Add the node to the graph using (NeoDriver graphDriver = new NeoDriver()) { graphDriver.AddNode(node); } }