-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Implemented JDBC for IoTDB based on tables #14656
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
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.
sync remote and local code
jdbc activeByDefault get-jar-with-dependencies
iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java
Outdated
Show resolved
Hide resolved
iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBConnection.java
Show resolved
Hide resolved
iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBAbstractDatabaseMetadata.java
Outdated
Show resolved
Hide resolved
iotdb-client/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
Outdated
Show resolved
Hide resolved
...ent/jdbc/src/main/java/org/apache/iotdb/jdbc/relational/IoTDBRelationalDatabaseMetadata.java
Outdated
Show resolved
Hide resolved
...ent/jdbc/src/main/java/org/apache/iotdb/jdbc/relational/IoTDBRelationalDatabaseMetadata.java
Show resolved
Hide resolved
...ent/jdbc/src/main/java/org/apache/iotdb/jdbc/relational/IoTDBRelationalDatabaseMetadata.java
Show resolved
Hide resolved
...ent/jdbc/src/main/java/org/apache/iotdb/jdbc/relational/IoTDBRelationalDatabaseMetadata.java
Outdated
Show resolved
Hide resolved
| } | ||
|
|
||
| static { | ||
| String[] allIotdbSQLKeywords = { |
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.
keywords of table and tree model are different, you can find keywords of table model in https://timechor.feishu.cn/docx/U5OHdYQs1oR0hVxvy5Ucw0KUnBf
| ResultSet resultSet = null; | ||
| Statement statement = null; | ||
| String result = ""; | ||
| try { | ||
| statement = connection.createStatement(); | ||
| StringBuilder str = new StringBuilder(""); | ||
| resultSet = statement.executeQuery(SHOW_FUNCTIONS); | ||
| List<String> listFunction = Arrays.asList("MAX_TIME", "MIN_TIME", "TIME_DIFFERENCE", "NOW"); | ||
| while (resultSet.next()) { | ||
| if (listFunction.contains(resultSet.getString(1))) { | ||
| continue; | ||
| } | ||
| str.append(resultSet.getString(1)).append(","); | ||
| } | ||
| result = str.toString(); | ||
| if (!result.isEmpty()) { | ||
| result = result.substring(0, result.length() - 1); | ||
| } | ||
| } catch (Exception e) { | ||
| LOGGER.error("Get numeric functions error: {}", e.getMessage()); | ||
| } finally { | ||
| close(resultSet, statement); | ||
| } | ||
| return result; | ||
| } |
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.
not right
CritasWang
left a comment
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.
LGTM
Primary Changes
Key Results