Class Statements
java.lang.Object
io.github.torand.fastersql.statement.Statements
Provides factory methods for statements and statement builders.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DeleteFromBuilderdelete()Creates a DELETE statement builder.static DeleteStatementdeleteFrom(Table table) Creates a DELETE statement with specified FROM clause.static InsertIntoBuilderinsert()Creates an INSERT statement builder.static <T> InsertBatchIntoBuilder<T> insertBatch(Collection<T> entities) Creates an INSERT (batch) statement builder, for specified entities.static InsertStatementinsertInto(Table table) Creates an INSERT statement with specified INTO clause.static SelectFromBuilderselect(Projection firstProjection, Projection... moreProjections) Creates a SELECT statement builder.static SelectFromBuilderselectDistinct(Projection firstProjection, Projection... moreProjections) Creates a SELECT statement builder with DISTINCT clause added.static TruncateTableBuildertruncate()Creates a TRUNCATE statement builder.static TruncateStatementtruncateTable(Table table) Creates a TRUNCATE statement with specified TABLE clause.static UpdateStatementCreates 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.
-