public class SqlString extends Object
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 and Description |
|---|
SqlString(SqlDialect dialect,
String sql)
Creates a SqlString.
|
SqlString(SqlDialect dialect,
String sql,
@Nullable com.google.common.collect.ImmutableList<Integer> dynamicParameters)
Creates a SqlString.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(@Nullable Object obj) |
SqlDialect |
getDialect()
Returns the dialect.
|
@Nullable com.google.common.collect.ImmutableList<Integer> |
getDynamicParameters()
Returns indices of dynamic parameters.
|
String |
getSql()
Returns the SQL string.
|
int |
hashCode() |
String |
toString() |
public SqlString(SqlDialect dialect, String sql)
public SqlString(SqlDialect dialect, String sql, @Nullable com.google.common.collect.ImmutableList<Integer> dynamicParameters)
sql - textdynamicParameters - indicespublic String toString()
Returns the SQL string.
public String getSql()
@Pure public @Nullable com.google.common.collect.ImmutableList<Integer> getDynamicParameters()
public SqlDialect getDialect()
Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.