当前位置: 首页>>代码示例>>Golang>>正文


Golang C.sqlite3_errstr函数代码示例

本文整理汇总了Golang中C.sqlite3_errstr函数的典型用法代码示例。如果您正苦于以下问题:Golang sqlite3_errstr函数的具体用法?Golang sqlite3_errstr怎么用?Golang sqlite3_errstr使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了sqlite3_errstr函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。

示例1: Error

func (e Errno) Error() string {
	var s string
	if e == ErrSpecific {
		s = "Wrapper specific error"
	} else {
		s = C.GoString(C.sqlite3_errstr(C.int(e)))
	}
	if s == "" {
		return fmt.Sprintf("errno %d", int(e))
	}
	return s
}
开发者ID:npowern,项目名称:gosqlite,代码行数:12,代码来源:sqlite.go

示例2: errorString

func errorString(err Error) string {
	return C.GoString(C.sqlite3_errstr(C.int(err.Code)))
}
开发者ID:Wishing-Wall,项目名称:wishingwall,代码行数:3,代码来源:sqlite3.go

示例3: libErr

// libErr reports an error originating in SQLite. The error message is obtained
// from the database connection when possible, which may include some additional
// information. Otherwise, the result code is translated to a generic message.
func libErr(rc C.int, db *C.sqlite3) error {
	if db != nil && rc == C.sqlite3_errcode(db) {
		return &Error{int(rc), C.GoString(C.sqlite3_errmsg(db))}
	}
	return &Error{int(rc), C.GoString(C.sqlite3_errstr(rc))}
}
开发者ID:gidden,项目名称:cloudlus,代码行数:9,代码来源:util.go

示例4: errorString

func errorString(err ErrNo) string {
	return C.GoString(C.sqlite3_errstr(C.int(err)))
}
开发者ID:robertknight,项目名称:go-sqlite3,代码行数:3,代码来源:sqlite3.go


注:本文中的C.sqlite3_errstr函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。