Exposed ExecuteReader and ExecuteNonQuery bumped package version, added documentation.
This commit is contained in:
parent
15e51b7a42
commit
f38a08b1cf
@ -147,13 +147,13 @@ namespace MontoyaTech.MySqlPlus
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Executes a data reader for a command and retrys
|
/// Executes a data reader for a command and retrys if the database goes away or glitches.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="command"></param>
|
/// <param name="command">The MySqlCommand to execute.</param>
|
||||||
/// <param name="maxRetrys"></param>
|
/// <param name="maxRetrys">The max number of times to retry, default is 5.</param>
|
||||||
/// <param name="exponentialBackoff"></param>
|
/// <param name="exponentialBackoff">Whether or not to backoff longer each fail, default is true.</param>
|
||||||
/// <param name="retry"></param>
|
/// <param name="retry">Whether or not to retry if the command fails, default is true.</param>
|
||||||
/// <returns></returns>
|
/// <returns>The MySqlDataReader from running the command.</returns>
|
||||||
public MySqlDataReader ExecuteReader(MySqlCommand command, int maxRetrys = 5, bool exponentialBackoff = true, bool retry = true)
|
public MySqlDataReader ExecuteReader(MySqlCommand command, int maxRetrys = 5, bool exponentialBackoff = true, bool retry = true)
|
||||||
{
|
{
|
||||||
if (command == null)
|
if (command == null)
|
||||||
@ -223,12 +223,12 @@ namespace MontoyaTech.MySqlPlus
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Executes a non query command.
|
/// Executes a non query command and retrys if the database goes away or glitches.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="command"></param>
|
/// <param name="command">The MySqlCommand to execute.</param>
|
||||||
/// <param name="maxRetrys"></param>
|
/// <param name="maxRetrys">The max number of times to retry, default is 5.</param>
|
||||||
/// <param name="exponentialBackoff"></param>
|
/// <param name="exponentialBackoff">Whether or not to backoff longer each fail, default is true.</param>
|
||||||
/// <param name="retry"></param>
|
/// <param name="retry">Whether or not to retry if the command fails, default is true.</param>
|
||||||
/// <returns>The number of rows affected.</returns>
|
/// <returns>The number of rows affected.</returns>
|
||||||
/// <exception cref="Exception"></exception>
|
/// <exception cref="Exception"></exception>
|
||||||
public int ExecuteNonQuery(MySqlCommand command, int maxRetrys = 5, bool exponentialBackoff = true, bool retry = true)
|
public int ExecuteNonQuery(MySqlCommand command, int maxRetrys = 5, bool exponentialBackoff = true, bool retry = true)
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<AssemblyName>MontoyaTech.MySqlPlus</AssemblyName>
|
<AssemblyName>MontoyaTech.MySqlPlus</AssemblyName>
|
||||||
<RootNamespace>MontoyaTech.MySqlPlus</RootNamespace>
|
<RootNamespace>MontoyaTech.MySqlPlus</RootNamespace>
|
||||||
<Title>MontoyaTech.MySqlPlus</Title>
|
<Title>MontoyaTech.MySqlPlus</Title>
|
||||||
<Version>1.1.0</Version>
|
<Version>1.1.1</Version>
|
||||||
<Company>MontoyaTech</Company>
|
<Company>MontoyaTech</Company>
|
||||||
<Description>A simple C# library to help work with MySql.</Description>
|
<Description>A simple C# library to help work with MySql.</Description>
|
||||||
<Copyright>MontoyaTech 2023</Copyright>
|
<Copyright>MontoyaTech 2023</Copyright>
|
||||||
|
@ -247,6 +247,33 @@ namespace MontoyaTech.MySqlPlus
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Executes a data reader for a command and retrys if the database goes away or glitches.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command">The MySqlCommand to execute.</param>
|
||||||
|
/// <param name="maxRetrys">The max number of times to retry, default is 5.</param>
|
||||||
|
/// <param name="exponentialBackoff">Whether or not to backoff longer each fail, default is true.</param>
|
||||||
|
/// <param name="retry">Whether or not to retry if the command fails, default is true.</param>
|
||||||
|
/// <returns>The MySqlDataReader from running the command.</returns>
|
||||||
|
public MySqlDataReader ExecuteReader(MySqlCommand command, int maxRetrys = 5, bool exponentialBackoff = true, bool retry = true)
|
||||||
|
{
|
||||||
|
return this.Connection.ExecuteReader(command, maxRetrys, exponentialBackoff, retry);
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Executes a non query command and retrys if the database goes away or glitches.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="command">The MySqlCommand to execute.</param>
|
||||||
|
/// <param name="maxRetrys">The max number of times to retry, default is 5.</param>
|
||||||
|
/// <param name="exponentialBackoff">Whether or not to backoff longer each fail, default is true.</param>
|
||||||
|
/// <param name="retry">Whether or not to retry if the command fails, default is true.</param>
|
||||||
|
/// <returns>The number of rows affected.</returns>
|
||||||
|
/// <exception cref="Exception"></exception>
|
||||||
|
public int ExecuteNonQuery(MySqlCommand command, int maxRetrys = 5, bool exponentialBackoff = true, bool retry = true)
|
||||||
|
{
|
||||||
|
return this.Connection.ExecuteNonQuery(command, maxRetrys, exponentialBackoff, retry);
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Implicitly converts a MySqlSession to a MySqlConnection.
|
/// Implicitly converts a MySqlSession to a MySqlConnection.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user