Package com.github.eikecochu.sqlbuilder
Class Select
- java.lang.Object
-
- com.github.eikecochu.sqlbuilder.QueryPartImpl<Select>
-
- com.github.eikecochu.sqlbuilder.Select
-
- All Implemented Interfaces:
BeforeFrom,QueryPart
public class Select extends QueryPartImpl<Select> implements BeforeFrom
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSelect(BeforeSelect parent)Select(java.lang.String... columns)Create a new SELECT statement
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Selectall()Enable ALL selection.Selectcolumn(java.lang.String column)Select a column by nameSelectcolumns(java.lang.String... columns)Select multiple columns by nameSelectdistinct()Enable DISTINCT selection.java.lang.Stringstring(QueryOptions options)Transforms this statement into an SQL string-
Methods inherited from class com.github.eikecochu.sqlbuilder.QueryPartImpl
ext, parent, sql
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
-
-
Constructor Detail
-
Select
public Select(java.lang.String... columns)
Create a new SELECT statement- Parameters:
columns- The column names to select
-
Select
protected Select(BeforeSelect parent)
-
-
Method Detail
-
distinct
public Select distinct()
Enable DISTINCT selection. Disables ALL selection.- Returns:
- This SELECT statement
-
all
public Select all()
Enable ALL selection. Disables DISTINCT selection.- Returns:
- This SELECT statement
-
column
public Select column(java.lang.String column)
Select a column by name- Parameters:
column- The column name of the column to select- Returns:
- This SELECT statement
-
columns
public Select columns(java.lang.String... columns)
Select multiple columns by name- Parameters:
columns- The column names of the columns to select- Returns:
- This SELECT statement
-
string
public java.lang.String string(QueryOptions options)
Description copied from interface:QueryPartTransforms this statement into an SQL string
-
-