Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Mappings = []decode.TypeMapping{ { Name: "bool", OID: 16, Scanner: &pgtype.Bool{}, Empty: new(bool), }, { Name: "bytea", OID: 17, Scanner: &pgtype.Bytea{}, Empty: new([]uint8), }, { Name: "name", OID: 19, Scanner: &pgtype.Name{}, Empty: new(string), }, { Name: "int8", OID: 20, Scanner: &pgtype.Int8{}, Empty: new(int64), }, { Name: "int2", OID: 21, Scanner: &pgtype.Int2{}, Empty: new(int16), }, { Name: "int4", OID: 23, Scanner: &pgtype.Int4{}, Empty: new(int32), }, { Name: "text", OID: 25, Scanner: &pgtype.Text{}, Empty: new(string), }, { Name: "oid", OID: 26, Scanner: &pgtype.OIDValue{}, Empty: new(uint32), }, { Name: "xid", OID: 28, Scanner: &pgtype.XID{}, Empty: new(uint32), }, { Name: "cid", OID: 29, Scanner: &pgtype.CID{}, Empty: new(uint32), }, { Name: "json", OID: 114, Scanner: &pgtype.JSON{}, Empty: new(string), }, { Name: "float4", OID: 700, Scanner: &pgtype.Float4{}, Empty: new(float32), }, { Name: "float8", OID: 701, Scanner: &pgtype.Float8{}, Empty: new(float64), }, { Name: "_bool", OID: 1000, Scanner: &pgtype.BoolArray{}, Empty: new([]bool), }, { Name: "_int2", OID: 1005, Scanner: &pgtype.Int2Array{}, Empty: new([]int16), }, { Name: "_int4", OID: 1007, Scanner: &pgtype.Int4Array{}, Empty: new([]int32), }, { Name: "_text", OID: 1009, Scanner: &pgtype.TextArray{}, Empty: new([]string), }, { Name: "_varchar", OID: 1015, Scanner: &pgtype.VarcharArray{}, Empty: new([]string), }, { Name: "_int8", OID: 1016, Scanner: &pgtype.Int8Array{}, Empty: new([]int64), }, { Name: "_float4", OID: 1021, Scanner: &pgtype.Float4Array{}, Empty: new([]float32), }, { Name: "_float8", OID: 1022, Scanner: &pgtype.Float8Array{}, Empty: new([]float64), }, { Name: "varchar", OID: 1043, Scanner: &pgtype.Varchar{}, Empty: new(string), }, { Name: "date", OID: 1082, Scanner: &pgtype.Date{}, Empty: new(time.Time), }, { Name: "time", OID: 1083, Scanner: &pgtype.Time{}, Empty: new(time.Time), }, { Name: "timestamp", OID: 1114, Scanner: &pgtype.Timestamp{}, Empty: new(time.Time), }, { Name: "_timestamp", OID: 1115, Scanner: &pgtype.TimestampArray{}, Empty: new([]time.Time), }, { Name: "_date", OID: 1182, Scanner: &pgtype.DateArray{}, Empty: new([]time.Time), }, { Name: "timestamptz", OID: 1184, Scanner: &pgtype.Timestamptz{}, Empty: new(time.Time), }, { Name: "_timestamptz", OID: 1185, Scanner: &pgtype.TimestamptzArray{}, Empty: new([]time.Time), }, { Name: "_numeric", OID: 1231, Scanner: &pgtype.NumericArray{}, Empty: new([]float64), }, { Name: "numeric", OID: 1700, Scanner: &pgtype.Numeric{}, Empty: new(float64), }, { Name: "jsonb", OID: 3802, Scanner: &pgtype.JSONB{}, Empty: new(string), }, }
Mappings are the types we support natively from Postgres, with proper parsing
View Source
var Unsupported = []decode.TypeMapping{
{
Name: "tid",
OID: 27,
},
{
Name: "point",
OID: 600,
},
{
Name: "lseg",
OID: 601,
},
{
Name: "path",
OID: 602,
},
{
Name: "box",
OID: 603,
},
{
Name: "polygon",
OID: 604,
},
{
Name: "line",
OID: 628,
},
{
Name: "_cidr",
OID: 651,
},
{
Name: "unknown",
OID: 705,
},
{
Name: "circle",
OID: 718,
},
{
Name: "macaddr",
OID: 829,
},
{
Name: "inet",
OID: 869,
},
{
Name: "_bytea",
OID: 1001,
},
{
Name: "_bpchar",
OID: 1014,
},
{
Name: "aclitem",
OID: 1033,
},
{
Name: "_aclitem",
OID: 1034,
},
{
Name: "_inet",
OID: 1041,
},
{
Name: "bpchar",
OID: 1042,
},
{
Name: "interval",
OID: 1186,
},
{
Name: "bit",
OID: 1560,
},
{
Name: "varbit",
OID: 1562,
},
{
Name: "uuid",
OID: 2950,
},
{
Name: "_uuid",
OID: 2951,
},
{
Name: "int4range",
OID: 3904,
},
{
Name: "numrange",
OID: 3906,
},
{
Name: "tsrange",
OID: 3908,
},
{
Name: "tstzrange",
OID: 3910,
},
{
Name: "daterange",
OID: 3912,
},
{
Name: "int8range",
OID: 3926,
},
}
Unsupported is a list of types that Postgres normally supports that we choose not to, as we can't parse them into a sensibly common Golang types.
Functions ¶
func Each ¶
func Each(do func(name string, mapping decode.TypeMapping))
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.