1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18 package org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr;
19
20 import lombok.Getter;
21 import lombok.RequiredArgsConstructor;
22 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.assignment.InsertValuesSegment;
23
24 import java.util.Collection;
25 import java.util.LinkedList;
26
27
28
29
30 @RequiredArgsConstructor
31 @Getter
32 public final class ValuesExpression implements ExpressionSegment {
33
34 private final int startIndex;
35
36 private final int stopIndex;
37
38 private final Collection<InsertValuesSegment> rowConstructorList = new LinkedList<>();
39
40 @Override
41 public String getText() {
42 StringBuilder result = new StringBuilder();
43 for (InsertValuesSegment each : rowConstructorList) {
44 result.append(each.getValues());
45 }
46 return result.toString();
47 }
48 }