//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// DataHelpers.SQL satellite library | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using u = user_rtx;

namespace DataHelpers.SQL {

/// <summary>
/// </summary>
[h_db_orm_type]
public static class HDBExceptionsSPAuto {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

/// <exception cref="InvalidOperationException" />
public static HDatabaseException ExpectedResultSetWasNotReceived =>
   HDBExceptionsSP.ExpectedResultSetWasNotReceived( ProcedureName );

//--------------------------------------------------------------------------------------------------

/// <exception cref="InvalidOperationException" />
public static HDatabaseException NotMoreThanOneRecordWasExpectedInRSet =>
   HDBExceptionsSP.NotMoreThanOneRecordWasExpectedInRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException NotMoreThanOneRecordWasExpectedIn1stRSet =>
   HDBExceptionsSP.NotMoreThanOneRecordWasExpectedIn1stRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException NotMoreThanOneRecordWasExpectedIn2ndRSet =>
   HDBExceptionsSP.NotMoreThanOneRecordWasExpectedIn2ndRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException NotMoreThanOneRecordWasExpectedIn3rdRSet =>
   HDBExceptionsSP.NotMoreThanOneRecordWasExpectedIn3rdRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException NotMoreThanOneRecordWasExpectedIn4thRSet =>
   HDBExceptionsSP.NotMoreThanOneRecordWasExpectedIn4thRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException NotMoreThanOneRecordWasExpectedIn5thRSet =>
   HDBExceptionsSP.NotMoreThanOneRecordWasExpectedIn5thRSet( ProcedureName );

//--------------------------------------------------------------------------------------------------

/// <exception cref="InvalidOperationException" />
public static HDatabaseException ExactlyOneRecordWasExpectedInRSet =>
   HDBExceptionsSP.ExactlyOneRecordWasExpectedInRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException ExactlyOneRecordWasExpectedIn1stRSet =>
   HDBExceptionsSP.ExactlyOneRecordWasExpectedIn1stRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException ExactlyOneRecordWasExpectedIn2ndRSet =>
   HDBExceptionsSP.ExactlyOneRecordWasExpectedIn2ndRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException ExactlyOneRecordWasExpectedIn3rdRSet =>
   HDBExceptionsSP.ExactlyOneRecordWasExpectedIn3rdRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException ExactlyOneRecordWasExpectedIn4thRSet =>
   HDBExceptionsSP.ExactlyOneRecordWasExpectedIn4thRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException ExactlyOneRecordWasExpectedIn5thRSet =>
   HDBExceptionsSP.ExactlyOneRecordWasExpectedIn5thRSet( ProcedureName );

//--------------------------------------------------------------------------------------------------

/// <exception cref="InvalidOperationException" />
public static HDatabaseException AtLeastOneRecordWasExpectedInRSet =>
   HDBExceptionsSP.AtLeastOneRecordWasExpectedInRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException AtLeastOneRecordWasExpectedIn1stRSet =>
   HDBExceptionsSP.AtLeastOneRecordWasExpectedIn1stRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException AtLeastOneRecordWasExpectedIn2ndRSet =>
   HDBExceptionsSP.AtLeastOneRecordWasExpectedIn2ndRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException AtLeastOneRecordWasExpectedIn3rdRSet =>
   HDBExceptionsSP.AtLeastOneRecordWasExpectedIn3rdRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException AtLeastOneRecordWasExpectedIn4thRSet =>
   HDBExceptionsSP.AtLeastOneRecordWasExpectedIn4thRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException AtLeastOneRecordWasExpectedIn5thRSet =>
   HDBExceptionsSP.AtLeastOneRecordWasExpectedIn5thRSet( ProcedureName );

//--------------------------------------------------------------------------------------------------

/// <exception cref="InvalidOperationException" />
public static HDatabaseException MoreThanOneRecordWereExpectedInRSet =>
   HDBExceptionsSP.MoreThanOneRecordWereExpectedInRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException MoreThanOneRecordWereExpectedIn1stRSet =>
   HDBExceptionsSP.MoreThanOneRecordWereExpectedIn1stRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException MoreThanOneRecordWereExpectedIn2ndRSet =>
   HDBExceptionsSP.MoreThanOneRecordWereExpectedIn2ndRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException MoreThanOneRecordWereExpectedIn3rdRSet =>
   HDBExceptionsSP.MoreThanOneRecordWereExpectedIn3rdRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException MoreThanOneRecordWereExpectedIn4thRSet =>
   HDBExceptionsSP.MoreThanOneRecordWereExpectedIn4thRSet( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException MoreThanOneRecordWereExpectedIn5thRSet =>
   HDBExceptionsSP.MoreThanOneRecordWereExpectedIn5thRSet( ProcedureName );

//==================================================================================================

/// <exception cref="InvalidOperationException" />
public static HDatabaseException SecondResultSetWasExpected =>
   HDBExceptionsSP.SecondResultSetWasExpected( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException ThirdResultSetWasExpected =>
   HDBExceptionsSP.ThirdResultSetWasExpected( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException FourthResultSetWasExpected =>
   HDBExceptionsSP.FourthResultSetWasExpected( ProcedureName );
/// <exception cref="InvalidOperationException" />
public static HDatabaseException FifthResultSetWasExpected =>
   HDBExceptionsSP.FifthResultSetWasExpected( ProcedureName );

//==================================================================================================

/// <exception cref="InvalidOperationException" />
public static HDatabaseException InconsistentResult =>
   HDBExceptionsSP.InconsistentResult( ProcedureName );

//==================================================================================================

/// <exception cref="InvalidOperationException" />
[u.async_local]
static string ProcedureName => HQueryExecContextBase.StrictGetProcedureName();

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // HDBExceptionsSPAuto

} // DataHelpers.SQL
