You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by "liyuheng55555 (via GitHub)" <gi...@apache.org> on 2024/12/25 02:39:04 UTC
[PR] Add database name for table model CLI [iotdb]
liyuheng55555 opened a new pull request, #14544:
URL: https://github.com/apache/iotdb/pull/14544
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add database name for table model CLI [iotdb]
Posted by "JackieTien97 (via GitHub)" <gi...@apache.org>.
JackieTien97 commented on code in PR #14544:
URL: https://github.com/apache/iotdb/pull/14544#discussion_r1897070509
##########
iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java:
##########
@@ -881,4 +883,13 @@ static boolean processCommand(CliContext ctx, String s, IoTDBConnection connecti
}
return true;
}
+
+ private static void updateUsingDatabaseIfNecessary(String database) {
+ if (!Objects.equals(usingDatabase, database)) {
+ usingDatabase = database;
+ if (sqlDialect != null && Model.TABLE.name().equals(sqlDialect.toUpperCase())) {
Review Comment:
what if usingDatabase is null? IOTDB_CLI_PREFIX should be IOTDB instead of "IOTDB:"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add database name for table model CLI [iotdb]
Posted by "liyuheng55555 (via GitHub)" <gi...@apache.org>.
liyuheng55555 commented on code in PR #14544:
URL: https://github.com/apache/iotdb/pull/14544#discussion_r1897076062
##########
iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java:
##########
@@ -881,4 +883,13 @@ static boolean processCommand(CliContext ctx, String s, IoTDBConnection connecti
}
return true;
}
+
+ private static void updateUsingDatabaseIfNecessary(String database) {
+ if (!Objects.equals(usingDatabase, database)) {
+ usingDatabase = database;
+ if (sqlDialect != null && Model.TABLE.name().equals(sqlDialect.toUpperCase())) {
Review Comment:
OK, I've changed this part
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add database name for table model CLI [iotdb]
Posted by "liyuheng55555 (via GitHub)" <gi...@apache.org>.
liyuheng55555 commented on code in PR #14544:
URL: https://github.com/apache/iotdb/pull/14544#discussion_r1897077227
##########
iotdb-client/cli/src/main/java/org/apache/iotdb/cli/AbstractCli.java:
##########
@@ -881,4 +883,13 @@ static boolean processCommand(CliContext ctx, String s, IoTDBConnection connecti
}
return true;
}
+
+ private static void updateUsingDatabaseIfNecessary(String database) {
+ if (!Objects.equals(usingDatabase, database)) {
+ usingDatabase = database;
+ if (sqlDialect != null && Model.TABLE.name().equals(sqlDialect.toUpperCase())) {
Review Comment:
But still wondering in which case the "usingDatabase" will changed from not-null to null, seems we don't have "unuse database" statement for now
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Add database name for table model CLI [iotdb]
Posted by "JackieTien97 (via GitHub)" <gi...@apache.org>.
JackieTien97 merged PR #14544:
URL: https://github.com/apache/iotdb/pull/14544
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org