111
This commit is contained in:
@@ -31,7 +31,7 @@ class Mysql extends Base_C_Object {
|
||||
}
|
||||
|
||||
function Fetch() {
|
||||
Sq_CallFunc(S_Ptr("0x83F44BC"), "int", ["pointer"], this.C_Object);
|
||||
return Sq_CallFunc(S_Ptr("0x83F44BC"), "int", ["pointer"], this.C_Object);
|
||||
}
|
||||
|
||||
function Close() {
|
||||
@@ -77,7 +77,7 @@ class Mysql extends Base_C_Object {
|
||||
Sq_Delete_Point(intSizePoint);
|
||||
return result;
|
||||
}
|
||||
Sq_Delete_Point(intSizePoint);
|
||||
// Sq_Delete_Point(intSizePoint);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -131,16 +131,12 @@ class Mysql extends Base_C_Object {
|
||||
//MySQL_get_binary_length
|
||||
local binary_length = Sq_CallFunc(S_Ptr("0x81253DE"), "int", ["pointer", "int"], this.C_Object, columnIndex);
|
||||
if (binary_length > 0) {
|
||||
local binary_length_point = Sq_New_Point(binary_length);
|
||||
local binary_length_point = Memory.alloc(binary_length);
|
||||
//MySQL_get_binary
|
||||
if (1 == Sq_CallFunc(S_Ptr("0x812531A"), "int", ["pointer", "int", "pointer", "int"], this.C_Object, columnIndex, binary_length_point, binary_length)) {
|
||||
//转为blob
|
||||
local blob = Sq_Point2Blob(binary_length_point, binary_length);
|
||||
Sq_Delete_Point(intSizePoint);
|
||||
return blob;
|
||||
if (1 == Sq_CallFunc(S_Ptr("0x812531A"), "int", ["pointer", "int", "pointer", "int"], this.C_Object, columnIndex, binary_length_point.C_Object, binary_length)) {
|
||||
return binary_length_point;
|
||||
}
|
||||
}
|
||||
Sq_Delete_Point(intSizePoint);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -161,19 +157,18 @@ class Mysql extends Base_C_Object {
|
||||
Fetch();
|
||||
local row = [];
|
||||
for (local j = 0; j< column_type_list.len(); j++) {
|
||||
if (column_type_list[j] == "int") {
|
||||
//判断是否为空值
|
||||
if (!Sq_CallFunc(S_Ptr("0x85F41B2"), "bool", ["pointer", "int"], this.C_Object, j)) {
|
||||
row.push(null);
|
||||
} else if (column_type_list[j] == "int") {
|
||||
row.push(ReadIntColumn(j));
|
||||
}
|
||||
if (column_type_list[j] == "string") {
|
||||
} else if (column_type_list[j] == "string") {
|
||||
row.push(ReadStringColumn(j));
|
||||
}
|
||||
if (column_type_list[j] == "uint") {
|
||||
} else if (column_type_list[j] == "uint") {
|
||||
row.push(ReadUIntColumn(j));
|
||||
}
|
||||
if (column_type_list[j] == "float") {
|
||||
} else if (column_type_list[j] == "float") {
|
||||
row.push(ReadFloatColumn(j));
|
||||
}
|
||||
if (column_type_list[j] == "binary") {
|
||||
} else if (column_type_list[j] == "binary") {
|
||||
row.push(ReadBinaryColumn(j));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user