internalQueryOne select count... add tmp table flag

This commit is contained in:
殷勇 2023-08-25 15:03:37 +08:00
parent 0391e1a006
commit 0463bb48fc
2 changed files with 33 additions and 33 deletions

4
app.go
View File

@ -2,11 +2,11 @@ package f5
import ( import (
"flag" "flag"
"os"
"q5"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
"os"
"q5"
) )
type App interface { type App interface {

View File

@ -182,7 +182,7 @@ func (this *dbPool) PageQuery(
} }
this.internalQueryOne( this.internalQueryOne(
dataSource, dataSource,
fmt.Sprintf("SELECT COUNT(*) FROM (%s)", finalySql), fmt.Sprintf("SELECT COUNT(*) FROM (%s) as t", finalySql),
params, params,
func(err error, rows *DataSet) { func(err error, rows *DataSet) {
if err != nil { if err != nil {