Class com::mapd::parser::extension::ddl::SqlKeyConstraint

class SqlKeyConstraint : public SqlCall

Parse tree for

UNIQUE 
,
PRIMARY KEY 
constraints.

And

FOREIGN KEY 
, when we support it.

Public Functions

SqlOperator com.mapd.parser.extension.ddl.SqlKeyConstraint.getOperator()
List<SqlNode> com.mapd.parser.extension.ddl.SqlKeyConstraint.getOperandList()
void com.mapd.parser.extension.ddl.SqlKeyConstraint.unparse(SqlWriter writer, int leftPrec, int rightPrec)
String com.mapd.parser.extension.ddl.SqlKeyConstraint.toString()

Public Static Functions

static SqlKeyConstraint com.mapd.parser.extension.ddl.SqlKeyConstraint.unique(SqlParserPos pos, SqlIdentifier name, SqlNodeList columnList)

Creates a UNIQUE constraint.

static SqlKeyConstraint com.mapd.parser.extension.ddl.SqlKeyConstraint.primary(SqlParserPos pos, SqlIdentifier name, SqlNodeList columnList)

Creates a PRIMARY KEY constraint.

static SqlKeyConstraint com.mapd.parser.extension.ddl.SqlKeyConstraint.shard(SqlParserPos pos, SqlIdentifier colName)

Creates a SHARD KEY constraint

static SqlKeyConstraint com.mapd.parser.extension.ddl.SqlKeyConstraint.sharedDict(SqlParserPos pos, SqlIdentifier colName, SqlIdentifier referencesCol)

CReates a SHARED DICTIONARY constraint

Protected Static Attributes

final SqlSpecialOperator com.mapd.parser.extension.ddl.SqlKeyConstraint.PRIMARY= new SqlSpecialOperator("PRIMARY KEY", SqlKind.PRIMARY_KEY)

Private Members

final SqlIdentifier com.mapd.parser.extension.ddl.SqlKeyConstraint.name
final SqlNodeList com.mapd.parser.extension.ddl.SqlKeyConstraint.columnList
final SqlIdentifier com.mapd.parser.extension.ddl.SqlKeyConstraint.referencesCol

Private Static Attributes

final SqlSpecialOperator com.mapd.parser.extension.ddl.SqlKeyConstraint.UNIQUE= new SqlSpecialOperator("UNIQUE", SqlKind.UNIQUE)