Class ddl_utils::SqlType

class SqlType

Subclassed by anonymous_namespace{DdlCommandExecutor.cpp}::JsonColumnSqlType, Parser::SQLType

Public Functions

SqlType(SQLTypes type, int param1, int param2, bool is_array, int array_size)

Encapsulates column definition type information.

Parameters
  • type: - Column type.

  • param1: - For column types followed by parenthesis with more information, this represents the first parameter in the parenthesis. For example, in DECIMAL(5, 2), this would represent the precision value of 5. In GEOMETRY(POINT, 4326), this would represent the integer value of the kPOINT enum.

  • param2: - For column types followed by parenthesis with more information, this represents the second parameter in the parenthesis. For example, in DECIMAL(5, 2), this would represent the scale value of 2. In GEOMETRY(POINT, 4326), this would represent the coordinate type integer value of 4326.

  • is_array: - Flag that indicates whether or not column type is an array.

  • array_size: - For array column types, this is the specified size of the array.

SQLTypes get_type() const
int get_param1() const
void set_param1(int param)
int get_param2() const
bool get_is_array() const
void set_is_array(bool a)
int get_array_size() const
void set_array_size(int s)
std::string to_string() const
void check_type()

Protected Attributes

SQLTypes type
int param1
int param2
bool is_array
int array_size