mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
mysql: fix for adapting mysql types to v structs (#15100)
This commit is contained in:

committed by
GitHub

parent
041e90b2e2
commit
a13b8ff0c8
@ -58,6 +58,18 @@ pub fn (conn Connection) query(q string) ?Result {
|
||||
return Result{res}
|
||||
}
|
||||
|
||||
// use_result - reads the result of a query
|
||||
// used after invoking mysql_real_query() or mysql_query(),
|
||||
// for every statement that successfully produces a result set
|
||||
// (SELECT, SHOW, DESCRIBE, EXPLAIN, CHECK TABLE, and so forth).
|
||||
// This reads the result of a query directly from the server
|
||||
// without storing it in a temporary table or local buffer,
|
||||
// mysql_use_result is faster and uses much less memory than C.mysql_store_result().
|
||||
// You must mysql_free_result() after you are done with the result set.
|
||||
pub fn (conn Connection) use_result() {
|
||||
C.mysql_use_result(conn.conn)
|
||||
}
|
||||
|
||||
// real_query - make an SQL query and receive the results.
|
||||
// `real_query()` can be used for statements containing binary data.
|
||||
// (Binary data may contain the `\0` character, which `query()`
|
||||
|
Reference in New Issue
Block a user