unit XData.Query.Method;

{$I XData.inc}

interface

uses
  Generics.Collections;

type
  TQueryMethod = class
  strict private
    FSQLFunctionName: string;
    FArgumentCount: Integer;
    FMaxArgumentCount: Integer;
    FIsBoolean: Boolean;
  public
    constructor Create(const ASQLFunctionName: string; AArgCount: integer;
      AIsBoolean: Boolean = False); overload;
    constructor Create(const ASQLFunctionName: string; AArgCount, AMaxArgCount: integer;
      AIsBoolean: Boolean = False); overload;
    property IsBoolean: Boolean read FIsBoolean;
    property SQLFunctionName: string read FSQLFunctionName;
    property ArgumentCount: Integer read FArgumentCount;
    property MaxArgumentCount: Integer read FMaxArgumentCount;
  end;

implementation

uses
  XData.Query.Exceptions;

{ TQueryMethod }

constructor TQueryMethod.Create(const ASQLFunctionName: string; AArgCount: integer;
  AIsBoolean: Boolean = False);
begin
  Create(ASQLFunctionName, AArgCount, AArgCount, AIsBoolean);
end;

constructor TQueryMethod.Create(const ASQLFunctionName: string; AArgCount, AMaxArgCount: integer;
  AIsBoolean: Boolean = False);
begin
  FSQLFunctionName := ASQLFunctionName;
  FArgumentCount := AArgCount;
  FMaxArgumentCount := AMaxArgCount;
  FIsBoolean := AIsBoolean;
end;

end.
