-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxtypes.pas
60 lines (47 loc) · 1.42 KB
/
xtypes.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
unit xtypes;
{$mode objfpc}{$H+}
interface
type
XType = ( // basic types
xtNull= 0,
xtToken, // identifier - interaly this is a string - can be used for various data models implementations
xtInteger,
xtFloat,
xtBoolean,
xtString,
xtArray,
xtList,
// extra types
xtInt64,
xtInt128, // reserved for future use
xtBinary,
xtDateTime,
xtTimeStamp,
xtGUID,
xtNativeObject // Native Object Pascal Instance
);
// Number types
XFloat = Double;
XInt = Integer;
function XTypeName( AType: XType): String;
implementation
function XTypeName( AType: XType): String;
begin
case AType of
xtNull: Result:='Null';
xtToken: Result:='Token';
xtInteger: Result:='Integer';
xtFloat: Result:='Float';
xtBoolean: Result:='Boolean';
xtString: Result:='String';
xtList: Result:='List';
xtArray: Result:='Array';
xtInt64: Result:= 'Int64';
xtBinary: Result:='Binary';
xtDateTime: Result:='DateTime';
xtTimeStamp: Result:='TimeStamp';
xtGUID: Result:='GUID';
xtNativeObject: Result:='Native Object';
end
end;
end.