File tree Expand file tree Collapse file tree 4 files changed +28
-6
lines changed Expand file tree Collapse file tree 4 files changed +28
-6
lines changed Original file line number Diff line number Diff line change 55
66 <groupId >com.github.Tencent</groupId >
77 <artifactId >APIJSON</artifactId >
8- <version >6.3 .0</version >
8+ <version >6.4 .0</version >
99 <packaging >jar</packaging >
1010
1111 <name >APIJSONORM</name >
Original file line number Diff line number Diff line change @@ -14,7 +14,7 @@ public class Log {
1414
1515 public static boolean DEBUG = true ;
1616
17- public static final String VERSION = "6.3 .0" ;
17+ public static final String VERSION = "6.4 .0" ;
1818 public static final String KEY_SYSTEM_INFO_DIVIDER = "\n ---|-----APIJSON SYSTEM INFO-----|---\n " ;
1919
2020 public static final String OS_NAME ;
Original file line number Diff line number Diff line change @@ -198,6 +198,8 @@ public abstract class AbstractSQLConfig<T extends Object> implements SQLConfig<T
198198 DATABASE_LIST .add (DATABASE_INFLUXDB );
199199 DATABASE_LIST .add (DATABASE_TDENGINE );
200200 DATABASE_LIST .add (DATABASE_REDIS );
201+ DATABASE_LIST .add (DATABASE_MONGODB );
202+ DATABASE_LIST .add (DATABASE_KAFKA );
201203 DATABASE_LIST .add (DATABASE_MQ );
202204
203205 RAW_MAP = new LinkedHashMap <>(); // 保证顺序,避免配置冲突等意外情况
@@ -1245,12 +1247,28 @@ public static boolean isRedis(String db) {
12451247 return DATABASE_REDIS .equals (db );
12461248 }
12471249
1250+ @ Override
1251+ public boolean isMongoDB () {
1252+ return isMongoDB (getSQLDatabase ());
1253+ }
1254+ public static boolean isMongoDB (String db ) {
1255+ return DATABASE_MONGODB .equals (db );
1256+ }
1257+
1258+ @ Override
1259+ public boolean isKafka () {
1260+ return isKafka (getSQLDatabase ());
1261+ }
1262+ public static boolean isKafka (String db ) {
1263+ return DATABASE_KAFKA .equals (db );
1264+ }
1265+
12481266 @ Override
12491267 public boolean isMQ () {
12501268 return isMQ (getSQLDatabase ());
12511269 }
12521270 public static boolean isMQ (String db ) {
1253- return DATABASE_MQ . equals (db );
1271+ return isKafka (db );
12541272 }
12551273
12561274 @ Override
Original file line number Diff line number Diff line change @@ -36,8 +36,10 @@ public interface SQLConfig<T extends Object> {
3636 String DATABASE_CASSANDRA = "CASSANDRA" ; // https://cassandra.apache.org
3737 String DATABASE_INFLUXDB = "INFLUXDB" ; // https://www.influxdata.com/products/influxdb-overview
3838 String DATABASE_TDENGINE = "TDENGINE" ; // https://tdengine.com
39- String DATABASE_REDIS = "REDIS" ;
40- String DATABASE_MQ = "MQ" ;
39+ String DATABASE_REDIS = "REDIS" ; // https://redisql.com
40+ String DATABASE_MONGODB = "MONGODB" ; // https://www.mongodb.com/docs/atlas/data-federation/query/query-with-sql
41+ String DATABASE_KAFKA = "KAFKA" ; // https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-Java-Server/APIJSONDemo-MultiDataSource-Kafka
42+ String DATABASE_MQ = "MQ" ; //
4143
4244 String SCHEMA_INFORMATION = "information_schema" ; //MySQL, PostgreSQL, SQL Server 都有的系统模式
4345 String SCHEMA_SYS = "sys" ; //SQL Server 系统模式
@@ -84,10 +86,12 @@ public interface SQLConfig<T extends Object> {
8486 boolean isInfluxDB ();
8587 boolean isTDengine ();
8688 boolean isRedis ();
89+ boolean isMongoDB ();
90+ boolean isKafka ();
8791 boolean isMQ ();
8892
8993
90- //暂时只兼容以上几种
94+ // 暂时只兼容以上几种
9195 // boolean isSQL();
9296 // boolean isTSQL();
9397 // boolean isPLSQL();
You can’t perform that action at this time.
0 commit comments