Package com.github.eikecochu.sqlbuilder
Class SQLBuilder
- java.lang.Object
-
- com.github.eikecochu.sqlbuilder.SQLBuilder
-
public final class SQLBuilder extends java.lang.ObjectConvenience class for quick starting a new statement. Contains all valid starting points.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static DeleteDelete(Table table)Start with an DELETE statementstatic DeleteDelete(java.lang.String table)Start with an DELETE statementstatic InsertInsert(Table table)Start with an INSERT statementstatic InsertInsert(java.lang.String table)Start with an INSERT statementstatic QueryQuery(java.lang.String sql)Create a final Querystatic SelectSelect()Start with a SELECT statementstatic SelectSelect(java.lang.String... columns)Start with a SELECT statementstatic UpdateUpdate(Table table)Start with an UPDATE statementstatic UpdateUpdate(java.lang.String table)Start with an UPDATE statementstatic WithWith(java.lang.String name)Start with a WITH statement
-
-
-
Method Detail
-
With
public static With With(java.lang.String name)
Start with a WITH statement- Parameters:
name- The name of the WITH block- Returns:
- The new WITH statement
-
Select
public static Select Select()
Start with a SELECT statement- Returns:
- The new SELECT statement
-
Select
public static Select Select(java.lang.String... columns)
Start with a SELECT statement- Parameters:
columns- The columns to be selected- Returns:
- The new SELECT statement
-
Insert
public static Insert Insert(java.lang.String table)
Start with an INSERT statement- Parameters:
table- The table name of the table to insert into- Returns:
- The new INSERT statement
-
Insert
public static Insert Insert(Table table)
Start with an INSERT statement- Parameters:
table- The Table representation of the table to insert into- Returns:
- The new INSERT statement
-
Update
public static Update Update(java.lang.String table)
Start with an UPDATE statement- Parameters:
table- The table name of the table to update- Returns:
- The new UPDATE statement
-
Update
public static Update Update(Table table)
Start with an UPDATE statement- Parameters:
table- The Table representation of the table to update- Returns:
- The new UPDATE statement
-
Delete
public static Delete Delete(java.lang.String table)
Start with an DELETE statement- Parameters:
table- The table name of the table to delete from- Returns:
- The new DELETE statement
-
Delete
public static Delete Delete(Table table)
Start with an DELETE statement- Parameters:
table- The Table representation of the table to delete from- Returns:
- The new DELETE statement
-
Query
public static Query Query(java.lang.String sql)
Create a final Query- Parameters:
sql- The SQL statement to use- Returns:
- The new Query
-
-