MXS-2263: Retain integer sign information

The unsignedness of a column is now retained in the Column type as well as
the JSON schema. This allows correct conversion of unsigned integer types
which will be done in a later commit.
This commit is contained in:
Markus Mäkelä
2019-09-25 12:55:44 +03:00
parent 117e2e7e88
commit e1ff978b80
4 changed files with 53 additions and 10 deletions

View File

@ -56,16 +56,18 @@ struct gtid_pos_t
/** A single column in a CREATE TABLE statement */
struct Column
{
Column(std::string name, std::string type = "unknown", int length = -1)
Column(std::string name, std::string type = "unknown", int length = -1, bool is_unsigned = false)
: name(name)
, type(type)
, length(length)
, is_unsigned(is_unsigned)
{
}
std::string name;
std::string type;
int length;
bool is_unsigned;
json_t* to_json() const;
static Column from_json(json_t* json);