示例#1
0
 /// <summary>
 /// Verifies if a statement result was executed without any error.
 /// </summary>
 /// <param name="statementResult">The statement result to evaluate.</param>
 /// <returns><c>true</c> if the result does not contain any kind of error, <c>false</c> otherwise.</returns>
 public static bool WithoutErrors(this MySqlStatement.StatementResultType statementResult)
 {
     return(statementResult != MySqlStatement.StatementResultType.ConnectionLost && statementResult != MySqlStatement.StatementResultType.ErrorThrown);
 }
示例#2
0
 /// <summary>
 /// Verifies if a statement result was applied to the server, i.e. that it was successful or had warnings.
 /// </summary>
 /// <param name="statementResult">The statement result to evaluate.</param>
 /// <returns><c>true</c> if the result is successful or had warnings, <c>false</c> otherwise.</returns>
 public static bool WasApplied(this MySqlStatement.StatementResultType statementResult)
 {
     return(statementResult == MySqlStatement.StatementResultType.Successful || statementResult == MySqlStatement.StatementResultType.WarningsFound);
 }