public class CustomSql extends SqlObject
Example:
String selectQuery = (new SelectQuery()) .addCustomColumns(new CustomSql("foo"), new CustomSql("baz"), new CustomSql("buzz")) .addCustomJoin(SelectQuery.JoinType.INNER_JOIN, new CustomSql("table1"), new CustomSql("table2"), BinaryCondition.equalTo( new CustomSql("table1.id"), new CustomSql("table2.id"))) .addCustomOrderings(new CustomSql("foo")) .validate().toString(); // Output: SELECT foo,baz,buzz FROM table1 INNER JOIN table2 ON (table1.id = table2.id) ORDER BY foo
dbspec database model
ALL_SYMBOL, NULL_VALUE, QUESTION_MARK
Modifier and Type | Method and Description |
---|---|
void |
appendTo(AppendableExt app)
Appends this object to the given AppendableExt.
|
protected void |
collectSchemaObjects(ValidationContext vContext)
Used during Query.validate() calls to collect the dbschema objects
referenced in a query.
|
collectSchemaObjects, doValidate, toString
toString, toString
public CustomSql(Object obj)
protected void collectSchemaObjects(ValidationContext vContext)
SqlObject
collectSchemaObjects
in class SqlObject
vContext
- handle to the current validation contextpublic void appendTo(AppendableExt app) throws IOException
Appendee
appendTo
in interface Appendee
appendTo
in class AppendeeObject
app
- the AppendableExt to which this class should append itselfIOException
- if the append failsCopyright © 2006–2021 OpenHMS. All rights reserved.