Class Query
java.lang.Object
io.github.projectunified.craftdatabase.client.sql.helper.Query
A SQL statement with its ordered parameter values
-
Method Summary
Modifier and TypeMethodDescriptiongetSql()Get the SQL statementObject[]Get the values for the?placeholders, in order, empty if only the statement is builttoBatchBuilder(SqlClient<?> client) Convert this query to a batch builder, the values of this query, if any, are added as the first entrytoBatchBuilder(Connection connection) Convert this query to a batch builder, the values of this query, if any, are added as the first entrytoBatchBuilderUnsafe(SqlClient<?> client) Convert this query to a batch builder, the values of this query, if any, are added as the first entrytoStatementBuilder(SqlClient<?> client) Convert this query to a statement buildertoStatementBuilder(Connection connection) Convert this query to a statement buildertoStatementBuilderUnsafe(SqlClient<?> client) Convert this query to a statement buildertoString()
-
Method Details
-
getSql
Get the SQL statement- Returns:
- the SQL statement
-
getValues
Get the values for the?placeholders, in order, empty if only the statement is built- Returns:
- the values
-
toStatementBuilder
Convert this query to a statement builder- Parameters:
connection- the connection- Returns:
- the statement builder
-
toStatementBuilder
Convert this query to a statement builder- Parameters:
client- the client- Returns:
- the statement builder
- Throws:
SQLException- if there is an SQL error
-
toStatementBuilderUnsafe
Convert this query to a statement builder- Parameters:
client- the client- Returns:
- the statement builder
- Throws:
IllegalStateException- if there is an SQL error
-
toBatchBuilder
Convert this query to a batch builder, the values of this query, if any, are added as the first entry- Parameters:
connection- the connection- Returns:
- the batch builder
-
toBatchBuilder
Convert this query to a batch builder, the values of this query, if any, are added as the first entry- Parameters:
client- the client- Returns:
- the batch builder
- Throws:
SQLException- if there is an SQL error
-
toBatchBuilderUnsafe
Convert this query to a batch builder, the values of this query, if any, are added as the first entry- Parameters:
client- the client- Returns:
- the batch builder
- Throws:
IllegalStateException- if there is an SQL error
-
toString
-