Fixed Questdb empty Sql error

This commit is contained in:
sunkaixuan 2023-12-15 02:23:14 +08:00
parent 95573019ce
commit 338a2a4ad0

View File

@ -56,6 +56,10 @@ namespace SqlSugar
}
public override DbCommand GetCommand(string sql, SugarParameter[] parameters)
{
if (sql == "\r\n")
{
sql = "SELECT 0";
}
NpgsqlCommand sqlCommand = new NpgsqlCommand(sql, (NpgsqlConnection)this.Connection);
sqlCommand.CommandType = this.CommandType;
sqlCommand.CommandTimeout = this.CommandTimeOut;