Result columns.

This commit is contained in:
Nuno Cruces
2023-01-17 18:31:46 +00:00
parent e59118d548
commit 0652903b6d
4 changed files with 113 additions and 19 deletions

View File

@@ -1,6 +1,7 @@
package main
import (
"fmt"
"log"
"github.com/ncruces/go-sqlite3"
@@ -28,6 +29,15 @@ func main() {
log.Fatal(err)
}
for {
if row, err := stmt.Step(); err != nil {
log.Fatal(err)
} else if !row {
break
}
fmt.Println(stmt.ColumnInt(0), stmt.ColumnText(1))
}
err = stmt.Close()
if err != nil {
log.Fatal(err)