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

Method toSqlString

core/src/main/java/org/apache/calcite/sql/SqlNode.java:154–159  ·  view source on GitHub ↗

Returns the SQL text of the tree of which this SqlNode is the root. Typical return values are: 'It''s a bird!' NULL 12.3 DATE '1969-04-29' @param transform Transform that sets desired writer configuration

(UnaryOperator<SqlWriterConfig> transform)

Source from the content-addressed store, hash-verified

152 * @param transform Transform that sets desired writer configuration
153 */
154 public SqlString toSqlString(UnaryOperator<SqlWriterConfig> transform) {
155 final SqlWriterConfig config = transform.apply(SqlPrettyWriter.config());
156 SqlPrettyWriter writer = new SqlPrettyWriter(config);
157 unparse(writer, 0, 0);
158 return writer.toSqlString();
159 }
160
161 /**
162 * Returns the SQL text of the tree of which this <code>SqlNode</code> is

Callers 15

testHiveDialectMethod · 0.95
rewriteMethod · 0.95
toSqlMethod · 0.95
unparseSqlSetOptionMethod · 0.95
toStringMethod · 0.95
writeMethod · 0.95
toSqlMethod · 0.95
executeMethod · 0.95
checkExpMethod · 0.95
checkListMethod · 0.95
checkMethod · 0.95

Calls 10

configMethod · 0.95
unparseMethod · 0.95
toSqlStringMethod · 0.95
firstMethod · 0.95
withIndentationMethod · 0.80
applyMethod · 0.65
withDialectMethod · 0.65

Tested by 10

testHiveDialectMethod · 0.76
rewriteMethod · 0.76
toSqlMethod · 0.76
checkExpMethod · 0.76
checkListMethod · 0.76
checkMethod · 0.76
checkExpMethod · 0.76
executeMethod · 0.76
checkSqlConversionMethod · 0.76