// Package sqlite provides access to the SQLite library, version 3.
//
// Simple example:
// db, err := sqlite.Open("/path/to/db")
// if err != nil {
// ...
// }
// defer db.Close()
// err = db.Exec("CREATE TABLE test(id INTEGER PRIMARY KEY NOT NULL, name TEXT NOT NULL UNIQUE); -- ... and other ddls separated by semi-colon")
// ...
// ins, err := db.Prepare("INSERT INTO test (name) VALUES (?)")
// if err != nil {
// ...
// }
// defer ins.Finalize()
// rowId, err := ins.Insert("Bart")
// ...
// s, err := db.Prepare("SELECT name from test WHERE name like ?", "%a%")
// ...
// defer s.Finalize()
// var name string
// err = s.Select(func(s *Stmt) (err error) {
// err = s.Scan(&name)
// ...
// fmt.Printf("%s\n", name)
// })
packagesqlite
/*
...
...
@@ -344,7 +369,7 @@ func (c *Conn) OneValue(query string, value interface{}, args ...interface{}) er
returns.Scan(value)
}
// Count the number of rows modified
// Count the number of rows modified.
// If a separate thread makes changes on the same database connection while Changes() is running then the value returned is unpredictable and not meaningful.