-
-
Notifications
You must be signed in to change notification settings - Fork 397
/
types.go
48 lines (38 loc) · 1.66 KB
/
types.go
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
package orm
//nolint
const (
// Date / Time
pgTypeTimestamp = "timestamp" // Timestamp without a time zone
pgTypeTimestampTz = "timestamptz" // Timestamp with a time zone
pgTypeDate = "date" // Date
pgTypeTime = "time" // Time without a time zone
pgTypeTimeTz = "time with time zone" // Time with a time zone
pgTypeInterval = "interval" // Time Interval
// Network Addresses
pgTypeInet = "inet" // IPv4 or IPv6 hosts and networks
pgTypeCidr = "cidr" // IPv4 or IPv6 networks
pgTypeMacaddr = "macaddr" // MAC addresses
// Boolean
pgTypeBoolean = "boolean"
// Numeric Types
// Floating Point Types
pgTypeReal = "real" // 4 byte floating point (6 digit precision)
pgTypeDoublePrecision = "double precision" // 8 byte floating point (15 digit precision)
// Integer Types
pgTypeSmallint = "smallint" // 2 byte integer
pgTypeInteger = "integer" // 4 byte integer
pgTypeBigint = "bigint" // 8 byte integer
// Serial Types
pgTypeSmallserial = "smallserial" // 2 byte autoincrementing integer
pgTypeSerial = "serial" // 4 byte autoincrementing integer
pgTypeBigserial = "bigserial" // 8 byte autoincrementing integer
// Character Types
pgTypeVarchar = "varchar" // variable length string with limit
pgTypeChar = "char" // fixed length string (blank padded)
pgTypeText = "text" // variable length string without limit
// JSON Types
pgTypeJSON = "json" // text representation of json data
pgTypeJSONB = "jsonb" // binary representation of json data
// Binary Data Types
pgTypeBytea = "bytea" // binary string
)