Exemple #1
0
 /// <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);
     }
 }
Exemple #2
0
 /// <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);
     }
 }
Exemple #3
0
 /// <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)
 {
     // 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);
     }
 }