MCPcopy Create free account
hub / github.com/apache/calcite / unparse

Method unparse

core/src/main/java/org/apache/calcite/sql/SqlInsert.java:153–165  ·  view source on GitHub ↗
(SqlWriter writer, int leftPrec, int rightPrec)

Source from the content-addressed store, hash-verified

151 }
152
153 @Override public void unparse(SqlWriter writer, int leftPrec, int rightPrec) {
154 final SqlWriter.Frame frame = writer.startList(SqlWriter.FrameTypeEnum.SELECT);
155 writer.sep(isUpsert() ? "UPSERT INTO" : "INSERT INTO");
156 final int opLeft = getOperator().getLeftPrec();
157 final int opRight = getOperator().getRightPrec();
158 targetTable.unparse(writer, opLeft, opRight);
159 if (columnList != null) {
160 columnList.unparse(writer, opLeft, opRight);
161 }
162 writer.newlineAndIndent();
163 source.unparse(writer, 0, 0);
164 writer.endList(frame);
165 }
166
167 @Override public void validate(SqlValidator validator, SqlValidatorScope scope) {
168 validator.validateInsert(this);

Callers

nothing calls this directly

Calls 8

isUpsertMethod · 0.95
getOperatorMethod · 0.95
getLeftPrecMethod · 0.80
getRightPrecMethod · 0.80
startListMethod · 0.65
sepMethod · 0.65
newlineAndIndentMethod · 0.65
endListMethod · 0.65

Tested by

no test coverage detected