@Test @FixFor( "MODE-2604" ) public void shouldParseAlterTableStatementsWithCheckConstraints() throws Exception { String content = getFileContent(DDL_FILE_PATH + "alter_table_check_constraint.ddl"); assertScoreAndParse(content, "alter_table_check_constraint.ddl", 2); List<AstNode> constraintNodes = parser.nodeFactory().getChildrenForType(rootNode, StandardDdlLexicon.TYPE_ADD_TABLE_CONSTRAINT_DEFINITION); assertEquals(2, constraintNodes.size()); assertEquals(DdlConstants.UNNAMED_CHECK_NODE_NAME, constraintNodes.get(0).getName()); assertEquals("chk_Person", constraintNodes.get(1).getName()); }
public AstNodeFactory nodeFactory() { return this.nodeFactory; }
StandardDdlParser implements DdlParser, DdlConstants, DdlConstants.StatementStartPhrases { public AstNodeFactory nodeFactory() { return this.nodeFactory; } }
StandardDdlParser implements DdlParser, DdlConstants, DdlConstants.StatementStartPhrases { public AstNodeFactory nodeFactory() { return this.nodeFactory; } StandardDdlParser(); }
StandardDdlParser implements DdlParser, DdlConstants, DdlConstants.StatementStartPhrases { public AstNodeFactory nodeFactory() { return this.nodeFactory; } StandardDdlParser(); DataTypeParser getDatatypeParser(); void setDatatypeParser( DataTypeParser datatypeParser ); AstNodeFactory nodeFactory(); AstNode getRootNode(); void setRootNode( AstNode rootNode ); @Override Object score( String ddl,
                         String fileName,
                         DdlParserScorer scorer ); String[] getIdentifyingKeywords(); @Override void parse( String ddl,
                       AstNode rootNode,
                       Object scoreReturnObject ); final void addProblem( DdlParserProblem problem,
                                  AstNode node ); final void addProblem( DdlParserProblem problem ); final List<DdlParserProblem> getProblems(); final void attachNewProblem( DdlParserProblem problem,
                                        AstNode parentNode ); void mergeNodes( DdlTokenStream tokens,
                            AstNode firstNode,
                            AstNode secondNode ); AstNode handleUnknownToken( DdlTokenStream tokens,
                                       String tokenValue ); final AstNode unknownTerminatedNode( AstNode parentNode ); final AstNode missingTerminatorNode( AstNode parentNode ); final boolean isMissingTerminatorNode( AstNode node ); final boolean isValidSchemaChild( AstNode node ); final boolean setAsSchemaChildNode( AstNode statementNode,
                                               boolean stmtIsMissingTerminator ); boolean doUseTerminator(); void setDoUseTerminator( boolean useTerminator ); String getStatementTypeName( String[] stmtPhrase ); final Position getCurrentMarkedPosition(); final void markStartOfStatement( DdlTokenStream tokens ); final void markEndOfStatement( DdlTokenStream tokens,
                                          AstNode statementNode ); @Override void postProcess( AstNode rootNode ); boolean isTestMode(); void setTestMode( boolean testMode ); @Override String getId(); @Override int hashCode(); @Override boolean equals( Object obj ); }
StandardDdlParser implements DdlParser, DdlConstants, DdlConstants.StatementStartPhrases { public AstNodeFactory nodeFactory() { return this.nodeFactory; } StandardDdlParser(); DataTypeParser getDatatypeParser(); void setDatatypeParser( DataTypeParser datatypeParser ); AstNodeFactory nodeFactory(); AstNode getRootNode(); void setRootNode( AstNode rootNode ); @Override Object score( String ddl,
                         String fileName,
                         DdlParserScorer scorer ); String[] getIdentifyingKeywords(); @Override void parse( String ddl,
                       AstNode rootNode,
                       Object scoreReturnObject ); final void addProblem( DdlParserProblem problem,
                                  AstNode node ); final void addProblem( DdlParserProblem problem ); final List<DdlParserProblem> getProblems(); final void attachNewProblem( DdlParserProblem problem,
                                        AstNode parentNode ); void mergeNodes( DdlTokenStream tokens,
                            AstNode firstNode,
                            AstNode secondNode ); AstNode handleUnknownToken( DdlTokenStream tokens,
                                       String tokenValue ); final AstNode unknownTerminatedNode( AstNode parentNode ); final AstNode missingTerminatorNode( AstNode parentNode ); final boolean isMissingTerminatorNode( AstNode node ); final boolean isValidSchemaChild( AstNode node ); final boolean setAsSchemaChildNode( AstNode statementNode,
                                               boolean stmtIsMissingTerminator ); boolean doUseTerminator(); void setDoUseTerminator( boolean useTerminator ); String getStatementTypeName( String[] stmtPhrase ); final Position getCurrentMarkedPosition(); final void markStartOfStatement( DdlTokenStream tokens ); final void markEndOfStatement( DdlTokenStream tokens,
                                          AstNode statementNode ); @Override void postProcess( AstNode rootNode ); boolean isTestMode(); void setTestMode( boolean testMode ); @Override String getId(); @Override int hashCode(); @Override boolean equals( Object obj ); static final String ID; }