Merge pull request #152 from rhomel/master
add Version func for retrieving SQLite library version info
This commit is contained in:
commit
ea3ab4d8f5
|
@ -88,6 +88,14 @@ func init() {
|
||||||
sql.Register("sqlite3", &SQLiteDriver{})
|
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.
|
// Driver struct.
|
||||||
type SQLiteDriver struct {
|
type SQLiteDriver struct {
|
||||||
Extensions []string
|
Extensions []string
|
||||||
|
|
Loading…
Reference in New Issue