BG
This commit is contained in:
@@ -606,11 +606,19 @@ bool module::mysql_result::next()
|
|||||||
|
|
||||||
sol::object module::mysql_result::get(sol::object obj, sol::this_state s)
|
sol::object module::mysql_result::get(sol::object obj, sol::this_state s)
|
||||||
{
|
{
|
||||||
|
std::string tmp_log;
|
||||||
std::string type;
|
std::string type;
|
||||||
if (obj.get_type() == sol::type::string)
|
if (obj.get_type() == sol::type::string)
|
||||||
|
{
|
||||||
|
tmp_log = "[string]=" + obj.as<std::string>();
|
||||||
type = m_result->field_type(obj.as<std::string>());
|
type = m_result->field_type(obj.as<std::string>());
|
||||||
|
}
|
||||||
else if (obj.get_type() == sol::type::number)
|
else if (obj.get_type() == sol::type::number)
|
||||||
|
{
|
||||||
|
tmp_log = "[int]=" + std::to_string(obj.as<int>());
|
||||||
type = m_result->field_type(obj.as<int>());
|
type = m_result->field_type(obj.as<int>());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#define GET_VALUE(FUNCTION) \
|
#define GET_VALUE(FUNCTION) \
|
||||||
if (obj.get_type() == sol::type::string) \
|
if (obj.get_type() == sol::type::string) \
|
||||||
@@ -618,7 +626,7 @@ sol::object module::mysql_result::get(sol::object obj, sol::this_state s)
|
|||||||
else if (obj.get_type() == sol::type::number) \
|
else if (obj.get_type() == sol::type::number) \
|
||||||
return sol::make_object(s, m_result->FUNCTION(obj.as<uint32>()))
|
return sol::make_object(s, m_result->FUNCTION(obj.as<uint32>()))
|
||||||
|
|
||||||
std::cout << "[string]:"<< obj.as<std::string>()<<"|"<<"[int]:"<< obj.as<int>()<<"=====" << type << std::endl;
|
std::cout << tmp_log <<"=====" << type << std::endl;
|
||||||
if (type == "int" || type == "tinyint unsigned")
|
if (type == "int" || type == "tinyint unsigned")
|
||||||
{
|
{
|
||||||
GET_VALUE(get_int32);
|
GET_VALUE(get_int32);
|
||||||
|
|||||||
Reference in New Issue
Block a user