Exposed ExecuteReader and ExecuteNonQuery bumped package version, added documentation.
This commit is contained in:
		| @@ -147,13 +147,13 @@ namespace MontoyaTech.MySqlPlus | ||||
|         } | ||||
|  | ||||
|         /// <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> | ||||
|         /// <param name="command"></param> | ||||
|         /// <param name="maxRetrys"></param> | ||||
|         /// <param name="exponentialBackoff"></param> | ||||
|         /// <param name="retry"></param> | ||||
|         /// <returns></returns> | ||||
|         /// <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) | ||||
|         { | ||||
|             if (command == null) | ||||
| @@ -223,12 +223,12 @@ namespace MontoyaTech.MySqlPlus | ||||
|         } | ||||
|  | ||||
|         /// <summary> | ||||
|         /// Executes a non query command. | ||||
|         /// Executes a non query command and retrys if the database goes away or glitches. | ||||
|         /// </summary> | ||||
|         /// <param name="command"></param> | ||||
|         /// <param name="maxRetrys"></param> | ||||
|         /// <param name="exponentialBackoff"></param> | ||||
|         /// <param name="retry"></param> | ||||
|         /// <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) | ||||
|   | ||||
| @@ -7,7 +7,7 @@ | ||||
|     <AssemblyName>MontoyaTech.MySqlPlus</AssemblyName> | ||||
|     <RootNamespace>MontoyaTech.MySqlPlus</RootNamespace> | ||||
|     <Title>MontoyaTech.MySqlPlus</Title> | ||||
|     <Version>1.1.0</Version> | ||||
|     <Version>1.1.1</Version> | ||||
|     <Company>MontoyaTech</Company> | ||||
|     <Description>A simple C# library to help work with MySql.</Description> | ||||
|     <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> | ||||
|         /// Implicitly converts a MySqlSession to a MySqlConnection. | ||||
|         /// </summary> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user