Skip to content

Commit

Permalink
新增支持 SQLite,感谢 afumu 的贡献 #757
Browse files Browse the repository at this point in the history
Add SQLite support:#757
  • Loading branch information
TommyLemon authored Sep 1, 2024
2 parents 67bda09 + 8dbdc4f commit 19417a4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
8 changes: 8 additions & 0 deletions APIJSONORM/src/main/java/apijson/orm/AbstractSQLConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -1301,6 +1301,14 @@ public static boolean isMQ(String db) {
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()) {
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 @@ -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 系统模式
Expand Down Expand Up @@ -91,6 +92,7 @@ public interface SQLConfig<T extends Object> {
boolean isMongoDB();
boolean isKafka();
boolean isMQ();
boolean isSQLite();


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

0 comments on commit 19417a4

Please sign in to comment.