mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
mysql: wrap more APIs & organize module
This commit is contained in:

committed by
GitHub

parent
377d8dc42c
commit
4fc52948b3
16
vlib/mysql/utils.v
Normal file
16
vlib/mysql/utils.v
Normal file
@ -0,0 +1,16 @@
|
||||
module mysql
|
||||
|
||||
fn get_error_msg(conn &MYSQL) string {
|
||||
return string(mysql_error(conn))
|
||||
}
|
||||
|
||||
fn get_errno(conn &MYSQL) int {
|
||||
return mysql_errno(conn)
|
||||
}
|
||||
|
||||
fn resolve_nil_str(ptr byteptr) string {
|
||||
if isnil(ptr) {
|
||||
return ''
|
||||
}
|
||||
return string(ptr)
|
||||
}
|
Reference in New Issue
Block a user