1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
|
bool fromMySqlx(const Row & i_oRow, cSerializer& o_oSerializer)
{
bool bRes(true);
for (const auto field : o_oSerializer.GetAllFields()) {
std::string strValue;
mysqlx::Value::Type mysqlType = i_oRow[(uint32_t)((int32_t)field.first - 1)].getType();
switch (mysqlType) {
case mysqlx::Value::Type::UINT64: ///< Unsigned integer
{uint64_t u64 = i_oRow[(uint32_t)((int32_t)field.first - 1)].get<uint64_t>();
strValue = cSerializer::SerializeToString(field.second, (void*)&u64, field.second);
break;
}
case mysqlx::Value::Type::RAW: {// je bloque ici sur comment proceder :(
size_t taille = 30u;
byte ibyte = i_oRow[(uint32_t)((int32_t)field.first - 1)].get<byte>();
strValue = tmp;
break;
}
case mysqlx::Value::Type::INT64:
case mysqlx::Value::Type::FLOAT:
case mysqlx::Value::Type::DOUBLE:
case mysqlx::Value::Type::BOOL:
case mysqlx::Value::Type::ARRAY:
case mysqlx::Value::Type::DOCUMENT:
case mysqlx::Value::Type::VNULL:
case mysqlx::Value::Type::STRING:
// ...
}
//bRes = ............................
}
return bRes;
} |
Partager