1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

orm: mysql fixes (#14772)

This commit is contained in:
Louis Schmieder
2022-06-16 19:19:49 +02:00
committed by GitHub
parent fb5a40d1c8
commit 5df3d8ac75
7 changed files with 80 additions and 70 deletions

View File

@ -210,14 +210,14 @@ pub fn (mut stmt Stmt) bind(typ int, buffer voidptr, buf_len u32) {
}
}
pub fn (mut stmt Stmt) bind_res(fields &C.MYSQL_FIELD, dataptr []&char, lens []u32, num_fields int) {
pub fn (mut stmt Stmt) bind_res(fields &C.MYSQL_FIELD, dataptr []&u8, lens []u32, num_fields int) {
for i in 0 .. num_fields {
len := FieldType(unsafe { fields[i].@type }).get_len()
stmt.res << C.MYSQL_BIND{
buffer_type: unsafe { fields[i].@type }
buffer: dataptr[i]
length: &lens[i]
buffer_length: &len
buffer_length: len
}
}
}