table all field
This commit is contained in:
18
qry.go
18
qry.go
@@ -7,6 +7,7 @@ import (
|
||||
"context"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
|
||||
"github.com/jackc/pgx/v5"
|
||||
)
|
||||
@@ -34,6 +35,23 @@ type (
|
||||
}
|
||||
)
|
||||
|
||||
var sbPool = sync.Pool{
|
||||
New: func() any {
|
||||
return new(strings.Builder)
|
||||
},
|
||||
}
|
||||
|
||||
// get string builder from pool
|
||||
func getSB() *strings.Builder {
|
||||
return sbPool.Get().(*strings.Builder)
|
||||
}
|
||||
|
||||
// put string builder back to pool
|
||||
func putSB(sb *strings.Builder) {
|
||||
sb.Reset()
|
||||
sbPool.Put(sb)
|
||||
}
|
||||
|
||||
func And(cond ...Conditioner) Conditioner {
|
||||
return &CondGroup{op: " AND ", cond: cond}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user