test
This commit is contained in:
parent
27f43cc95e
commit
eda8f545b3
6
sql.go
6
sql.go
@ -905,15 +905,21 @@ func getSQLListID64(q string) []int64 {
|
|||||||
var (
|
var (
|
||||||
id int64
|
id int64
|
||||||
ids []int64
|
ids []int64
|
||||||
|
count int64
|
||||||
)
|
)
|
||||||
|
|
||||||
rows, err := db.Query(q)
|
rows, err := db.Query(q)
|
||||||
logOnError(err, "getSQLListID64 : "+q)
|
logOnError(err, "getSQLListID64 : "+q)
|
||||||
|
|
||||||
|
count = 0
|
||||||
for rows.Next() {
|
for rows.Next() {
|
||||||
|
count++
|
||||||
err = rows.Scan(&id)
|
err = rows.Scan(&id)
|
||||||
logOnError(err, "getSQLListID64 : scan next val")
|
logOnError(err, "getSQLListID64 : scan next val")
|
||||||
ids = append(ids, id)
|
ids = append(ids, id)
|
||||||
|
if count%10000 == 0 {
|
||||||
|
log.Printf("getSQLListID64 : %d entries", count)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
err = rows.Err()
|
err = rows.Err()
|
||||||
logOnError(err, "getSQLListID64 : query end")
|
logOnError(err, "getSQLListID64 : query end")
|
||||||
|
Loading…
Reference in New Issue
Block a user