Skip to content

Commit 19417a4

Browse files
authored
新增支持 SQLite,感谢 afumu 的贡献 #757
Add SQLite support:#757
2 parents 67bda09 + 8dbdc4f commit 19417a4

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java

+8
Original file line numberDiff line numberDiff line change
@@ -1301,6 +1301,14 @@ public static boolean isMQ(String db) {
13011301
return DATABASE_MQ.equals(db) || isKafka(db);
13021302
}
13031303

1304+
@Override
1305+
public boolean isSQLite() {
1306+
return isSQLite(getSQLDatabase());
1307+
}
1308+
public static boolean isSQLite(String db) {
1309+
return DATABASE_SQLITE.equals(db);
1310+
}
1311+
13041312
@Override
13051313
public String getQuote() {
13061314
if(isElasticsearch()) {

APIJSONORM/src/main/java/apijson/orm/SQLConfig.java

+2
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ public interface SQLConfig<T extends Object> {
4141
String DATABASE_MONGODB = "MONGODB"; // https://www.mongodb.com/docs/atlas/data-federation/query/query-with-sql
4242
String DATABASE_KAFKA = "KAFKA"; // https://github.com/APIJSON/APIJSON-Demo/tree/master/APIJSON-Java-Server/APIJSONDemo-MultiDataSource-Kafka
4343
String DATABASE_MQ = "MQ"; //
44+
String DATABASE_SQLITE = "SQLITE"; // https://www.sqlite.org
4445

4546
String SCHEMA_INFORMATION = "information_schema"; //MySQL, PostgreSQL, SQL Server 都有的系统模式
4647
String SCHEMA_SYS = "sys"; //SQL Server 系统模式
@@ -91,6 +92,7 @@ public interface SQLConfig<T extends Object> {
9192
boolean isMongoDB();
9293
boolean isKafka();
9394
boolean isMQ();
95+
boolean isSQLite();
9496

9597

9698
// 暂时只兼容以上几种

0 commit comments

Comments
 (0)