Beispiel #1
0
    def __query_keys(self, ref: Reference) -> List[str]:
        vals = ref.get()
        if vals is None:
            return []

        keys = []
        for key, val in vals.items():
            keys.append(key)
        return keys
Beispiel #2
0
    def __query_list(self, ref: Reference) -> List[str]:
        vals = ref.get()
        if vals is None:
            return []

        result = []
        for key, val in vals.items():
            result.append(val)
        return result
Beispiel #3
0
 def update(self, value):
     return Reference().update(value)
Beispiel #4
0
 def set(self, value):
     return Reference().set(value)
Beispiel #5
0
 def get(self):
     return Reference().get(etag=False, shallow=False)
Beispiel #6
0
    def reference(self, path='/', app=None, url=None):

        service = _utils.get_app_service(app, _DB_ATTRIBUTE, _DatabaseService)
        client = service.get_client(url)
        return Reference(client=client, path=path)