Skip to content

Commit

Permalink
Merge pull request #5 from Banno/add_prepared_statements_field
Browse files Browse the repository at this point in the history
Add prepared_statements var for pgbouncer v1.21.0 support
  • Loading branch information
dtseiler authored Feb 21, 2024
2 parents e142c5e + 0f4c8f7 commit c1c2fee
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 36 deletions.
4 changes: 4 additions & 0 deletions BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
To manually build for testing & release, be sure to specify the target VM's arch and OS:
```
GOOS=linux GOARCH=amd64 go build
```
74 changes: 38 additions & 36 deletions internal/store/sql.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,45 +71,47 @@ type list struct {
}

type server struct {
Type string `db:"type"`
User string `db:"user"`
Database string `db:"database"`
State string `db:"state"`
Addr string `db:"addr"`
Port int64 `db:"port"`
LocalAddr string `db:"local_addr"`
LocalPort int64 `db:"local_port"`
ConnectTime string `db:"connect_time"`
RequestTime string `db:"request_time"`
Wait int64 `db:"wait"`
WaitUs int64 `db:"wait_us"`
CloseNeeded int64 `db:"close_needed"`
Ptr string `db:"ptr"`
Link string `db:"link"`
RemotePid string `db:"remote_pid"`
Tls string `db:"tls"`
ApplicationName sql.NullString `db:"application_name"`
Type string `db:"type"`
User string `db:"user"`
Database string `db:"database"`
State string `db:"state"`
Addr string `db:"addr"`
Port int64 `db:"port"`
LocalAddr string `db:"local_addr"`
LocalPort int64 `db:"local_port"`
ConnectTime string `db:"connect_time"`
RequestTime string `db:"request_time"`
Wait int64 `db:"wait"`
WaitUs int64 `db:"wait_us"`
CloseNeeded int64 `db:"close_needed"`
Ptr string `db:"ptr"`
Link string `db:"link"`
RemotePid string `db:"remote_pid"`
Tls string `db:"tls"`
ApplicationName sql.NullString `db:"application_name"`
PreparedStatements int64 `db:"prepared_statements"`
}

type client struct {
Type string `db:"type"`
User string `db:"user"`
Database string `db:"database"`
State string `db:"state"`
Addr string `db:"addr"`
Port int64 `db:"port"`
LocalAddr string `db:"local_addr"`
LocalPort int64 `db:"local_port"`
ConnectTime string `db:"connect_time"`
RequestTime string `db:"request_time"`
Wait int64 `db:"wait"`
WaitUs int64 `db:"wait_us"`
CloseNeeded int64 `db:"close_needed"`
Ptr string `db:"ptr"`
Link string `db:"link"`
RemotePid string `db:"remote_pid"`
Tls string `db:"tls"`
ApplicationName sql.NullString `db:"application_name"`
Type string `db:"type"`
User string `db:"user"`
Database string `db:"database"`
State string `db:"state"`
Addr string `db:"addr"`
Port int64 `db:"port"`
LocalAddr string `db:"local_addr"`
LocalPort int64 `db:"local_port"`
ConnectTime string `db:"connect_time"`
RequestTime string `db:"request_time"`
Wait int64 `db:"wait"`
WaitUs int64 `db:"wait_us"`
CloseNeeded int64 `db:"close_needed"`
Ptr string `db:"ptr"`
Link string `db:"link"`
RemotePid string `db:"remote_pid"`
Tls string `db:"tls"`
ApplicationName sql.NullString `db:"application_name"`
PreparedStatements int64 `db:"prepared_statements"`
}

// NewSQL returns a new SQLStore.
Expand Down

0 comments on commit c1c2fee

Please sign in to comment.