Skip to content
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

Open
wants to merge 22 commits into
base: master
Choose a base branch
from

Conversation

xiangmy21
Copy link

@xiangmy21 xiangmy21 commented Nov 14, 2024

Description

Added initial table model support for the C++ client. The main changes include:

  • Added sqlDialect and database members to the Session class.
  • Added columTypeList member to the Tablet class to identify column types.
  • Added insertRelationalTablet function to support inserting Table Model Tablets.
  • Added sessionRelationalIT.cpp test.
  • Added TableModelSessionExample.cpp example.
  • Extracted a TableSession class to support TableModel operations.

Copy link

@github-actions github-actions bot left a 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");
Copy link
Contributor

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.

Comment on lines 36 to 46
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;
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants