diff --git a/docs/examples/node/connect.js b/docs/examples/node/connect.js index aa5058bd50dca7d55d6e0910e69b1cc337ec962a..80ac5d82f40a92de66882a6a5f574f14e4ab68e1 100644 --- a/docs/examples/node/connect.js +++ b/docs/examples/node/connect.js @@ -1,4 +1,4 @@ -const { options, connect } = require("td2.0-rest-connector"); +import { options, connect } from "@tdengine/rest"; async function test() { options.url = process.env.TDENGINE_CLOUD_URL; @@ -6,7 +6,7 @@ async function test() { let conn = connect(options); let cursor = conn.cursor(); try { - let res = await cursor.query("select server_version()"); + let res = await cursor.query("show databases()"); res.toString(); } catch (err) { console.log(err); diff --git a/docs/examples/python/develop_tutorial.py b/docs/examples/python/develop_tutorial.py index 0d7a1c0e9aeaa72575a031ec27542e22f75bb0c2..9d2b35e8b231002a28ff0a369313c7efbcbc872a 100644 --- a/docs/examples/python/develop_tutorial.py +++ b/docs/examples/python/develop_tutorial.py @@ -11,8 +11,6 @@ url = os.environ["TDENGINE_CLOUD_URL"] token = os.environ["TDENGINE_CLOUD_TOKEN"] conn = taosrest.connect(url=url, token=token) -# test the connection by getting version info -print("server version:", conn.server_info) # ANCHOR_END: connect # ANCHOR: insert # create super table