mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
mysql: refactor, comments, simplify (#18258)
This commit is contained in:

committed by
GitHub

parent
010a5c26a0
commit
351b2e0e42
@ -1,16 +1,16 @@
|
||||
module mysql
|
||||
|
||||
// get_error_msg - returns error message from MySQL instance.
|
||||
// get_error_msg returns error message from MySQL instance.
|
||||
fn get_error_msg(conn &C.MYSQL) string {
|
||||
return unsafe { C.mysql_error(conn).vstring() }
|
||||
}
|
||||
|
||||
// get_errno - returns error number from MySQL instance.
|
||||
// get_errno returns error number from MySQL instance.
|
||||
fn get_errno(conn &C.MYSQL) int {
|
||||
return C.mysql_errno(conn)
|
||||
}
|
||||
|
||||
// resolve_nil_str - returns an empty string if passed value is a nil pointer.
|
||||
// resolve_nil_str returns an empty string if passed value is a nil pointer.
|
||||
fn resolve_nil_str(ptr &u8) string {
|
||||
if isnil(ptr) {
|
||||
return ''
|
||||
|
Reference in New Issue
Block a user