Skip to content

[pull] master from Tencent:master #308

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

Merged
merged 1 commit into from
Mar 2, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion APIJSONORM/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

<groupId>com.github.Tencent</groupId>
<artifactId>APIJSON</artifactId>
<version>7.6.0</version>
<version>7.7.0</version>
<packaging>jar</packaging>

<name>APIJSONORM</name>
Expand Down
2 changes: 1 addition & 1 deletion APIJSONORM/src/main/java/apijson/Log.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public class Log {

public static boolean DEBUG = true;

public static final String VERSION = "7.6.0";
public static final String VERSION = "7.7.0";
public static final String KEY_SYSTEM_INFO_DIVIDER = "\n---|-----APIJSON SYSTEM INFO-----|---\n";

public static final String OS_NAME;
Expand Down
11 changes: 10 additions & 1 deletion APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ public abstract class AbstractSQLConfig<T extends Object> implements SQLConfig<T
DATABASE_LIST.add(DATABASE_DAMENG);
DATABASE_LIST.add(DATABASE_KINGBASE);
DATABASE_LIST.add(DATABASE_ELASTICSEARCH);
DATABASE_LIST.add(DATABASE_MANTICORE);
DATABASE_LIST.add(DATABASE_CLICKHOUSE);
DATABASE_LIST.add(DATABASE_HIVE);
DATABASE_LIST.add(DATABASE_PRESTO);
Expand Down Expand Up @@ -1189,6 +1190,14 @@ public static boolean isElasticsearch(String db) {
return DATABASE_ELASTICSEARCH.equals(db);
}

@Override
public boolean isManticore() {
return isManticore(getSQLDatabase());
}
public static boolean isManticore(String db) {
return DATABASE_MANTICORE.equals(db);
}

@Override
public boolean isClickHouse() {
return isClickHouse(getSQLDatabase());
Expand Down Expand Up @@ -1344,7 +1353,7 @@ public static boolean isOpenGauss(String db) {

@Override
public String getQuote() { // MongoDB 同时支持 `tbl` 反引号 和 "col" 双引号
if(isElasticsearch() || isIoTDB() || isSurrealDB()) {
if(isElasticsearch() || isManticore() || isIoTDB() || isSurrealDB()) {
return "";
}
return isMySQL() || isMariaDB() || isTiDB() || isClickHouse() || isTDengine() || isMilvus() ? "`" : "\"";
Expand Down
2 changes: 2 additions & 0 deletions APIJSONORM/src/main/java/apijson/orm/SQLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ public interface SQLConfig<T extends Object> {
String DATABASE_DAMENG = "DAMENG"; // https://www.dameng.com
String DATABASE_KINGBASE = "KINGBASE"; // https://www.kingbase.com.cn
String DATABASE_ELASTICSEARCH = "ELASTICSEARCH"; // https://www.elastic.co/guide/en/elasticsearch/reference/7.4/xpack-sql.html
String DATABASE_MANTICORE = "MANTICORE"; // https://manticoresearch.com
String DATABASE_CLICKHOUSE = "CLICKHOUSE"; // https://clickhouse.com
String DATABASE_HIVE = "HIVE"; // https://hive.apache.org
String DATABASE_PRESTO = "PRESTO"; // Facebook PrestoDB https://prestodb.io
Expand Down Expand Up @@ -86,6 +87,7 @@ public interface SQLConfig<T extends Object> {
boolean isDameng();
boolean isKingBase();
boolean isElasticsearch();
boolean isManticore();
boolean isClickHouse();
boolean isHive();
boolean isPresto();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ else if (config.isKingBase()) {
else if (config.isElasticsearch()) {
db = SQLConfig.DATABASE_ELASTICSEARCH + " " + dbVersion;
}
else if (config.isManticore()) {
db = SQLConfig.DATABASE_MANTICORE + " " + dbVersion;
}
else if (config.isClickHouse()) {
db = SQLConfig.DATABASE_CLICKHOUSE + " " + dbVersion;
}
Expand Down