Skip to content

Commit

Permalink
新增支持 DuckDB-高性能多文件格式 OLAP 数据库
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyLemon committed Jan 10, 2025
1 parent 07b4ace commit 138205c
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ public abstract class AbstractSQLConfig<T extends Object> implements SQLConfig<T
DATABASE_LIST.add(DATABASE_CASSANDRA);
DATABASE_LIST.add(DATABASE_KAFKA);
DATABASE_LIST.add(DATABASE_MQ);
DATABASE_LIST.add(DATABASE_DUCKDB);


RAW_MAP = new LinkedHashMap<>(); // 保证顺序,避免配置冲突等意外情况
Expand Down Expand Up @@ -1332,6 +1333,14 @@ public static boolean isSQLite(String db) {
return DATABASE_SQLITE.equals(db);
}

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

@Override
public String getQuote() { // MongoDB 同时支持 `tbl` 反引号 和 "col" 双引号
if(isElasticsearch() || isIoTDB()) {
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 @@ -43,6 +43,7 @@ public interface SQLConfig<T extends Object> {
String DATABASE_MONGODB = "MONGODB"; // https://www.mongodb.com/docs/atlas/data-federation/query/query-with-sql
String DATABASE_KAFKA = "KAFKA"; // https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-Java-Server/APIJSONDemo-MultiDataSource-Kafka
String DATABASE_SQLITE = "SQLITE"; // https://www.sqlite.org
String DATABASE_DUCKDB = "DUCKDB"; // https://duckdb.org

String DATABASE_MQ = "MQ"; //

Expand Down Expand Up @@ -97,6 +98,7 @@ public interface SQLConfig<T extends Object> {
boolean isKafka();
boolean isMQ();
boolean isSQLite();
boolean isDuckDB();


// 暂时只兼容以上几种
Expand Down

0 comments on commit 138205c

Please sign in to comment.