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.dialect.segment.oracle.xml;
19
20 import lombok.Getter;
21 import lombok.Setter;
22 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ExpressionSegment;
23 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.ComplexExpressionSegment;
24 import org.apache.shardingsphere.sql.parser.sql.common.segment.dml.item.ProjectionSegment;
25
26
27
28
29 @Getter
30 @Setter
31 public final class XmlPiFunctionSegment implements ComplexExpressionSegment, ProjectionSegment {
32
33 private final int startIndex;
34
35 private final int stopIndex;
36
37 private final String functionName;
38
39 private final String identifier;
40
41 private final ExpressionSegment evalNameValueExpr;
42
43 private final ExpressionSegment valueExpr;
44
45 private final String text;
46
47 public XmlPiFunctionSegment(final int startIndex, final int stopIndex, final String functionName, final String identifier, final ExpressionSegment valueExpr, final String text) {
48 this.startIndex = startIndex;
49 this.stopIndex = stopIndex;
50 this.functionName = functionName;
51 evalNameValueExpr = null;
52 this.identifier = identifier;
53 this.valueExpr = valueExpr;
54 this.text = text;
55 }
56
57 public XmlPiFunctionSegment(final int startIndex, final int stopIndex, final String functionName, final ExpressionSegment evalNameValueExpr, final ExpressionSegment valueExpr, final String text) {
58 this.startIndex = startIndex;
59 this.stopIndex = stopIndex;
60 this.functionName = functionName;
61 identifier = null;
62 this.evalNameValueExpr = evalNameValueExpr;
63 this.valueExpr = valueExpr;
64 this.text = text;
65 }
66
67 @Override
68 public String getColumnLabel() {
69 return text;
70 }
71 }