Update questdb

This commit is contained in:
sunkaixuan
2025-08-23 12:35:40 +08:00
parent 3150690579
commit e18a5cb899
2 changed files with 4 additions and 10 deletions

View File

@@ -80,6 +80,7 @@ namespace SqlSugar
/// </summary> /// </summary>
public override void CheckConnection() public override void CheckConnection()
{ {
this.CheckConnectionBefore(this.Connection);
if (this.Connection.State != ConnectionState.Open) if (this.Connection.State != ConnectionState.Open)
{ {
try try
@@ -104,6 +105,7 @@ namespace SqlSugar
Check.Exception(true, ErrorMessage.ConnnectionOpen, ex.Message); Check.Exception(true, ErrorMessage.ConnnectionOpen, ex.Message);
} }
} }
this.CheckConnectionAfter(this.Connection);
} }
public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command) public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command)
{ {
@@ -171,14 +173,6 @@ namespace SqlSugar
sqlParameter.Value = (sqlParameter.Value).ToString(); sqlParameter.Value = (sqlParameter.Value).ToString();
} }
} }
else if (sqlParameter.DbType == System.Data.DbType.Boolean)
{
sqlParameter.DbType = System.Data.DbType.String;
if (sqlParameter.Value != null)
{
sqlParameter.Value = sqlParameter.Value.ObjToString().ToLower();
}
}
++index; ++index;
} }
return result; return result;

View File

@@ -85,7 +85,7 @@ namespace SqlSugar
this.Parameters.Add(new SugarParameter(parameterName, value)); this.Parameters.Add(new SugarParameter(parameterName, value));
return parameterName; return parameterName;
} }
else if (value is double||value is int || value is long || value is short || value is short || value is byte) else if (value is decimal||value is double||value is int || value is long || value is short || value is short || value is byte)
{ {
return value; return value;
} }