.net frame work split table no table query bug

This commit is contained in:
sunkaixuan
2025-03-20 15:43:15 +08:00
parent 7981993553
commit ed1f62bafa

View File

@@ -54,6 +54,10 @@ namespace SqlSugar
} }
public override DbCommand GetCommand(string sql, SugarParameter[] parameters) public override DbCommand GetCommand(string sql, SugarParameter[] parameters)
{ {
if (sql == "-- No table ")
{
sql = "select * from (select 1 as id) t where 1=2 ";
}
SQLiteCommand sqlCommand = new SQLiteCommand(sql, (SQLiteConnection)this.Connection); SQLiteCommand sqlCommand = new SQLiteCommand(sql, (SQLiteConnection)this.Connection);
sqlCommand.CommandType = this.CommandType; sqlCommand.CommandType = this.CommandType;
sqlCommand.CommandTimeout = this.CommandTimeOut; sqlCommand.CommandTimeout = this.CommandTimeOut;