新增支持 SQLite,感谢 afumu 的贡献 #757

Add SQLite support:https://github.com/Tencent/APIJSON/pull/757
This commit is contained in:
TommyLemon 2024-09-01 22:32:32 +08:00 committed by GitHub
commit 19417a4e7e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 0 deletions

View File

@ -1301,6 +1301,14 @@ public abstract class AbstractSQLConfig<T extends Object> implements SQLConfig<T
return DATABASE_MQ.equals(db) || isKafka(db);
}
@Override
public boolean isSQLite() {
return isSQLite(getSQLDatabase());
}
public static boolean isSQLite(String db) {
return DATABASE_SQLITE.equals(db);
}
@Override
public String getQuote() {
if(isElasticsearch()) {

View File

@ -41,6 +41,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_MQ = "MQ"; //
String DATABASE_SQLITE = "SQLITE"; // https://www.sqlite.org
String SCHEMA_INFORMATION = "information_schema"; //MySQL, PostgreSQL, SQL Server 都有的系统模式
String SCHEMA_SYS = "sys"; //SQL Server 系统模式
@ -91,6 +92,7 @@ public interface SQLConfig<T extends Object> {
boolean isMongoDB();
boolean isKafka();
boolean isMQ();
boolean isSQLite();
// 暂时只兼容以上几种