//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// CustomDbAccess embedded library | DB-access through SQL | Author: Sergei Y.Kitáev
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
using System;
using System.Runtime.CompilerServices;

using CommonHelpers.WASM;

namespace BookRegistry.Client.DB { // SIMULATION TYPES:

//**************************************************************************************************
/// <summary>
/// ORM-structure simulator (result-set record model)
/// </summary>
public abstract partial class ResultSetItemBase: HPropertyNNBase {
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
protected static bool has_data => false;
protected static bool no_data => true;
//==================================================================================================

protected static T GET<T>( bool treatNullAsDefaultValue=false,
                           [CallerMemberName] string? propertyName=null ) =>
   default(T)!;

protected static T VAL<T>( bool treatNullAsDefaultValue=false,
                           [CallerMemberName] string? propertyName=null )
where T: struct =>
   default(T);

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

protected static bool EXISTS( [CallerMemberName] string? propertyName=null )
   => false;
protected static int IDX( [CallerMemberName] string? propertyName=null )
   => -1;

//==================================================================================================
protected static string STR( bool treatNullAsEmpty=false,
                             [CallerMemberName] string? propertyName=null )
   => null!;
protected static string NS( bool treatNullAsEmpty=false,
                            [CallerMemberName] string? propertyName=null )
   => null!;
//--------------------------------------------------------------------------------------------------

protected static int INT( bool treatNullAsZero=false,
                          [CallerMemberName] string? propertyName=null )
   => 0;
protected static long BIGINT( bool treatNullAsZero=false,
                              [CallerMemberName] string? propertyName=null )
   => 0;
protected static double FP( bool treatNullAsZero=false,
                            [CallerMemberName] string? propertyName=null )
   => 0;
protected static decimal DEC( bool treatNullAsZero=false,
                              [CallerMemberName] string? propertyName=null )
   => 0;

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

protected static bool BOOL( bool treatNullAsFalse=false,
                            [CallerMemberName] string? propertyName=null )
   => false;
protected static DateTime DT( bool treatNullAsDefaultValue=false,
                              [CallerMemberName] string? propertyName=null )
   => default(DateTime);
protected static DateTime UTC( bool treatNullAsDefaultValue=false,
                               [CallerMemberName] string? propertyName=null )
   => default(DateTime);
protected static Guid GUID( bool treatNullAsEmpty=false,
                            [CallerMemberName] string? propertyName=null )
   => default(Guid);

//--------------------------------------------------------------------------------------------------
protected static byte[] BINARY( bool treatNullAsEmpty=false,
                                [CallerMemberName] string? propertyName=null )
   => null!;
//--------------------------------------------------------------------------------------------------
/*
protected static ( bool treatNullAs...=false,
                   [CallerMemberName] string? propertyName=null )
   => ;
*/
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
} // ResultSetItemBase
//**************************************************************************************************

} // BookRegistry.Client.DB
