From 76f19a7a4983b408266ca9b65a3c62835329eca8 Mon Sep 17 00:00:00 2001 From: StoneT2000 Date: Sat, 27 Jul 2019 13:07:04 +0800 Subject: [PATCH] Headings fix for connector docs --- documentation/tdenginedocs-en/connector/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/documentation/tdenginedocs-en/connector/index.html b/documentation/tdenginedocs-en/connector/index.html index 77abc122e5..512da3ffc1 100644 --- a/documentation/tdenginedocs-en/connector/index.html +++ b/documentation/tdenginedocs-en/connector/index.html @@ -177,7 +177,7 @@ public Connection getConn() throws Exception{
  • data: the returned data array. If no data is returned, only an affected_rows field is listed
  • rows: the number of rows returned
  • -

    Example

    +

    Example

    If the above steps didn't work for you, please visit Microsoft's Node.js Guidelines for Windows for additional tips.

    To target native ARM64 Node.js on Windows 10 on ARM, add the components "Visual C++ compilers and libraries for ARM64" and "Visual C++ ATL for ARM64".

    -

    Usage

    +

    Usage

    The following is a short summary of the basic usage of the connector, the full api and documentation can be found here

    -

    Connection

    +

    Connection

    To use the connector, first require the library td-connector. Running the function taos.connect with the connection options passed in as an object will return a TDengine connection object. The required connection option is host, other options if not set, will be the default values as shown below.

    A cursor also needs to be initialized in order to interact with TDengine from Node.js.

    const taos = require('td-connector');
    @@ -259,7 +259,7 @@ var conn = taos.connect({host:"127.0.0.1", user:"root", password:"taosdata", con
     var cursor = conn.cursor(); // Initializing a new cursor

    To close a connection, run

    conn.close();
    -

    Queries

    +

    Queries

    We can now start executing simple queries through the cursor.query function, which returns a TaosQuery object.

    var query = cursor.query('show databases;')

    We can get the results of the queries through the query.execute() function, which returns a promise that resolves with a TaosResult object, which contains the raw data and additional functionalities such as pretty printing the results.

    @@ -277,8 +277,8 @@ query.execute().then(function(result) { promise.then(function(result) { result.pretty(); }) -

    Async functionality

    +

    Async functionality

    Coming soon

    -

    Example

    +

    Example

    An example of using the NodeJS connector to create a table with weather data and create and execute queries can be found here (The preferred method for using the connector)

    An example of using the NodeJS connector to achieve the same things but without all the object wrappers that wrap around the data returned to achieve higher functionality can be found here

    Back \ No newline at end of file -- GitLab