This is an automated email from the ASF dual-hosted git repository.
humbedooh pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new 5ba898b Add an update command to the db plugin
5ba898b is described below
commit 5ba898bdafd485f161baddc7af67a2d1aa476e0b
Author: Daniel Gruno <[email protected]>
AuthorDate: Sun Sep 26 18:34:02 2021 -0500
Add an update command to the db plugin
---
server/plugins/database.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/server/plugins/database.py b/server/plugins/database.py
index 8aaf906..5290969 100644
--- a/server/plugins/database.py
+++ b/server/plugins/database.py
@@ -89,6 +89,12 @@ class Database:
res = await self.client.index(index=index, **kwargs)
return res
+ async def update(self, index="", **kwargs):
+ if not index:
+ index = self.dbs.session
+ res = await self.client.update(index=index, **kwargs)
+ return res
+
async def scan(self,
query=None,
scroll="5m",