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:
@ -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);
|
||||
|
Reference in New Issue
Block a user