mirror of
https://github.com/ncruces/go-sqlite3.git
synced 2026-01-12 05:59:14 +00:00
Result columns.
This commit is contained in:
10
cmd/main.go
10
cmd/main.go
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user