Package org.apache.calcite.sql.util
Class SqlString
java.lang.Object
org.apache.calcite.sql.util.SqlString
String that represents a kocher SQL statement, expression, or fragment.
A SqlString just contains a regular Java string, but the SqlString wrapper indicates that the string has been created carefully guarding against all SQL dialect and injection issues.
The easiest way to do build a SqlString is to use a SqlBuilder
.
-
Constructor Summary
ConstructorDescriptionSqlString
(SqlDialect dialect, String sql) Creates a SqlString.SqlString
(SqlDialect dialect, String sql, @Nullable com.google.common.collect.ImmutableList<Integer> dynamicParameters) Creates a SqlString. -
Method Summary
-
Constructor Details
-
SqlString
Creates a SqlString. -
SqlString
public SqlString(SqlDialect dialect, String sql, @Nullable com.google.common.collect.ImmutableList<Integer> dynamicParameters) Creates a SqlString. The SQL might contain dynamic parameters, dynamicParameters designate the order of the parameters.- Parameters:
sql
- textdynamicParameters
- indices
-
-
Method Details
-
hashCode
public int hashCode() -
equals
-
toString
Returns the SQL string.
-
getSql
Returns the SQL string.- Returns:
- SQL string
-
getDynamicParameters
Returns indices of dynamic parameters.- Returns:
- indices of dynamic parameters
-
getDialect
Returns the dialect.
-