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
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
def update(self, value): return Reference().update(value)
def set(self, value): return Reference().set(value)
def get(self): return Reference().get(etag=False, shallow=False)
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)