mirror of https://github.com/jackc/pgx.git
Use golang.org/x/xerrors
parent
8502a12ac7
commit
f25878662d
|
@ -3,7 +3,7 @@ package pgtype
|
|||
import (
|
||||
"database/sql/driver"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// ACLItem is used for PostgreSQL's aclitem data type. A sample aclitem
|
||||
|
|
|
@ -3,7 +3,7 @@ package pgtype
|
|||
import (
|
||||
"database/sql/driver"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type ACLItemArray struct {
|
||||
|
|
2
array.go
2
array.go
|
@ -9,7 +9,7 @@ import (
|
|||
"unicode"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// Information on the internals of PostgreSQL arrays can be found in
|
||||
|
|
2
bool.go
2
bool.go
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
"strconv"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Bool struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type BoolArray struct {
|
||||
|
|
2
box.go
2
box.go
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Box struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type BPCharArray struct {
|
||||
|
|
2
bytea.go
2
bytea.go
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
"encoding/hex"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Bytea struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type ByteaArray struct {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"net"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type CIDRArray struct {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Circle struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"reflect"
|
||||
"time"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
const maxUint = ^uint(0)
|
||||
|
|
|
@ -3,7 +3,7 @@ package pgtype
|
|||
import (
|
||||
"database/sql/driver"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
func DatabaseSQLValue(ci *ConnInfo, src Value) (interface{}, error) {
|
||||
|
|
2
date.go
2
date.go
|
@ -6,7 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Date struct {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type DateArray struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Daterange struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package pgtype
|
|||
import (
|
||||
"database/sql/driver"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type EnumArray struct {
|
||||
|
|
|
@ -3,7 +3,7 @@ package uuid
|
|||
import (
|
||||
"database/sql/driver"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
|
||||
"github.com/jackc/pgx/v4/pgtype"
|
||||
uuid "github.com/satori/go.uuid"
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
"strconv"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
|
||||
"github.com/jackc/pgx/v4/pgtype"
|
||||
"github.com/shopspring/decimal"
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Float4 struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Float4Array struct {
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Float8 struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Float8Array struct {
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
"unicode"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
)
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type HstoreArray struct {
|
||||
|
|
2
inet.go
2
inet.go
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
"net"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// Network address family is dependent on server socket.h value for AF_INET.
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"net"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type InetArray struct {
|
||||
|
|
2
int2.go
2
int2.go
|
@ -7,7 +7,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Int2 struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Int2Array struct {
|
||||
|
|
2
int4.go
2
int4.go
|
@ -8,7 +8,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Int4 struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Int4Array struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Int4range struct {
|
||||
|
|
2
int8.go
2
int8.go
|
@ -8,7 +8,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Int8 struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Int8Array struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Int8range struct {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
const (
|
||||
|
|
2
json.go
2
json.go
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type JSON struct {
|
||||
|
|
2
jsonb.go
2
jsonb.go
|
@ -3,7 +3,7 @@ package pgtype
|
|||
import (
|
||||
"database/sql/driver"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type JSONB JSON
|
||||
|
|
2
line.go
2
line.go
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Line struct {
|
||||
|
|
2
lseg.go
2
lseg.go
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Lseg struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
"net"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Macaddr struct {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"net"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type MacaddrArray struct {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// PostgreSQL internal numeric storage uses 16-bit "digits" with base of 10,000
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type NumericArray struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Numrange struct {
|
||||
|
|
2
oid.go
2
oid.go
|
@ -6,7 +6,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// OID (Object Identifier Type) is, according to
|
||||
|
|
2
path.go
2
path.go
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Path struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql"
|
||||
"reflect"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// PostgreSQL oids for common types
|
||||
|
|
|
@ -7,7 +7,7 @@ import (
|
|||
"strconv"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// pguint32 is the core type that is used to implement PostgreSQL types such as
|
||||
|
|
2
point.go
2
point.go
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Vec2 struct {
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Polygon struct {
|
||||
|
|
2
qchar.go
2
qchar.go
|
@ -4,7 +4,7 @@ import (
|
|||
"math"
|
||||
"strconv"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// QChar is for PostgreSQL's special 8-bit-only "char" type more akin to the C
|
||||
|
|
2
range.go
2
range.go
|
@ -4,7 +4,7 @@ import (
|
|||
"bytes"
|
||||
"encoding/binary"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type BoundType byte
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"encoding/binary"
|
||||
"reflect"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// Record is the generic PostgreSQL record type such as is created with the
|
||||
|
|
2
text.go
2
text.go
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
"encoding/json"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Text struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type TextArray struct {
|
||||
|
|
2
tid.go
2
tid.go
|
@ -8,7 +8,7 @@ import (
|
|||
"strings"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
// TID is PostgreSQL's Tuple Identifier type.
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
const pgTimestampFormat = "2006-01-02 15:04:05.999999999"
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type TimestampArray struct {
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
const pgTimestamptzHourFormat = "2006-01-02 15:04:05.999999999Z07"
|
||||
|
|
|
@ -6,7 +6,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type TimestamptzArray struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Tsrange struct {
|
||||
|
|
|
@ -4,7 +4,7 @@ import (
|
|||
"database/sql/driver"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Tstzrange struct {
|
||||
|
|
2
uuid.go
2
uuid.go
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/hex"
|
||||
"fmt"
|
||||
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type UUID struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type UUIDArray struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type Varbit struct {
|
||||
|
|
|
@ -5,7 +5,7 @@ import (
|
|||
"encoding/binary"
|
||||
|
||||
"github.com/jackc/pgio"
|
||||
"github.com/pkg/errors"
|
||||
errors "golang.org/x/xerrors"
|
||||
)
|
||||
|
||||
type VarcharArray struct {
|
||||
|
|
Loading…
Reference in New Issue