-
Notifications
You must be signed in to change notification settings - Fork 1
/
sql-types.js
90 lines (87 loc) · 1.78 KB
/
sql-types.js
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
82
83
84
85
86
87
88
89
90
/**
* @enum {String}
*/
const SQLServer = {
Bit: 'Bit',
TinyInt: 'TinyInt',
SmallInt: 'SmallInt',
Int: 'Int',
BigInt: 'BigInt',
Numeric: 'Numeric',
Decimal: 'Decimal',
SmallDateTime: 'SmallDateTime',
Real: 'Real',
Money: 'Money',
DateTime: 'DateTime',
Float: 'Float',
SmallMoney: 'SmallMoney',
Image: 'Image',
Text: 'Text',
UniqueIdentifier: 'UniqueIdentifier',
NText: 'NText',
VarBinary: 'VarBinary',
VarChar: 'VarChar',
Binary: 'Binary',
Char: 'Char',
NVarChar: 'NVarChar',
NChar: 'NChar',
Xml: 'Xml',
Time: 'Time',
Date: 'Date',
DateTime2: 'DateTime2',
DateTimeOffset: 'DateTimeOffset',
UDT: 'UDT',
TVP: 'TVP',
Variant: 'Variant'
};
/**
* @enum {String}
*/
const Postgres = {
Bit: 'bit',
VarBit: 'varbit',
Boolean: 'bool',
SmallInt: 'int2',
Int: 'int4',
BigInt: 'int8',
Decimal: 'decimal',
Real: 'float4',
Double: 'float8',
Money: 'money',
Char: 'char',
VarChar: 'varchar',
Text: 'text',
JSON: 'json',
JSONB: 'jsonb',
Xml: 'xml',
ByteA: 'bytea',
CIDR: 'cidr',
INET: 'inet',
MACAddress: 'macaddr',
Date: 'date',
Time: 'time',
TimeTZ: 'timetz',
Timestamp: 'timestamp',
TimestampTZ: 'timestamptz',
Interval: 'interval',
BigSerial: 'serial8',
Serial: 'serial4',
SmallSerial: 'serial2',
UUID: 'uuid',
//less common
Box: 'box',
Circle: 'circle',
Line: 'line',
LineSegment: 'lseg',
Path: 'path',
PgLogSequenceNumber: 'pg_lsn',
Point: 'point',
Polygon: 'polygon',
TextSearchQuery: 'tsquery',
TextSearchVector: 'tsvector',
TxIDSnapshot: 'txid_snapshot'
};
export {
SQLServer as SQLServerTypes,
Postgres as PostgresTypes
};