From 693a5ab7b0d3e7cadd206ebfd29a9df5fca3ea48 Mon Sep 17 00:00:00 2001 From: aozhiwei Date: Tue, 25 Jun 2024 21:42:33 +0800 Subject: [PATCH] 1 --- new_dataset.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/new_dataset.go b/new_dataset.go index f482238..0c5c881 100644 --- a/new_dataset.go +++ b/new_dataset.go @@ -37,6 +37,7 @@ func (this *NewDataSet) init(rows *sql.Rows) { } } + q5.NewSlice(&this.rows, 0, 100) for rows.Next() { values := []interface{}{} for i := 0; i < len(this.columns); i++ { @@ -58,8 +59,8 @@ func (this *NewDataSet) Next() bool { if this.numOfReaded >= int64(len(this.rows)) { return false } - this.numOfReaded += 1 this.currRow = this.rows[this.numOfReaded] + this.numOfReaded += 1 return true }