Skip to content

Add SQLite support #757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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