2
0

Move not null Oid to pgtype

In preparation to ConnInfo implementation.
This commit is contained in:
Jack Christensen
2017-03-13 21:34:38 -05:00
parent 7ec8d7b343
commit ba5f97176a
15 changed files with 162 additions and 138 deletions
+3 -2
View File
@@ -52,19 +52,20 @@ import (
"io"
"github.com/jackc/pgx"
"github.com/jackc/pgx/pgtype"
)
var openFromConnPoolCount int
// oids that map to intrinsic database/sql types. These will be allowed to be
// binary, anything else will be forced to text format
var databaseSqlOids map[pgx.Oid]bool
var databaseSqlOids map[pgtype.Oid]bool
func init() {
d := &Driver{}
sql.Register("pgx", d)
databaseSqlOids = make(map[pgx.Oid]bool)
databaseSqlOids = make(map[pgtype.Oid]bool)
databaseSqlOids[pgx.BoolOid] = true
databaseSqlOids[pgx.ByteaOid] = true
databaseSqlOids[pgx.Int2Oid] = true