public class Query extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Query.Type
The type of the query.
|
| Constructor and Description |
|---|
Query(Query.Type type,
String table)
Creates a new query.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addField(Field... fields)
Adds one or more fields to this query.
|
void |
addJoin(Join... joins)
Adds one or more joins to this query.
|
void |
addOrderField(OrderField... orderFields)
Adds one or more order fields to this query.
|
void |
addValueField(ValueField... valueFields)
Adds one or more value fields to this query.
|
void |
addWhereClause(WhereClause... whereClauses)
Adds one or more WHERE clauses to this query.
|
PreparedStatement |
createStatement(Connection connection)
Creates an SQL statement from the given connection and prepares it for
execution.
|
void |
render(Writer writer)
Renders this query to the given writer.
|
void |
setLimit(Limit limit)
Sets the limit for this query.
|
public Query(Query.Type type, String table)
type - The type of the querytable - The table that is processedpublic void addField(Field... fields)
fields - The fields to addpublic void addValueField(ValueField... valueFields)
valueFields - The value fields to addpublic void addJoin(Join... joins)
joins - The joins to addpublic void addWhereClause(WhereClause... whereClauses)
whereClauses - The WHERE clauses to addpublic void addOrderField(OrderField... orderFields)
orderFields - The order fields to addpublic void setLimit(Limit limit)
limit - The limit for this querypublic PreparedStatement createStatement(Connection connection) throws SQLException
connection - The connection to create a statement fromSQLException - if an SQL error occurspublic void render(Writer writer) throws IOException
writer - The writer to render the query toIOException - if an I/O error occursCopyright © 2026. All rights reserved.