Automated update of Base Application package.
This commit is contained in:
parent
0cde635443
commit
b15f7e6d53
BIN
dist/app-1.0.0-py3-none-any.whl
vendored
BIN
dist/app-1.0.0-py3-none-any.whl
vendored
Binary file not shown.
BIN
dist/app-1.0.0.tar.gz
vendored
BIN
dist/app-1.0.0.tar.gz
vendored
Binary file not shown.
@ -172,13 +172,13 @@ class WebDbApplication(BaseApplication):
|
|||||||
return web.json_response(response)
|
return web.json_response(response)
|
||||||
|
|
||||||
async def set(self, key, value):
|
async def set(self, key, value):
|
||||||
return self.sset(key,value)
|
return self.sset(key, value)
|
||||||
|
|
||||||
def sset(self, key, value):
|
def sset(self, key, value):
|
||||||
value = json.dumps(value, default=str)
|
value = json.dumps(value, default=str)
|
||||||
return self.db["kv"].upsert({"key": key, "value": value}, ["key"])
|
return self.db["kv"].upsert({"key": key, "value": value}, ["key"])
|
||||||
|
|
||||||
async def get(key,default=None):
|
async def get(key, default=None):
|
||||||
return self.sget(key, default)
|
return self.sget(key, default)
|
||||||
|
|
||||||
def sget(self, key, default=None):
|
def sget(self, key, default=None):
|
||||||
@ -188,8 +188,6 @@ class WebDbApplication(BaseApplication):
|
|||||||
return result == "null" and default or json.loads(result)
|
return result == "null" and default or json.loads(result)
|
||||||
return default
|
return default
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
async def insert(self, table_name, data):
|
async def insert(self, table_name, data):
|
||||||
return self.db[table_name].insert(data)
|
return self.db[table_name].insert(data)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user