-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Temp commit with idea to clear up cyclic imports in datastore package.
This is intended for discussion but not to be committed. Some remarks: - This surfaces the fact that the use of Dataset in datastore.key.Key.from_protobuf is not well-tested enough. - The changes to _helpers are made to avoid explicitly referencing the Entity class. These changes end up in uglier code for a minimal gain. - We could likely factor out the Dataset ID/connection concept from the full "dataset" concept. It seems a Dataset and its convenience methods are referenced a lot in the docs but not really tested much.
- Loading branch information
Showing
9 changed files
with
57 additions
and
76 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
"""Needs module docstring.""" | ||
|
||
|
||
class _Dataset(object): | ||
"""Needs class docstring.""" | ||
|
||
def __init__(self, id, connection=None): | ||
self._connection = connection | ||
self._id = id | ||
|
||
def connection(self): | ||
"""Needs method docstring.""" | ||
return self._connection | ||
|
||
def id(self): | ||
"""Needs method docstring.""" | ||
return self._id |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters