fix(contrib/drivers/gaussdb): remove github.com/lib/pq dependence (#4615)

Co-authored-by: John Guo <claymore1986@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
hailaz
2026-01-16 11:36:01 +08:00
committed by GitHub
parent 5979261584
commit d1cd30c9b4
4 changed files with 4 additions and 7 deletions

View File

@ -11,8 +11,8 @@ import (
"reflect"
"strings"
pq "gitee.com/opengauss/openGauss-connector-go-pq"
"github.com/google/uuid"
"github.com/lib/pq"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"

View File

@ -16,14 +16,14 @@ import (
"github.com/gogf/gf/v2/text/gstr"
)
// Open creates and returns an underlying sql.DB object for pgsql.
// https://pkg.go.dev/github.com/lib/pq
// Open creates and returns an underlying sql.DB object for GaussDB (openGauss).
// https://gitee.com/opengauss/openGauss-connector-go-pq
func (d *Driver) Open(config *gdb.ConfigNode) (db *sql.DB, err error) {
source, err := configNodeToSource(config)
if err != nil {
return nil, err
}
underlyingDriverName := "postgres"
underlyingDriverName := "opengauss"
if db, err = sql.Open(underlyingDriverName, source); err != nil {
err = gerror.WrapCodef(
gcode.CodeDbOperationError, err,

View File

@ -6,7 +6,6 @@ require (
gitee.com/opengauss/openGauss-connector-go-pq v1.0.7
github.com/gogf/gf/v2 v2.9.7
github.com/google/uuid v1.6.0
github.com/lib/pq v1.10.9
)
require (

View File

@ -56,8 +56,6 @@ github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lib/pq v1.10.9 h1:YXG7RB+JIjhP29X+OtkiDnYaXQwpS4JEWq7dtCCRUEw=
github.com/lib/pq v1.10.9/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/magiconair/properties v1.8.10 h1:s31yESBquKXCV9a/ScB3ESkOjUYYv+X0rg8SYxI99mE=
github.com/magiconair/properties v1.8.10/go.mod h1:Dhd985XPs7jluiymwWYZ0G4Z61jb3vdS329zhj2hYo0=
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=