Change pgx driver #996
No reviewers
Labels
No Label
backport/done
backport/v1
blocked
db
oracle
db
sqlserver
duplicate
feature
cache
frontport/done
frontport/main
invalid
kind
breaking
kind
bug
kind
build
kind
dependencies
kind
docs
kind
driver
kind
enhancement
kind
feature
kind
performance
kind
proposal
kind
question
kind
refactor
kind
testing
need
feedback
need
test
proposal:accepted
RaspBerry Pi
regression
skip-changelog
upstream
wip
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: xorm/xorm#996
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "master"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The Pgx driver should be changed,so that it can work with pgx's stdlib properly
FYI: https://github.com/jackc/pgx/blob/master/stdlib/sql.go#L137
pgx provide has customized the leading 9 bytes of the dsn to provide a mechanism to config the connection, EG: set
PreferSimpleProtocol = true
, However, when using this mechanism, theParse
process of xorm will be failled.xorm 中 pgx driver的
Parse
方法会导致不能使用pgx
stdlib 包中的ConnConfig
, 有一些pgx的配置比如设置PreferSimpleProtocol
为true
就没办法去做, 所以提供了一个新类去处理这件事情, 在Parse
阶段直接将将9个字符根据pgx的规则扔掉, 保证能Parse通过Codecov Report
64.61% <100%> (-1.54%)
75.57% <100%> (+0.32%)
Continue to review full report at Codecov.
I ever want to pgx PASS all the tests, but I'm failed.
Thanks