This commit is contained in:
shoopea 2020-06-25 19:04:51 +02:00
parent 27f43cc95e
commit eda8f545b3

6
sql.go
View File

@ -905,15 +905,21 @@ func getSQLListID64(q string) []int64 {
var (
id int64
ids []int64
count int64
)
rows, err := db.Query(q)
logOnError(err, "getSQLListID64 : "+q)
count = 0
for rows.Next() {
count++
err = rows.Scan(&id)
logOnError(err, "getSQLListID64 : scan next val")
ids = append(ids, id)
if count%10000 == 0 {
log.Printf("getSQLListID64 : %d entries", count)
}
}
err = rows.Err()
logOnError(err, "getSQLListID64 : query end")