-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(client-cpp): add basic TableModel settings & insertRelationalTablet interface #14097
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, this is your first pull request in IoTDB project. Thanks for your contribution! IoTDB will be better because of you.
} | ||
|
||
cout << "Use db1 as database" << endl; | ||
session->executeNonQueryStatement("USE db1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a catch around each statement, or use a large catch surrounding all statements.
TSDataType::TSDataType getTSDataTypeFromString(const string &str) { | ||
// BOOLEAN, INT32, INT64, FLOAT, DOUBLE, TEXT, NULLTYPE | ||
// BOOLEAN, INT32, INT64, FLOAT, DOUBLE, TEXT, TIMESTAMP, NULLTYPE | ||
if (str == "BOOLEAN") return TSDataType::BOOLEAN; | ||
else if (str == "INT32") return TSDataType::INT32; | ||
else if (str == "INT64") return TSDataType::INT64; | ||
else if (str == "FLOAT") return TSDataType::FLOAT; | ||
else if (str == "DOUBLE") return TSDataType::DOUBLE; | ||
else if (str == "TEXT") return TSDataType::TEXT; | ||
else if (str == "TIMESTAMP") return TSDataType::INT64; | ||
else if (str == "NULLTYPE") return TSDataType::NULLTYPE; | ||
return TSDataType::TEXT; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May also add DATE
, BLOB
, and STRING
and update TSDataType.
Description
Added initial table model support for the C++ client. The main changes include:
sqlDialect
anddatabase
members to theSession
class.columTypeList
member to theTablet
class to identify column types.insertRelationalTablet
function to support inserting Table Model Tablets.sessionRelationalIT.cpp
test.TableModelSessionExample.cpp
example.TableSession
class to support TableModel operations.