Merge branch 'v3' into updates
Some checks failed
autoapprove / autoapprove (pull_request) Failing after 1m25s
automerge / automerge (pull_request) Failing after 5s
codeql / analyze (go) (pull_request) Failing after 3m11s
dependabot-automerge / automerge (pull_request) Has been skipped
prbuild / test (pull_request) Failing after 1m28s
prbuild / lint (pull_request) Failing after 2m43s
Some checks failed
autoapprove / autoapprove (pull_request) Failing after 1m25s
automerge / automerge (pull_request) Failing after 5s
codeql / analyze (go) (pull_request) Failing after 3m11s
dependabot-automerge / automerge (pull_request) Has been skipped
prbuild / test (pull_request) Failing after 1m28s
prbuild / lint (pull_request) Failing after 2m43s
This commit is contained in:
commit
0e8e4d6e55
16
gen.go
16
gen.go
@ -66,7 +66,7 @@ func main() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
h := getHash(ifaces)
|
h := getHash(ifaces)
|
||||||
b.WriteString(fmt.Sprintf("\tif v, ok := dc.(wrapConn%04d_%s); ok {\n", n, h))
|
b.WriteString(fmt.Sprintf("\tif _, ok := dc.(wrapConn%04d_%s); ok {\n", n, h))
|
||||||
b.WriteString("\treturn struct {\n")
|
b.WriteString("\treturn struct {\n")
|
||||||
b.WriteString("\t\tdriver.Conn\n")
|
b.WriteString("\t\tdriver.Conn\n")
|
||||||
b.WriteString(fmt.Sprintf("\t\t\t%s", strings.Join(ifaces, "\n\t\t\t")))
|
b.WriteString(fmt.Sprintf("\t\t\t%s", strings.Join(ifaces, "\n\t\t\t")))
|
||||||
@ -74,14 +74,14 @@ func main() {
|
|||||||
for idx := range ifaces {
|
for idx := range ifaces {
|
||||||
if idx > 0 {
|
if idx > 0 {
|
||||||
b.WriteString(", ")
|
b.WriteString(", ")
|
||||||
b.WriteString("v")
|
b.WriteString("c")
|
||||||
} else if idx == 0 {
|
} else if idx == 0 {
|
||||||
b.WriteString("c")
|
b.WriteString("c")
|
||||||
} else {
|
} else {
|
||||||
b.WriteString("v")
|
b.WriteString("c")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b.WriteString(", v}\n")
|
b.WriteString(", c}\n")
|
||||||
b.WriteString("}\n\n")
|
b.WriteString("}\n\n")
|
||||||
}
|
}
|
||||||
b.WriteString("return c\n")
|
b.WriteString("return c\n")
|
||||||
@ -112,7 +112,7 @@ func main() {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
h := getHash(ifaces)
|
h := getHash(ifaces)
|
||||||
b.WriteString(fmt.Sprintf("\tif v, ok := stmt.(wrapStmt%04d_%s); ok {\n", n, h))
|
b.WriteString(fmt.Sprintf("\tif _, ok := stmt.(wrapStmt%04d_%s); ok {\n", n, h))
|
||||||
b.WriteString("\treturn struct {\n")
|
b.WriteString("\treturn struct {\n")
|
||||||
b.WriteString("\t\tdriver.Stmt\n")
|
b.WriteString("\t\tdriver.Stmt\n")
|
||||||
b.WriteString(fmt.Sprintf("\t\t\t%s", strings.Join(ifaces, "\n\t\t\t")))
|
b.WriteString(fmt.Sprintf("\t\t\t%s", strings.Join(ifaces, "\n\t\t\t")))
|
||||||
@ -120,14 +120,14 @@ func main() {
|
|||||||
for idx := range ifaces {
|
for idx := range ifaces {
|
||||||
if idx > 0 {
|
if idx > 0 {
|
||||||
b.WriteString(", ")
|
b.WriteString(", ")
|
||||||
b.WriteString("v")
|
b.WriteString("c")
|
||||||
} else if idx == 0 {
|
} else if idx == 0 {
|
||||||
b.WriteString("c")
|
b.WriteString("c")
|
||||||
} else {
|
} else {
|
||||||
b.WriteString("v")
|
b.WriteString("c")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b.WriteString(", v}\n")
|
b.WriteString(", c}\n")
|
||||||
b.WriteString("}\n\n")
|
b.WriteString("}\n\n")
|
||||||
}
|
}
|
||||||
b.WriteString("return c\n")
|
b.WriteString("return c\n")
|
||||||
|
2
go.mod
2
go.mod
@ -1,6 +1,6 @@
|
|||||||
module go.unistack.org/micro-wrapper-sql/v3
|
module go.unistack.org/micro-wrapper-sql/v3
|
||||||
|
|
||||||
go 1.19
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
go.unistack.org/micro-wrapper-requestid/v3 v3.8.7
|
go.unistack.org/micro-wrapper-requestid/v3 v3.8.7
|
||||||
|
@ -44,13 +44,13 @@ var (
|
|||||||
meterRequestDurationSeconds = "request_duration_seconds"
|
meterRequestDurationSeconds = "request_duration_seconds"
|
||||||
|
|
||||||
labelUnknown = "unknown"
|
labelUnknown = "unknown"
|
||||||
labelQuery = "query"
|
labelQuery = "db.statement"
|
||||||
labelMethod = "method"
|
labelMethod = "db.method"
|
||||||
labelStatus = "status"
|
labelStatus = "status"
|
||||||
labelSuccess = "success"
|
labelSuccess = "success"
|
||||||
labelFailure = "failure"
|
labelFailure = "failure"
|
||||||
labelHost = "db_host"
|
labelHost = "db.host"
|
||||||
labelDatabase = "db_name"
|
labelDatabase = "db.name"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Options struct holds wrapper options
|
// Options struct holds wrapper options
|
||||||
|
4152
wrap_gen.go
4152
wrap_gen.go
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user