Skip to content

Commit

Permalink
Merge pull request #258 from tseaver/167-connection_save_entity
Browse files Browse the repository at this point in the history
Fix #167:  Update docstring for 'Connection.save_entity'.
  • Loading branch information
tseaver committed Oct 17, 2014
2 parents 906700b + 8e40313 commit be5edde
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
5 changes: 5 additions & 0 deletions gcloud/datastore/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,11 @@ def commit(self, dataset_id, mutation_pb):
def save_entity(self, dataset_id, key_pb, properties):
"""Save an entity to the Cloud Datastore with the provided properties.
.. note::
Any existing properties for the entity identified by 'key_pb'
will be replaced by those passed in 'properties'; properties
not passed in 'properties' no longer be set for the entity.
:type dataset_id: string
:param dataset_id: The dataset in which to save the entity.
Expand Down
6 changes: 6 additions & 0 deletions gcloud/datastore/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,12 @@ def reload(self):
def save(self):
"""Save the entity in the Cloud Datastore.
.. note::
Any existing properties for the entity will be replaced by those
currently set on this instance. Already-stored properties which do
not correspond to keys set on this instance will be removed from
the datastore.
:rtype: :class:`gcloud.datastore.entity.Entity`
:returns: The entity with a possibly updated Key.
"""
Expand Down

0 comments on commit be5edde

Please sign in to comment.