Skip to content

Commit 30fe0de

Browse files
author
nicoxx
committed
Migrate dal from ndb to gcloud datastore
tests remains rougly the same, except: -some cleans where it used ndb directly -new tests for empty collection management: (because on gcloud, when the value associated to en entry is an empty list, the entry is not saved at all) dbentities is removed because there is no equivalent of strongly typed "entity" type in gcloud. All is just dictionaries Dal is now a class (explained in previous commit about Dal clients) The client methods remains the same: of the kind -save_entity(struct.entities) -get_entity(struct_key) They call private methods - _to_db_entity(struct.entity) - _to_entity(db_entity) : outside dal instance because they doen't use Dal class field (gcloud client) some new private methods are created for refactoring. Dal client is instanciated with a mock credential in test environment (as advised in googleapis/google-cloud-python#1839 )
1 parent 7e59d50 commit 30fe0de

File tree

4 files changed

+461
-486
lines changed

4 files changed

+461
-486
lines changed

0 commit comments

Comments
 (0)