Updated on 2023-10-23 GMT+08:00

type Rows

The following table describes type Rows.

Method

Description

Return Value

(rs *Rows)Close()

Closes Rows to stop the iteration of the data set.

error

(rs *Rows)ColumnTypes()

Returns column information.

[]*ColumnType and error

(rs *Rows)Columns()

Returns the name of each column.

[]string and error

(rs *Rows)Err()

Returns any errors that occur during iteration.

error

(rs *Rows)Next()

Prepares the next data row to be read with the Scan method. If there is an additional result set, true is returned. Otherwise, false is returned.

bool

(rs *Rows)Scan(dest ...interface{})

Copies the columns of the current iterated row of data to the value specified by dest.

error

(rs *Rows)NextResultSet() bool

Specifies whether there is an additional result set.

Bool

Parameter Description

Parameter

Description

dest

The column to be queried needs to be copied to the value specified by this parameter.