mirror of
https://github.com/CodePhiliaX/Chat2DB.git
synced 2025-07-31 03:32:43 +08:00
Auto Upgrade
This commit is contained in:
@ -1,6 +1,7 @@
|
||||
package ai.chat2db.server.domain.api.model;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.List;
|
||||
|
||||
import ai.chat2db.spi.config.DriverConfig;
|
||||
@ -8,6 +9,7 @@ import ai.chat2db.spi.model.KeyValue;
|
||||
import ai.chat2db.spi.model.SSHInfo;
|
||||
import ai.chat2db.spi.model.SSLInfo;
|
||||
import lombok.Data;
|
||||
import org.springframework.util.ObjectUtils;
|
||||
|
||||
/**
|
||||
* @author moji
|
||||
@ -107,4 +109,16 @@ public class DataSource {
|
||||
* 驱动配置
|
||||
*/
|
||||
private DriverConfig driverConfig;
|
||||
|
||||
|
||||
public LinkedHashMap<String,Object> getExtendMap() {
|
||||
if (ObjectUtils.isEmpty(extendInfo)) {
|
||||
return new LinkedHashMap<>();
|
||||
}
|
||||
LinkedHashMap<String,Object> map = new LinkedHashMap<>();
|
||||
for (KeyValue keyValue : extendInfo) {
|
||||
map.put(keyValue.getKey(),keyValue.getValue());
|
||||
}
|
||||
return map;
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,8 @@
|
||||
package ai.chat2db.server.domain.api.param;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import java.sql.Connection;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
@ -27,4 +28,14 @@ public class DatabaseQueryAllParam {
|
||||
* if true, refresh the cache
|
||||
*/
|
||||
private boolean refresh;
|
||||
|
||||
/**
|
||||
* Can be null, if null, use the default connection
|
||||
*/
|
||||
private Connection connection;
|
||||
|
||||
/**
|
||||
* Can be null, if null, use the default dbType
|
||||
*/
|
||||
private String dbType;
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
|
||||
package ai.chat2db.server.domain.api.param;
|
||||
|
||||
import java.sql.Connection;
|
||||
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
@ -29,4 +31,9 @@ public class SchemaQueryParam {
|
||||
* if true, refresh the cache
|
||||
*/
|
||||
private boolean refresh;
|
||||
|
||||
/**
|
||||
* Can be null, if null, use the default connection
|
||||
*/
|
||||
private Connection connection;
|
||||
}
|
Reference in New Issue
Block a user