You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ji...@apache.org on 2019/09/26 08:54:23 UTC
[incubator-iotdb] branch py_client updated: add deletion example
and update readme
This is an automated email from the ASF dual-hosted git repository.
jiangtian pushed a commit to branch py_client
in repository https://gitbox.apache.org/repos/asf/incubator-iotdb.git
The following commit(s) were added to refs/heads/py_client by this push:
new 07a576f add deletion example and update readme
07a576f is described below
commit 07a576fbdd6593f0c2d0de8dd8e74e413273970d
Author: 江天 <jt...@163.com>
AuthorDate: Thu Sep 26 16:54:13 2019 +0800
add deletion example and update readme
---
client-py/readme.md | 3 +--
client-py/src/client_example.py | 5 +++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/client-py/readme.md b/client-py/readme.md
index 852ce3f..5533426 100644
--- a/client-py/readme.md
+++ b/client-py/readme.md
@@ -18,5 +18,4 @@ you can add it to your `PYTHONPATH` so that you would be able to use the library
## Example
We provided an example of how to use the thrift library to connect to IoTDB in `src\client_example.py`, please read it
-carefully before you write your own code. The rpc interfaces are still limited in current version, for full functionality,
-please use our Java client and its JDBC.
+carefully before you write your own code.
diff --git a/client-py/src/client_example.py b/client-py/src/client_example.py
index 7b0d23b..c81559f 100644
--- a/client-py/src/client_example.py
+++ b/client-py/src/client_example.py
@@ -114,6 +114,11 @@ if __name__ == '__main__':
status = resp.status
print(status.statusType)
+ # execute deletion (or other statements)
+ resp = client.executeStatement(TSExecuteStatementReq(handle, "DELETE FROM root.group1 where time < 2"))
+ status = resp.status
+ print(status.statusType)
+
# query the data
stmt = "SELECT * FROM root.group1"
fetchSize = 2