forked from mirror/go-sqlite3
28 lines
660 B
Go
28 lines
660 B
Go
|
// Copyright (C) 2018 The Go-SQLite3 Authors.
|
||
|
//
|
||
|
// Use of this source code is governed by an MIT-style
|
||
|
// license that can be found in the LICENSE file.
|
||
|
|
||
|
// +build cgo
|
||
|
|
||
|
package sqlite3
|
||
|
|
||
|
/*
|
||
|
#ifndef USE_LIBSQLITE3
|
||
|
#include <sqlite3-binding.h>
|
||
|
#else
|
||
|
#include <sqlite3.h>
|
||
|
#endif
|
||
|
#include <stdlib.h>
|
||
|
#include <string.h>
|
||
|
*/
|
||
|
import "C"
|
||
|
|
||
|
// Version returns 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
|
||
|
}
|