Class Statements
java.lang.Object
io.github.torand.fastersql.statement.Statements
Provides factory methods for statements and statement builders.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeleteFromBuilder
delete()
Creates a DELETE statement builder.static DeleteStatement
deleteFrom
(Table<?> table) Creates a DELETE statement with specified FROM clause.static InsertIntoBuilder
insert()
Creates an INSERT statement builder.static <T> InsertBatchIntoBuilder
<T> insertBatch
(Collection<T> entities) Creates an INSERT (batch) statement builder, for specified entities.static InsertStatement
insertInto
(Table<?> table) Creates an INSERT statement with specified INTO clause.static SelectFromBuilder
select
(Projection firstProjection, Projection... moreProjections) Creates a SELECT statement builder.static SelectFromBuilder
selectDistinct
(Projection firstProjection, Projection... moreProjections) Creates a SELECT statement builder with DISTINCT clause added.static TruncateTableBuilder
truncate()
Creates a TRUNCATE statement builder.static TruncateStatement
truncateTable
(Table<?> table) Creates a TRUNCATE statement with specified TABLE clause.static UpdateStatement
Creates an UPDATE statement for specified table.
-
Method Details
-
select
Creates a SELECT statement builder.- Parameters:
firstProjection
- the first projection.moreProjections
- the other projections, if any.- Returns:
- the statement builder.
-
selectDistinct
public static SelectFromBuilder selectDistinct(Projection firstProjection, Projection... moreProjections) Creates a SELECT statement builder with DISTINCT clause added.- Parameters:
firstProjection
- the first projection.moreProjections
- the other projections, if any.- Returns:
- the statement builder.
-
update
Creates an UPDATE statement for specified table.- Parameters:
table
- the table- Returns:
- the statement.
-
delete
Creates a DELETE statement builder.- Returns:
- the statement builder.
-
deleteFrom
Creates a DELETE statement with specified FROM clause.- Parameters:
table
- the FROM clause- Returns:
- the statement.
-
truncate
Creates a TRUNCATE statement builder.- Returns:
- the statement builder.
-
truncateTable
Creates a TRUNCATE statement with specified TABLE clause.- Parameters:
table
- the TABLE clause.- Returns:
- the statement.
-
insert
Creates an INSERT statement builder.- Returns:
- the statement builder.
-
insertInto
Creates an INSERT statement with specified INTO clause.- Parameters:
table
- the INTO clause.- Returns:
- the statement builder.
-
insertBatch
Creates an INSERT (batch) statement builder, for specified entities.- Type Parameters:
T
- the entity type.- Parameters:
entities
- the entities- Returns:
- the statement builder.
-