add pg default database

This commit is contained in:
jipengfei-jpf
2023-07-16 17:20:39 +08:00
parent e8e7613d6e
commit 7d7b52026e
2 changed files with 4 additions and 4 deletions

View File

@ -1,15 +1,15 @@
package ai.chat2db.plugin.sqlserver;
import java.sql.SQLException;
import ai.chat2db.spi.DBManage;
import ai.chat2db.spi.sql.SQLExecutor;
import java.sql.SQLException;
public class SqlServerDBManage implements DBManage {
@Override
public void connectDatabase(String database) {
try {
SQLExecutor.getInstance().execute("use " + database + ";");
SQLExecutor.getInstance().execute("use [" + database + "];");
} catch (SQLException e) {
throw new RuntimeException(e);
}