protected boolean isTableConstraint( DdlTokenStream tokens ) throws ParsingException {
        boolean result = false;

        if ((tokens.matches("PRIMARY", "KEY")) || (tokens.matches("FOREIGN", "KEY")) || (tokens.matches("UNIQUE")) || tokens.matches(
                CHECK)) {
            result = true;
        } else if (tokens.matches(CONSTRAINT)) {
            if (tokens.matches(CONSTRAINT, TokenStream.ANY_VALUE, "UNIQUE")
                || tokens.matches(CONSTRAINT, TokenStream.ANY_VALUE, "PRIMARY", "KEY")
                || tokens.matches(CONSTRAINT, TokenStream.ANY_VALUE, "FOREIGN", "KEY")
                || tokens.matches(CONSTRAINT, TokenStream.ANY_VALUE, CHECK)) {
                result = true;
            }
        }

        return result;
    }
protected boolean isTableConstraint ( DdlTokenStream tokens ) throws ParsingException { boolean result = false ; if ( ( tokens . matches ( "PRIMARY" , "KEY" ) ) || ( tokens . matches ( "FOREIGN" , "KEY" ) ) || ( tokens . matches ( "UNIQUE" ) ) || tokens . matches ( CHECK ) ) { result = true ; } else if ( tokens . matches ( CONSTRAINT ) ) { if ( tokens . matches ( CONSTRAINT , TokenStream . ANY_VALUE , "UNIQUE" ) || tokens . matches ( CONSTRAINT , TokenStream . ANY_VALUE , "PRIMARY" , "KEY" ) || tokens . matches ( CONSTRAINT , TokenStream . ANY_VALUE , "FOREIGN" , "KEY" ) || tokens . matches ( CONSTRAINT , TokenStream . ANY_VALUE , CHECK ) ) { result = true ; } } return result ; }
This utility method provides this parser the ability to distinguish between a CreateTable Constraint and a ColumnDefinition
Definition which are the only two statement segment types allowed within the CREATE TABLE parenthesis ( xxxxxx );

@param tokens the {@link DdlTokenStream} representing the tokenized DDL content; may not be null
@return is table constraint
@throws ParsingException