2
0

Bump module version to v5

This commit is contained in:
Jack Christensen
2021-12-11 13:29:03 -06:00
parent 390bd79757
commit 72cc95e4dd
151 changed files with 287 additions and 287 deletions
+4 -4
View File
@@ -1,4 +1,4 @@
[![](https://godoc.org/github.com/jackc/pgx?status.svg)](https://pkg.go.dev/github.com/jackc/pgx/v4)
[![](https://godoc.org/github.com/jackc/pgx?status.svg)](https://pkg.go.dev/github.com/jackc/pgx/v5)
[![Build Status](https://travis-ci.org/jackc/pgx.svg)](https://travis-ci.org/jackc/pgx)
# pgx - PostgreSQL Driver and Toolkit
@@ -25,7 +25,7 @@ import (
"fmt"
"os"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
)
func main() {
@@ -164,11 +164,11 @@ from pgx for lower-level control.
`pgconn` is a lower-level PostgreSQL database driver that operates at nearly the same level as the C library `libpq`.
### [github.com/jackc/pgx/v4/pgxpool](https://github.com/jackc/pgx/tree/master/pgxpool)
### [github.com/jackc/pgx/v5/pgxpool](https://github.com/jackc/pgx/tree/master/pgxpool)
`pgxpool` is a connection pool for pgx. pgx is entirely decoupled from its default pool implementation. This means that pgx can be used with a different pool or without any pool at all.
### [github.com/jackc/pgx/v4/stdlib](https://github.com/jackc/pgx/tree/master/stdlib)
### [github.com/jackc/pgx/v5/stdlib](https://github.com/jackc/pgx/tree/master/stdlib)
This is a `database/sql` compatibility layer for pgx. pgx can be used as a normal `database/sql` driver, but at any time, the native interface can be acquired for more performance or PostgreSQL specific functionality.
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"context"
"errors"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
)
type batchItem struct {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"os"
"testing"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v4/pgconn/stmtcache"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgconn/stmtcache"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+4 -4
View File
@@ -12,10 +12,10 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v4/pgconn/stmtcache"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgconn/stmtcache"
"github.com/jackc/pgx/v5/pgtype"
"github.com/stretchr/testify/require"
)
+4 -4
View File
@@ -9,10 +9,10 @@ import (
"time"
"github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v4/internal/sanitize"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v4/pgconn/stmtcache"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5/internal/sanitize"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgconn/stmtcache"
"github.com/jackc/pgx/v5/pgtype"
)
// ConnConfig contains all the options used to establish a connection. It must be created by ParseConfig and
+4 -4
View File
@@ -8,10 +8,10 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v4/pgconn/stmtcache"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgconn/stmtcache"
"github.com/jackc/pgx/v5/pgtype"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"time"
"github.com/jackc/pgio"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
)
// CopyFromRows returns a CopyFromSource interface over the provided rows slice
+2 -2
View File
@@ -8,8 +8,8 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"regexp"
"strconv"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
)
var pointRegexp *regexp.Regexp = regexp.MustCompile(`^\((.*),(.*)\)$`)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"os"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
)
func Example_JSON() {
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"fmt"
"os"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5/pgxpool"
)
var pool *pgxpool.Pool
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"os"
"strconv"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
)
var conn *pgx.Conn
+3 -3
View File
@@ -6,9 +6,9 @@ import (
"net/http"
"os"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/log/log15adapter"
"github.com/jackc/pgx/v4/pgxpool"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/log/log15adapter"
"github.com/jackc/pgx/v5/pgxpool"
log "gopkg.in/inconshreveable/log15.v2"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"fmt"
"reflect"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5/pgtype"
)
type extendedQueryBuilder struct {
+1 -1
View File
@@ -1,4 +1,4 @@
module github.com/jackc/pgx/v4
module github.com/jackc/pgx/v5
go 1.13
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/internal/sanitize"
"github.com/jackc/pgx/v5/internal/sanitize"
)
func TestNewQuery(t *testing.T) {
+2 -2
View File
@@ -7,8 +7,8 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
)
func TestLargeObjects(t *testing.T) {
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"github.com/go-kit/log"
kitlevel "github.com/go-kit/log/level"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
)
type Logger struct {
+1 -1
View File
@@ -5,7 +5,7 @@ package log15adapter
import (
"context"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
)
// Log15Logger interface defines the subset of
+1 -1
View File
@@ -5,7 +5,7 @@ package logrusadapter
import (
"context"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
"github.com/sirupsen/logrus"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"context"
"fmt"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
)
// TestingLogger interface defines the subset of testing.TB methods used by this
+1 -1
View File
@@ -4,7 +4,7 @@ package zapadapter
import (
"context"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
"go.uber.org/zap"
"go.uber.org/zap/zapcore"
)
+1 -1
View File
@@ -4,7 +4,7 @@ package zerologadapter
import (
"context"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5"
"github.com/rs/zerolog"
)
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"context"
"testing"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/log/zerologadapter"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/log/zerologadapter"
"github.com/rs/zerolog"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package pgx
import (
"database/sql/driver"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5/pgtype"
)
func convertDriverValuers(args []interface{}) ([]interface{}, error) {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"os"
"testing"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v4/pgconn/stmtcache"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgconn/stmtcache"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"strings"
"testing"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -12,7 +12,7 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -3,7 +3,7 @@ package pgconn_test
import (
"testing"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/assert"
)
+1 -1
View File
@@ -7,7 +7,7 @@ import (
"testing"
"github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@@ -6,7 +6,7 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/pgconn/internal/ctxwatch"
"github.com/jackc/pgx/v5/pgconn/internal/ctxwatch"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -17,7 +17,7 @@ import (
"github.com/jackc/pgio"
"github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v4/pgconn/internal/ctxwatch"
"github.com/jackc/pgx/v5/pgconn/internal/ctxwatch"
)
const (
+1 -1
View File
@@ -8,7 +8,7 @@ import (
"strconv"
"testing"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -20,7 +20,7 @@ import (
"github.com/jackc/pgmock"
"github.com/jackc/pgproto3/v2"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -6,7 +6,7 @@ import (
"fmt"
"sync/atomic"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
)
var lruCount uint64
+2 -2
View File
@@ -9,8 +9,8 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v4/pgconn/stmtcache"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgconn/stmtcache"
"github.com/stretchr/testify/require"
)
+1 -1
View File
@@ -4,7 +4,7 @@ package stmtcache
import (
"context"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v5/pgconn"
)
const (
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestACLItemArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestACLItemTranscode(t *testing.T) {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5/pgtype"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"context"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestBitTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestBoolArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestBoolTranscode(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestBoxTranscode(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestBPCharArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestChar3Transcode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestByteaArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestByteaTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestCIDTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestCIDRArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestCircleTranscode(t *testing.T) {
+1 -1
View File
@@ -4,7 +4,7 @@ import (
"testing"
"github.com/jackc/pgio"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5/pgtype"
"github.com/stretchr/testify/require"
)
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"context"
"testing"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+3 -3
View File
@@ -6,9 +6,9 @@ import (
"os"
"testing"
pgx "github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
pgx "github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"fmt"
"os"
pgx "github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype"
pgx "github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
)
type MyType struct {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestDateArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestDateTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestDaterangeTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestEnumArrayTranscode(t *testing.T) {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"context"
"testing"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestFloat4ArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestFloat4Transcode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestFloat8ArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestFloat8Transcode(t *testing.T) {
+3 -3
View File
@@ -5,9 +5,9 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestHstoreArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestHstoreTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInetArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/stretchr/testify/assert"
)
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt2ArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt2Transcode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt4ArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt4Transcode(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt4rangeTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt8ArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt8Transcode(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestInt8rangeTranscode(t *testing.T) {
+3 -3
View File
@@ -6,9 +6,9 @@ import (
"context"
"testing"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func BenchmarkQueryTextFormatDecode_PG_int4_to_Go_int16_1_rows_1_columns(b *testing.B) {
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"context"
"testing"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/jackc/pgx/v5"
)
<%
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"testing"
"time"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestJSONTranscode(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestJSONBArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestJSONBTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"context"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestLineTranscode(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestLsegTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestMacaddrArrayTranscode(t *testing.T) {
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestMacaddrTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestNameTranscode(t *testing.T) {
+2 -2
View File
@@ -6,8 +6,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestNumericArrayTranscode(t *testing.T) {
+3 -3
View File
@@ -9,8 +9,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/stretchr/testify/require"
)
@@ -289,7 +289,7 @@ func TestNumericAssignTo(t *testing.T) {
{src: &pgtype.Numeric{Int: big.NewInt(42), Valid: true}, dst: &_i8, expected: _int8(42)},
{src: &pgtype.Numeric{Int: big.NewInt(0)}, dst: &pi8, expected: ((*int8)(nil))},
{src: &pgtype.Numeric{Int: big.NewInt(0)}, dst: &_pi8, expected: ((*_int8)(nil))},
{src: &pgtype.Numeric{Int: big.NewInt(1006), Exp: -2, Valid: true}, dst: &f64, expected: float64(10.06)}, // https://github.com/jackc/pgx/v4/pgtype/issues/27
{src: &pgtype.Numeric{Int: big.NewInt(1006), Exp: -2, Valid: true}, dst: &f64, expected: float64(10.06)}, // https://github.com/jackc/pgx/v5/pgtype/issues/27
{src: &pgtype.Numeric{Valid: true, NaN: true}, dst: &f64, expected: math.NaN()},
{src: &pgtype.Numeric{Valid: true, NaN: true}, dst: &f32, expected: float32(math.NaN())},
{src: &pgtype.Numeric{Valid: true, InfinityModifier: pgtype.Infinity}, dst: &f64, expected: math.Inf(1)},
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"math/big"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestNumrangeTranscode(t *testing.T) {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestOIDValueTranscode(t *testing.T) {
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestPathTranscode(t *testing.T) {
+3 -3
View File
@@ -7,9 +7,9 @@ import (
"net"
"testing"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgtype"
_ "github.com/jackc/pgx/v4/stdlib"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgtype"
_ "github.com/jackc/pgx/v5/stdlib"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
+3 -3
View File
@@ -4,9 +4,9 @@ import (
"context"
"errors"
"github.com/jackc/pgx/v4"
"github.com/jackc/pgx/v4/pgconn"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v5"
"github.com/jackc/pgx/v5/pgconn"
"github.com/jackc/pgx/v5/pgtype"
)
type Querier interface {
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
"github.com/stretchr/testify/require"
)
+2 -2
View File
@@ -3,8 +3,8 @@ package pgtype_test
import (
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestPolygonTranscode(t *testing.T) {
+2 -2
View File
@@ -5,8 +5,8 @@ import (
"reflect"
"testing"
"github.com/jackc/pgx/v4/pgtype"
"github.com/jackc/pgx/v4/pgtype/testutil"
"github.com/jackc/pgx/v5/pgtype"
"github.com/jackc/pgx/v5/pgtype/testutil"
)
func TestQCharTranscode(t *testing.T) {

Some files were not shown because too many files have changed in this diff Show More