add Version func for retrieving SQLite library version info

systemlib
romo 2014-10-13 11:05:49 +09:00
parent a80c27ba33
commit 86932b40b0
1 changed files with 8 additions and 0 deletions

View File

@ -88,6 +88,14 @@ func init() {
sql.Register("sqlite3", &SQLiteDriver{})
}
// Return SQLite library Version information.
func Version() (libVersion string, libVersionNumber int, sourceId string) {
libVersion = C.GoString(C.sqlite3_libversion())
libVersionNumber = int(C.sqlite3_libversion_number())
sourceId = C.GoString(C.sqlite3_sourceid())
return libVersion, libVersionNumber, sourceId
}
// Driver struct.
type SQLiteDriver struct {
Extensions []string