iotdb-rs 0.0.2

Rust client for Apache IotDB
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::rpc::TSExecuteStatementResp;
use prettytable::{Cell, Row, Table};

pub fn result_set(resp: TSExecuteStatementResp) {
    let mut table = Table::new();

    // Add Columns
    let mut cells: Vec<Cell> = vec![];
    for cell in resp.columns.unwrap() {
        cells.push(Cell::new(cell.as_str()))
    }
    table.add_row(Row::new(cells));

    //TODO Add values rows

    // Print the table to stdout
    table.printstd();
}