/**
  * Updates the given node in the database.
  *
  * @param  Cartalyst\NestedSets\Nodes\NodeInterface  $node
  * @return void
  */
 public function updateNode(NodeInterface $node)
 {
     $keyName = $this->baseNode->getKeyName();
     $key = $node->getAttribute($keyName);
     $attributes = array_except($node->getAllAttributes(), [$this->getDepthAttributeName()]);
     $this->connection->table($this->getTable())->where($keyName, '=', $key)->update($attributes);
     $this->afterUpdateNode($node);
 }