mirror of
https://github.com/lfnovo/open-notebook.git
synced 2026-04-28 19:40:50 +00:00
refactor objectmodel
This commit is contained in:
parent
f140a5e228
commit
c297dcb809
8 changed files with 186 additions and 68 deletions
|
|
@ -40,6 +40,11 @@ def repo_create(table: str, data: Dict[str, Any]):
|
|||
return repo_query(query)
|
||||
|
||||
|
||||
def repo_upsert(table: str, data: Dict[str, Any]):
|
||||
query = f"UPSERT {table} CONTENT {data};"
|
||||
return repo_query(query)
|
||||
|
||||
|
||||
def repo_update(id: str, data: Dict[str, Any]):
|
||||
query = "UPDATE $id CONTENT $data;"
|
||||
vars = {"id": id, "data": data}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue