-
-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
Ran into this little quirk today. i checked with gitter, and pretty sure it's a bug, not entirely sure though
query:
items2 = db.query_all "select i_hp from rpg_user_items where rpg_character_id = ? and user_id = ? and in_stash = 0", client.selected_characterid, client.user_id, as: {UInt8}
puts items2[0]
storage type in mysql, set as tinyint, 255, unsigned
if you don't set the length to 255, but keep it unsigned, it will give you a read error:
MySql::ResultSet#read returned a Int8. A UInt8 was expected.
if you set the length to 255, that error is gone. however, now your value gets converted to 125
thanks for reading! special thanks to @dscottboggs_gitlab in gitter for the help
Metadata
Metadata
Assignees
Labels
No labels
