Pipes and test scripts
This commit is contained in:
@@ -26,6 +26,8 @@ type
|
||||
// The 8-byte storage for the scalar value
|
||||
PValue = ^TValue;
|
||||
TValue = record
|
||||
class operator Implicit(A: Int64): TValue; overload;
|
||||
class operator Implicit(A: Double): TValue; overload;
|
||||
case TKind of
|
||||
TKind.Ordinal, TKind.Keyword, TKind.Boolean: (AsInt64: Int64);
|
||||
TKind.Float, TKind.DateTime: (AsDouble: Double);
|
||||
@@ -190,19 +192,19 @@ type
|
||||
IScalarRecordSeries = interface(IKeywordMapping<ISeries>)
|
||||
{$region 'private'}
|
||||
function GetDef: IScalarRecordDefinition;
|
||||
function GetTotalCount: Int64;
|
||||
{$endregion}
|
||||
property Def: IScalarRecordDefinition read GetDef;
|
||||
property TotalCount: Int64 read GetTotalCount;
|
||||
end;
|
||||
|
||||
IWriteableScalarRecordSeries = interface(IScalarRecordSeries)
|
||||
{$region 'private'}
|
||||
function GetRecordCount: Int64;
|
||||
function GetTotalCount: Int64;
|
||||
{$endregion}
|
||||
procedure Add(const Item: IKeywordMapping<TScalar>; Lookback: Int64 = -1); overload;
|
||||
procedure Add(const Items: array of TScalar.TValue; Lookback: Int64 = -1); overload;
|
||||
property RecordCount: Int64 read GetRecordCount;
|
||||
property TotalCount: Int64 read GetTotalCount;
|
||||
end;
|
||||
|
||||
// A series of scalar records, optimized for memory and access speed.
|
||||
@@ -1071,6 +1073,16 @@ begin
|
||||
Result := FDef.IndexOf(Key);
|
||||
end;
|
||||
|
||||
class operator TScalar.TValue.Implicit(A: Int64): TValue;
|
||||
begin
|
||||
Result.AsInt64 := A;
|
||||
end;
|
||||
|
||||
class operator TScalar.TValue.Implicit(A: Double): TValue;
|
||||
begin
|
||||
Result.AsDouble := A;
|
||||
end;
|
||||
|
||||
initialization
|
||||
Assert(sizeof(TScalar.TValue) = 8);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user