Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #167: Update docstring for 'Connection.save_entity'. #258

Merged
merged 2 commits into from
Oct 17, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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