OmniSciDB  a7179b2938
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
com.mapd.parser.extension.ddl.SqlCheckConstraint Class Reference
+ Inheritance diagram for com.mapd.parser.extension.ddl.SqlCheckConstraint:
+ Collaboration diagram for com.mapd.parser.extension.ddl.SqlCheckConstraint:

Public Member Functions

SqlOperator getOperator ()
 
List< SqlNode > getOperandList ()
 
void unparse (SqlWriter writer, int leftPrec, int rightPrec)
 

Package Functions

 SqlCheckConstraint (SqlParserPos pos, SqlIdentifier name, SqlNode expression)
 

Private Attributes

final SqlIdentifier name
 
final SqlNode expression
 

Static Private Attributes

static final SqlSpecialOperator OPERATOR
 

Detailed Description

Parse tree for

UNIQUE

,

PRIMARY KEY

constraints.

And

FOREIGN KEY

, when we support it.

Definition at line 37 of file SqlCheckConstraint.java.

Constructor & Destructor Documentation

com.mapd.parser.extension.ddl.SqlCheckConstraint.SqlCheckConstraint ( SqlParserPos  pos,
SqlIdentifier  name,
SqlNode  expression 
)
inlinepackage

Member Function Documentation

List<SqlNode> com.mapd.parser.extension.ddl.SqlCheckConstraint.getOperandList ( )
inline
SqlOperator com.mapd.parser.extension.ddl.SqlCheckConstraint.getOperator ( )
inline

Definition at line 52 of file SqlCheckConstraint.java.

References com.mapd.parser.extension.ddl.SqlCheckConstraint.OPERATOR.

52  {
53  return OPERATOR;
54  }
void com.mapd.parser.extension.ddl.SqlCheckConstraint.unparse ( SqlWriter  writer,
int  leftPrec,
int  rightPrec 
)
inline

Definition at line 62 of file SqlCheckConstraint.java.

References com.mapd.parser.extension.ddl.SqlCheckConstraint.name.

62  {
63  if (name != null) {
64  writer.keyword("CONSTRAINT");
65  name.unparse(writer, 0, 0);
66  }
67  writer.keyword("CHECK");
68  if (writer.isAlwaysUseParentheses()) {
69  expression.unparse(writer, 0, 0);
70  } else {
71  writer.sep("(");
72  expression.unparse(writer, 0, 0);
73  writer.sep(")");
74  }
75  }

Member Data Documentation

final SqlNode com.mapd.parser.extension.ddl.SqlCheckConstraint.expression
private
final SqlSpecialOperator com.mapd.parser.extension.ddl.SqlCheckConstraint.OPERATOR
staticprivate
Initial value:
=
new SqlSpecialOperator("CHECK", SqlKind.CHECK)

Definition at line 38 of file SqlCheckConstraint.java.

Referenced by com.mapd.parser.extension.ddl.SqlCheckConstraint.getOperator().


The documentation for this class was generated from the following file: