Skip to content
This repository has been archived by the owner on May 24, 2023. It is now read-only.

Update varcols.md #111

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions varcols.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ for rows.Next() {
// Now you can check each element of vals for nil-ness,
// and you can use type introspection and type assertions
// to fetch the column into a typed variable.

//If you want to get the column value,you can just do it like this
col_value := scanArgs[i].(*sql.RawBytes)
value := string(*col_value)
fmt.Println(value)
}
</pre>

Expand Down