Merge pull request #152 from rhomel/master

add Version func for retrieving SQLite library version info
This commit is contained in:
mattn 2014-10-13 20:00:57 +09:00
commit ea3ab4d8f5
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