com.j256.ormlite.stmt
Class ColumnArg
java.lang.Object
com.j256.ormlite.stmt.ColumnArg
public class ColumnArg
- extends Object
An argument to a select SQL statement that represents a column in a table. This allows you using the
QueryBuilder
to be able to compare two database fields or using QueryBuilder.join(QueryBuilder)
to be
able to compare fields in different tables.
NOTE: This does not verify that the two fields in question _can_ be compared via SQL. If you try to compare
(for example) a string to a number, a SQL exception will most likely be generated.
- Author:
- graywatson
Constructor Summary |
ColumnArg(String columnName)
For queries where only one table is being addressed. |
ColumnArg(String tableName,
String columnName)
For queries where multiple tables are being addressed. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ColumnArg
public ColumnArg(String columnName)
- For queries where only one table is being addressed. This will output an escaped column-name only into the query.
ColumnArg
public ColumnArg(String tableName,
String columnName)
- For queries where multiple tables are being addressed. This will output an escaped table-name, then a period,
then escaped column-name only into the query.
getTableName
public String getTableName()
getColumnName
public String getColumnName()
This documentation is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.