mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-09-23 04:23:47 +08:00
Update QuestDb BUG
This commit is contained in:
@@ -71,6 +71,36 @@ namespace SqlSugar
|
|||||||
CheckConnection();
|
CheckConnection();
|
||||||
return sqlCommand;
|
return sqlCommand;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Check connection
|
||||||
|
/// </summary>
|
||||||
|
public override void CheckConnection()
|
||||||
|
{
|
||||||
|
if (this.Connection.State != ConnectionState.Open)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
while (i < 10)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//QuestDb loss problem
|
||||||
|
this.Connection.Open();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Check.Exception(true, ErrorMessage.ConnnectionOpen, ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command)
|
public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command)
|
||||||
{
|
{
|
||||||
((NpgsqlDataAdapter)dataAdapter).SelectCommand = (NpgsqlCommand)command;
|
((NpgsqlDataAdapter)dataAdapter).SelectCommand = (NpgsqlCommand)command;
|
||||||
|
@@ -71,6 +71,37 @@ namespace SqlSugar
|
|||||||
CheckConnection();
|
CheckConnection();
|
||||||
return sqlCommand;
|
return sqlCommand;
|
||||||
}
|
}
|
||||||
|
/// <summary>
|
||||||
|
/// Check connection
|
||||||
|
/// </summary>
|
||||||
|
public override void CheckConnection()
|
||||||
|
{
|
||||||
|
if (this.Connection.State != ConnectionState.Open)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
int i = 0;
|
||||||
|
while (i < 10)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//QuestDb loss problem
|
||||||
|
this.Connection.Open();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
i++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
Check.Exception(true, ErrorMessage.ConnnectionOpen, ex.Message);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command)
|
public override void SetCommandToAdapter(IDataAdapter dataAdapter, DbCommand command)
|
||||||
{
|
{
|
||||||
((NpgsqlDataAdapter)dataAdapter).SelectCommand = (NpgsqlCommand)command;
|
((NpgsqlDataAdapter)dataAdapter).SelectCommand = (NpgsqlCommand)command;
|
||||||
|
Reference in New Issue
Block a user