...

Source file src/github.com/jackc/pgx/v5/pgtype/zeronull/zeronull.go

Documentation: github.com/jackc/pgx/v5/pgtype/zeronull

     1  package zeronull
     2  
     3  import (
     4  	"github.com/jackc/pgx/v5/pgtype"
     5  )
     6  
     7  // Register registers the zeronull types so they can be used in query exec modes that do not know the server OIDs.
     8  func Register(m *pgtype.Map) {
     9  	m.RegisterDefaultPgType(Float8(0), "float8")
    10  	m.RegisterDefaultPgType(Int2(0), "int2")
    11  	m.RegisterDefaultPgType(Int4(0), "int4")
    12  	m.RegisterDefaultPgType(Int8(0), "int8")
    13  	m.RegisterDefaultPgType(Text(""), "text")
    14  	m.RegisterDefaultPgType(Timestamp{}, "timestamp")
    15  	m.RegisterDefaultPgType(Timestamptz{}, "timestamptz")
    16  	m.RegisterDefaultPgType(UUID{}, "uuid")
    17  }
    18  

View as plain text