mdbs99 / james

James is a collection of object-oriented Pascal primitives for Lazarus and Delphi
MIT License
53 stars 20 forks source link

Create new IDataValue and IDataValues interfaces #86

Closed mdbs99 closed 6 years ago

mdbs99 commented 6 years ago

A new pair of interfaces should be create. They will replace (in part) IDataParam and IDataParams, respectively.

They might be like this:

type
  IDataValue<T> = interface
    function Name: string;
    function Value: T;
    function AsString: string;
  end;

  IDataValues = interface
    function Exists(const Name: string): Boolean;
    function Add(const Value: IDataValue): IDataValue; overload;
    function Get(Index: Integer): IDataValue; overload;
    function Get(const Name: string): IDataName; overload;
    function Count: Integer;
    function AsString(const SeparatorChar: string): string; overload;
    function AsString: string; overload;
  end;