View Javadoc
1   /*
2    * Licensed to the Apache Software Foundation (ASF) under one or more
3    * contributor license agreements.  See the NOTICE file distributed with
4    * this work for additional information regarding copyright ownership.
5    * The ASF licenses this file to You under the Apache License, Version 2.0
6    * (the "License"); you may not use this file except in compliance with
7    * the License.  You may obtain a copy of the License at
8    *
9    *     http://www.apache.org/licenses/LICENSE-2.0
10   *
11   * Unless required by applicable law or agreed to in writing, software
12   * distributed under the License is distributed on an "AS IS" BASIS,
13   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14   * See the License for the specific language governing permissions and
15   * limitations under the License.
16   */
17  
18  package org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.statement.dml;
19  
20  import lombok.Getter;
21  import lombok.Setter;
22  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.SQLParserTestCase;
23  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.exec.ExpectedExecClause;
24  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.function.ExpectedFunction;
25  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.hint.ExpectedWithTableHintClause;
26  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedInsertColumnsClause;
27  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedInsertValuesClause;
28  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedMultiTableInsertType;
29  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedOnDuplicateKeyColumns;
30  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedMultiTableInsertIntoClause;
31  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedMultiTableConditionalIntoClause;
32  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.insert.ExpectedReturningClause;
33  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.output.ExpectedOutputClause;
34  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.set.ExpectedSetClause;
35  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.table.ExpectedSimpleTable;
36  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.where.ExpectedWhereClause;
37  import org.apache.shardingsphere.test.it.sql.parser.internal.cases.parser.jaxb.segment.impl.with.ExpectedWithClause;
38  
39  import javax.xml.bind.annotation.XmlElement;
40  
41  /**
42   * Insert statement test case.
43   */
44  @Getter
45  @Setter
46  public final class InsertStatementTestCase extends SQLParserTestCase {
47      
48      @XmlElement
49      private ExpectedSimpleTable table;
50      
51      @XmlElement(name = "columns")
52      private ExpectedInsertColumnsClause insertColumnsClause;
53      
54      @XmlElement(name = "values")
55      private ExpectedInsertValuesClause insertValuesClause;
56      
57      @XmlElement(name = "set")
58      private ExpectedSetClause setClause;
59      
60      @XmlElement(name = "select")
61      private SelectStatementTestCase selectTestCase;
62      
63      @XmlElement(name = "on-duplicate-key-columns")
64      private ExpectedOnDuplicateKeyColumns onDuplicateKeyColumns;
65      
66      @XmlElement(name = "with")
67      private ExpectedWithClause withClause;
68      
69      @XmlElement(name = "output")
70      private ExpectedOutputClause outputClause;
71      
72      @XmlElement(name = "multi-table-insert-type")
73      private ExpectedMultiTableInsertType multiTableInsertType;
74      
75      @XmlElement(name = "multi-table-insert-into")
76      private ExpectedMultiTableInsertIntoClause multiTableInsertInto;
77      
78      @XmlElement(name = "multi-table-conditional-into")
79      private ExpectedMultiTableConditionalIntoClause multiTableConditionalInto;
80      
81      @XmlElement(name = "select-subquery")
82      private SelectStatementTestCase selectSubquery;
83      
84      @XmlElement(name = "returning")
85      private ExpectedReturningClause returningClause;
86      
87      @XmlElement(name = "where")
88      private ExpectedWhereClause whereClause;
89      
90      @XmlElement(name = "exec")
91      private ExpectedExecClause execClause;
92      
93      @XmlElement(name = "table-hints")
94      private ExpectedWithTableHintClause expectedWithTableHintClause;
95      
96      @XmlElement(name = "rowset-function")
97      private ExpectedFunction expectedRowSetFunctionClause;
98  }