-
Notifications
You must be signed in to change notification settings - Fork 92
/
types.ts
81 lines (71 loc) · 1.62 KB
/
types.ts
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/**
* https://www.postgresql.org/docs/14/datatype-geometric.html#id-1.5.7.16.8
*/
export interface Box {
a: Point;
b: Point;
}
/**
* https://www.postgresql.org/docs/14/datatype-geometric.html#DATATYPE-CIRCLE
*/
export interface Circle {
point: Point;
radius: Float8;
}
/**
* Decimal-like string. Uses dot to split the decimal
*
* Example: 1.89, 2, 2.1
*
* https://www.postgresql.org/docs/14/datatype-numeric.html#DATATYPE-FLOAT
*/
export type Float4 = "string";
/**
* Decimal-like string. Uses dot to split the decimal
*
* Example: 1.89, 2, 2.1
*
* https://www.postgresql.org/docs/14/datatype-numeric.html#DATATYPE-FLOAT
*/
export type Float8 = "string";
/**
* https://www.postgresql.org/docs/14/datatype-geometric.html#DATATYPE-LINE
*/
export interface Line {
a: Float8;
b: Float8;
c: Float8;
}
/**
* https://www.postgresql.org/docs/14/datatype-geometric.html#DATATYPE-LSEG
*/
export interface LineSegment {
a: Point;
b: Point;
}
/**
* https://www.postgresql.org/docs/14/datatype-geometric.html#id-1.5.7.16.9
*/
export type Path = Point[];
/**
* https://www.postgresql.org/docs/14/datatype-geometric.html#id-1.5.7.16.5
*/
export interface Point {
x: Float8;
y: Float8;
}
/**
* https://www.postgresql.org/docs/14/datatype-geometric.html#DATATYPE-POLYGON
*/
export type Polygon = Point[];
/**
* https://www.postgresql.org/docs/14/datatype-oid.html
*/
export type TID = [bigint, bigint];
/**
* Additional to containing normal dates, they can contain 'Infinity'
* values, so handle them with care
*
* https://www.postgresql.org/docs/14/datatype-datetime.html
*/
export type Timestamp = Date | number;