本文整理汇总了Golang中C.sqlite3_sourceid函数的典型用法代码示例。如果您正苦于以下问题:Golang sqlite3_sourceid函数的具体用法?Golang sqlite3_sourceid怎么用?Golang sqlite3_sourceid使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了sqlite3_sourceid函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: sqlSourceId
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)
}
示例2: Version
// 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
}
示例3: SourceId
// 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())
}