mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: byte => u8
This commit is contained in:
@@ -30,7 +30,7 @@ pub fn (db Connection) @select(config orm.SelectConfig, data orm.QueryData, wher
|
||||
f := unsafe { fields[i] }
|
||||
match FieldType(f.@type) {
|
||||
.type_tiny {
|
||||
dataptr << byte(0)
|
||||
dataptr << u8(0)
|
||||
}
|
||||
.type_short {
|
||||
dataptr << u16(0)
|
||||
@@ -51,7 +51,7 @@ pub fn (db Connection) @select(config orm.SelectConfig, data orm.QueryData, wher
|
||||
dataptr << ''
|
||||
}
|
||||
else {
|
||||
dataptr << byte(0)
|
||||
dataptr << u8(0)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -163,7 +163,7 @@ fn stmt_binder_match(mut stmt Stmt, data orm.Primitive) {
|
||||
stmt.bind_i64(&data)
|
||||
}
|
||||
byte {
|
||||
stmt.bind_byte(&data)
|
||||
stmt.bind_u8(&data)
|
||||
}
|
||||
u16 {
|
||||
stmt.bind_u16(&data)
|
||||
@@ -211,7 +211,7 @@ fn buffer_to_primitive(data_list []&char, types []int) ?[]orm.Primitive {
|
||||
primitive = *(&i64(data))
|
||||
}
|
||||
9 {
|
||||
primitive = *(&byte(data))
|
||||
primitive = *(&u8(data))
|
||||
}
|
||||
10 {
|
||||
primitive = *(&u16(data))
|
||||
|
@@ -58,7 +58,7 @@ pub fn (r Result) rows() []Row {
|
||||
if unsafe { rr[i] == 0 } {
|
||||
row.vals << ''
|
||||
} else {
|
||||
row.vals << mystring(unsafe { &byte(rr[i]) })
|
||||
row.vals << mystring(unsafe { &u8(rr[i]) })
|
||||
}
|
||||
}
|
||||
rows << row
|
||||
|
@@ -153,7 +153,7 @@ pub fn (mut stmt Stmt) bind_bool(b &bool) {
|
||||
stmt.bind(mysql.mysql_type_tiny, b, 0)
|
||||
}
|
||||
|
||||
pub fn (mut stmt Stmt) bind_byte(b &byte) {
|
||||
pub fn (mut stmt Stmt) bind_u8(b &byte) {
|
||||
stmt.bind(mysql.mysql_type_tiny, b, 0)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user