* check that column check constraints only refer to that column.
*/
final public ConstraintDefinitionNode checkConstraintDefinition(TableName constraintName, String columnName) throws ParseException, StandardException {
Token beginToken;
Token endToken;
ValueNode value;
ResultColumnList rclList = null;
jj_consume_token(CHECK);
beginToken = jj_consume_token(LEFT_PAREN);
value = valueExpression(false);
endToken = jj_consume_token(RIGHT_PAREN);
if (columnName != null)
{
/* Column check constraint */
rclList = (ResultColumnList) nodeFactory.getNode(
C_NodeTypes.RESULT_COLUMN_LIST,
getContextManager());
rclList.addElement((ResultColumn) nodeFactory.getNode(
C_NodeTypes.RESULT_COLUMN,
columnName,
null,
getContextManager()));
}
value.setBeginOffset( beginToken.beginOffset );
value.setEndOffset( endToken.endOffset );
{if (true) return (ConstraintDefinitionNode) nodeFactory.getNode(
C_NodeTypes.CONSTRAINT_DEFINITION_NODE,
constraintName,
ReuseFactory.getInteger(DataDictionary.CHECK_CONSTRAINT),
rclList,