예제 #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
예제 #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
예제 #3
0
 def update(self, value):
     return Reference().update(value)
예제 #4
0
 def set(self, value):
     return Reference().set(value)
예제 #5
0
 def get(self):
     return Reference().get(etag=False, shallow=False)
예제 #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)