Esempio n. 1
0
func sqlSourceId() string {
	// SQLite 3.6.18 introduced sqlite3_sourceid(), see
	// http://www.hwaci.com/sw/sqlite/changes.html for
	// details; we can't expect wide availability yet,
	// for example Debian Lenny ships SQLite 3.5.9 only.
	if sqlVersionNumber() < 3006018 {
		return "unknown source id"
	}

	cp := C.sqlite3_sourceid()
	if cp == nil {
		// The call can't really fail since it returns
		// a string constant, but let's be safe...
		sqlPanic("can't get library sourceid")
	}
	return C.GoString(cp)
}
Esempio n. 2
0
// 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
}
Esempio n. 3
0
// SourceId returns the check-in identifier of SQLite within its configuration
// management system.
// [http://www.sqlite.org/c3ref/c_source_id.html]
func SourceId() string {
	if initErr != nil {
		return ""
	}
	return C.GoString(C.sqlite3_sourceid())
}