-
public interface SqlBuilder
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
SqlBuilder.InsertIntoNextStep
-
Method Summary
-
-
-
Method Detail
-
countDistinctColumn
static CountDSL.FromGatherer<SelectModel> countDistinctColumn(BasicColumn column)
Renders as select count(distinct column) from table...- Parameters:
column
- the column to count- Returns:
- the next step in the DSL
-
countColumn
static CountDSL.FromGatherer<SelectModel> countColumn(BasicColumn column)
Renders as select count(column) from table...- Parameters:
column
- the column to count- Returns:
- the next step in the DSL
-
countFrom
static CountDSL<SelectModel> countFrom(SqlTable table)
Renders as select count(*) from table...- Parameters:
table
- the table to count- Returns:
- the next step in the DSL
-
deleteFrom
static DeleteDSL<DeleteModel> deleteFrom(SqlTable table)
-
insert
static <T> InsertDSL.IntoGatherer<T> insert(T record)
-
insert
@Deprecated @SafeVarargs static <T> BatchInsertDSL.IntoGatherer<T> insert(T... records)
Deprecated.UseinsertBatch(Object[])
insteadInsert a Batch of records. The model object is structured to support bulk inserts with JDBC batch support.- Type Parameters:
T
- the type of record to insert- Parameters:
records
- records to insert- Returns:
- the next step in the DSL
-
insert
@Deprecated static <T> BatchInsertDSL.IntoGatherer<T> insert(Collection<T> records)
Deprecated.UseinsertBatch(Collection)
insteadInsert a Batch of records. The model object is structured to support bulk inserts with JDBC batch support.- Type Parameters:
T
- the type of record to insert- Parameters:
records
- records to insert- Returns:
- the next step in the DSL
-
insertBatch
@SafeVarargs static <T> BatchInsertDSL.IntoGatherer<T> insertBatch(T... records)
Insert a Batch of records. The model object is structured to support bulk inserts with JDBC batch support.- Type Parameters:
T
- the type of record to insert- Parameters:
records
- records to insert- Returns:
- the next step in the DSL
-
insertBatch
static <T> BatchInsertDSL.IntoGatherer<T> insertBatch(Collection<T> records)
Insert a Batch of records. The model object is structured to support bulk inserts with JDBC batch support.- Type Parameters:
T
- the type of record to insert- Parameters:
records
- records to insert- Returns:
- the next step in the DSL
-
insertMultiple
@SafeVarargs static <T> MultiRowInsertDSL.IntoGatherer<T> insertMultiple(T... records)
Insert multiple records in a single statement. The model object is structured as a single insert statement with multiple values clauses. This statement is suitable for use with a small number of records. It is not suitable for large bulk inserts as it is possible to exceed the limit of parameter markers in a prepared statement.For large bulk inserts, see
insertBatch(Object[])
- Type Parameters:
T
- the type of record to insert- Parameters:
records
- records to insert- Returns:
- the next step in the DSL
-
insertMultiple
static <T> MultiRowInsertDSL.IntoGatherer<T> insertMultiple(Collection<T> records)
Insert multiple records in a single statement. The model object is structured as a single insert statement with multiple values clauses. This statement is suitable for use with a small number of records. It is not suitable for large bulk inserts as it is possible to exceed the limit of parameter markers in a prepared statement.For large bulk inserts, see
insertBatch(Collection)
- Type Parameters:
T
- the type of record to insert- Parameters:
records
- records to insert- Returns:
- the next step in the DSL
-
insertInto
static SqlBuilder.InsertIntoNextStep insertInto(SqlTable table)
-
select
static QueryExpressionDSL.FromGatherer<SelectModel> select(BasicColumn... selectList)
-
select
static QueryExpressionDSL.FromGatherer<SelectModel> select(Collection<BasicColumn> selectList)
-
selectDistinct
static QueryExpressionDSL.FromGatherer<SelectModel> selectDistinct(BasicColumn... selectList)
-
selectDistinct
static QueryExpressionDSL.FromGatherer<SelectModel> selectDistinct(Collection<BasicColumn> selectList)
-
update
static UpdateDSL<UpdateModel> update(SqlTable table)
-
where
static WhereDSL where()
-
where
static <T> WhereDSL where(BindableColumn<T> column, VisitableCondition<T> condition)
-
where
static <T> WhereDSL where(BindableColumn<T> column, VisitableCondition<T> condition, SqlCriterion<?>... subCriteria)
-
or
static <T> SqlCriterion<T> or(BindableColumn<T> column, VisitableCondition<T> condition)
-
or
static <T> SqlCriterion<T> or(BindableColumn<T> column, VisitableCondition<T> condition, SqlCriterion<?>... subCriteria)
-
and
static <T> SqlCriterion<T> and(BindableColumn<T> column, VisitableCondition<T> condition)
-
and
static <T> SqlCriterion<T> and(BindableColumn<T> column, VisitableCondition<T> condition, SqlCriterion<?>... subCriteria)
-
and
static JoinCriterion and(BasicColumn joinColumn, JoinCondition joinCondition)
-
on
static JoinCriterion on(BasicColumn joinColumn, JoinCondition joinCondition)
-
equalTo
static EqualTo equalTo(BasicColumn column)
-
count
static CountAll count()
-
count
static Count count(BasicColumn column)
-
countDistinct
static CountDistinct countDistinct(BasicColumn column)
-
max
static <T> Max<T> max(BindableColumn<T> column)
-
min
static <T> Min<T> min(BindableColumn<T> column)
-
avg
static <T> Avg<T> avg(BindableColumn<T> column)
-
sum
static <T> Sum<T> sum(BindableColumn<T> column)
-
stringConstant
static StringConstant stringConstant(String constant)
-
add
static <T extends Number> Add<T> add(BindableColumn<T> firstColumn, BasicColumn secondColumn, BasicColumn... subsequentColumns)
-
divide
static <T extends Number> Divide<T> divide(BindableColumn<T> firstColumn, BasicColumn secondColumn, BasicColumn... subsequentColumns)
-
multiply
static <T extends Number> Multiply<T> multiply(BindableColumn<T> firstColumn, BasicColumn secondColumn, BasicColumn... subsequentColumns)
-
subtract
static <T extends Number> Subtract<T> subtract(BindableColumn<T> firstColumn, BasicColumn secondColumn, BasicColumn... subsequentColumns)
-
concatenate
static <T> Concatenate<T> concatenate(BindableColumn<T> firstColumn, BasicColumn secondColumn, BasicColumn... subsequentColumns)
-
applyOperator
static <T> OperatorFunction<T> applyOperator(String operator, BindableColumn<T> firstColumn, BasicColumn secondColumn, BasicColumn... subsequentColumns)
-
lower
static Lower lower(BindableColumn<String> column)
-
substring
static Substring substring(BindableColumn<String> column, int offset, int length)
-
upper
static Upper upper(BindableColumn<String> column)
-
isNull
static <T> IsNull<T> isNull()
-
isNotNull
static <T> IsNotNull<T> isNotNull()
-
isEqualTo
static <T> IsEqualTo<T> isEqualTo(T value)
-
isEqualTo
static <T> IsEqualToWithSubselect<T> isEqualTo(Buildable<SelectModel> selectModelBuilder)
-
isEqualTo
static <T> IsEqualToColumn<T> isEqualTo(BasicColumn column)
-
isEqualToWhenPresent
static <T> IsEqualToWhenPresent<T> isEqualToWhenPresent(T value)
-
isEqualToWhenPresent
static <T> IsEqualToWhenPresent<T> isEqualToWhenPresent(Supplier<T> valueSupplier)
-
isNotEqualTo
static <T> IsNotEqualTo<T> isNotEqualTo(T value)
-
isNotEqualTo
static <T> IsNotEqualTo<T> isNotEqualTo(Supplier<T> valueSupplier)
-
isNotEqualTo
static <T> IsNotEqualToWithSubselect<T> isNotEqualTo(Buildable<SelectModel> selectModelBuilder)
-
isNotEqualTo
static <T> IsNotEqualToColumn<T> isNotEqualTo(BasicColumn column)
-
isNotEqualToWhenPresent
static <T> IsNotEqualToWhenPresent<T> isNotEqualToWhenPresent(T value)
-
isNotEqualToWhenPresent
static <T> IsNotEqualToWhenPresent<T> isNotEqualToWhenPresent(Supplier<T> valueSupplier)
-
isGreaterThan
static <T> IsGreaterThan<T> isGreaterThan(T value)
-
isGreaterThan
static <T> IsGreaterThan<T> isGreaterThan(Supplier<T> valueSupplier)
-
isGreaterThan
static <T> IsGreaterThanWithSubselect<T> isGreaterThan(Buildable<SelectModel> selectModelBuilder)
-
isGreaterThan
static <T> IsGreaterThanColumn<T> isGreaterThan(BasicColumn column)
-
isGreaterThanWhenPresent
static <T> IsGreaterThanWhenPresent<T> isGreaterThanWhenPresent(T value)
-
isGreaterThanWhenPresent
static <T> IsGreaterThanWhenPresent<T> isGreaterThanWhenPresent(Supplier<T> valueSupplier)
-
isGreaterThanOrEqualTo
static <T> IsGreaterThanOrEqualTo<T> isGreaterThanOrEqualTo(T value)
-
isGreaterThanOrEqualTo
static <T> IsGreaterThanOrEqualTo<T> isGreaterThanOrEqualTo(Supplier<T> valueSupplier)
-
isGreaterThanOrEqualTo
static <T> IsGreaterThanOrEqualToWithSubselect<T> isGreaterThanOrEqualTo(Buildable<SelectModel> selectModelBuilder)
-
isGreaterThanOrEqualTo
static <T> IsGreaterThanOrEqualToColumn<T> isGreaterThanOrEqualTo(BasicColumn column)
-
isGreaterThanOrEqualToWhenPresent
static <T> IsGreaterThanOrEqualToWhenPresent<T> isGreaterThanOrEqualToWhenPresent(T value)
-
isGreaterThanOrEqualToWhenPresent
static <T> IsGreaterThanOrEqualToWhenPresent<T> isGreaterThanOrEqualToWhenPresent(Supplier<T> valueSupplier)
-
isLessThan
static <T> IsLessThan<T> isLessThan(T value)
-
isLessThan
static <T> IsLessThan<T> isLessThan(Supplier<T> valueSupplier)
-
isLessThan
static <T> IsLessThanWithSubselect<T> isLessThan(Buildable<SelectModel> selectModelBuilder)
-
isLessThan
static <T> IsLessThanColumn<T> isLessThan(BasicColumn column)
-
isLessThanWhenPresent
static <T> IsLessThanWhenPresent<T> isLessThanWhenPresent(T value)
-
isLessThanWhenPresent
static <T> IsLessThanWhenPresent<T> isLessThanWhenPresent(Supplier<T> valueSupplier)
-
isLessThanOrEqualTo
static <T> IsLessThanOrEqualTo<T> isLessThanOrEqualTo(T value)
-
isLessThanOrEqualTo
static <T> IsLessThanOrEqualTo<T> isLessThanOrEqualTo(Supplier<T> valueSupplier)
-
isLessThanOrEqualTo
static <T> IsLessThanOrEqualToWithSubselect<T> isLessThanOrEqualTo(Buildable<SelectModel> selectModelBuilder)
-
isLessThanOrEqualTo
static <T> IsLessThanOrEqualToColumn<T> isLessThanOrEqualTo(BasicColumn column)
-
isLessThanOrEqualToWhenPresent
static <T> IsLessThanOrEqualToWhenPresent<T> isLessThanOrEqualToWhenPresent(T value)
-
isLessThanOrEqualToWhenPresent
static <T> IsLessThanOrEqualToWhenPresent<T> isLessThanOrEqualToWhenPresent(Supplier<T> valueSupplier)
-
isIn
@SafeVarargs static <T> IsIn<T> isIn(T... values)
-
isIn
static <T> IsIn<T> isIn(Collection<T> values)
-
isIn
static <T> IsInWithSubselect<T> isIn(Buildable<SelectModel> selectModelBuilder)
-
isInWhenPresent
@SafeVarargs static <T> IsInWhenPresent<T> isInWhenPresent(T... values)
-
isInWhenPresent
static <T> IsInWhenPresent<T> isInWhenPresent(Collection<T> values)
-
isNotIn
@SafeVarargs static <T> IsNotIn<T> isNotIn(T... values)
-
isNotIn
static <T> IsNotIn<T> isNotIn(Collection<T> values)
-
isNotIn
static <T> IsNotInWithSubselect<T> isNotIn(Buildable<SelectModel> selectModelBuilder)
-
isNotInWhenPresent
@SafeVarargs static <T> IsNotInWhenPresent<T> isNotInWhenPresent(T... values)
-
isNotInWhenPresent
static <T> IsNotInWhenPresent<T> isNotInWhenPresent(Collection<T> values)
-
isBetween
static <T> IsBetween.Builder<T> isBetween(T value1)
-
isBetween
static <T> IsBetween.Builder<T> isBetween(Supplier<T> valueSupplier1)
-
isBetweenWhenPresent
static <T> IsBetweenWhenPresent.Builder<T> isBetweenWhenPresent(T value1)
-
isBetweenWhenPresent
static <T> IsBetweenWhenPresent.Builder<T> isBetweenWhenPresent(Supplier<T> valueSupplier1)
-
isNotBetween
static <T> IsNotBetween.Builder<T> isNotBetween(T value1)
-
isNotBetween
static <T> IsNotBetween.Builder<T> isNotBetween(Supplier<T> valueSupplier1)
-
isNotBetweenWhenPresent
static <T> IsNotBetweenWhenPresent.Builder<T> isNotBetweenWhenPresent(T value1)
-
isNotBetweenWhenPresent
static <T> IsNotBetweenWhenPresent.Builder<T> isNotBetweenWhenPresent(Supplier<T> valueSupplier1)
-
isLike
static <T> IsLike<T> isLike(T value)
-
isLikeWhenPresent
static <T> IsLikeWhenPresent<T> isLikeWhenPresent(T value)
-
isLikeWhenPresent
static <T> IsLikeWhenPresent<T> isLikeWhenPresent(Supplier<T> valueSupplier)
-
isNotLike
static <T> IsNotLike<T> isNotLike(T value)
-
isNotLikeWhenPresent
static <T> IsNotLikeWhenPresent<T> isNotLikeWhenPresent(T value)
-
isNotLikeWhenPresent
static <T> IsNotLikeWhenPresent<T> isNotLikeWhenPresent(Supplier<T> valueSupplier)
-
isLikeCaseInsensitive
static IsLikeCaseInsensitive isLikeCaseInsensitive(String value)
-
isLikeCaseInsensitive
static IsLikeCaseInsensitive isLikeCaseInsensitive(Supplier<String> valueSupplier)
-
isLikeCaseInsensitiveWhenPresent
static IsLikeCaseInsensitiveWhenPresent isLikeCaseInsensitiveWhenPresent(String value)
-
isLikeCaseInsensitiveWhenPresent
static IsLikeCaseInsensitiveWhenPresent isLikeCaseInsensitiveWhenPresent(Supplier<String> valueSupplier)
-
isNotLikeCaseInsensitive
static IsNotLikeCaseInsensitive isNotLikeCaseInsensitive(String value)
-
isNotLikeCaseInsensitive
static IsNotLikeCaseInsensitive isNotLikeCaseInsensitive(Supplier<String> valueSupplier)
-
isNotLikeCaseInsensitiveWhenPresent
static IsNotLikeCaseInsensitiveWhenPresent isNotLikeCaseInsensitiveWhenPresent(String value)
-
isNotLikeCaseInsensitiveWhenPresent
static IsNotLikeCaseInsensitiveWhenPresent isNotLikeCaseInsensitiveWhenPresent(Supplier<String> valueSupplier)
-
isInCaseInsensitive
static IsInCaseInsensitive isInCaseInsensitive(String... values)
-
isInCaseInsensitive
static IsInCaseInsensitive isInCaseInsensitive(Collection<String> values)
-
isInCaseInsensitiveWhenPresent
static IsInCaseInsensitiveWhenPresent isInCaseInsensitiveWhenPresent(String... values)
-
isInCaseInsensitiveWhenPresent
static IsInCaseInsensitiveWhenPresent isInCaseInsensitiveWhenPresent(Collection<String> values)
-
isNotInCaseInsensitive
static IsNotInCaseInsensitive isNotInCaseInsensitive(String... values)
-
isNotInCaseInsensitive
static IsNotInCaseInsensitive isNotInCaseInsensitive(Collection<String> values)
-
isNotInCaseInsensitiveWhenPresent
static IsNotInCaseInsensitiveWhenPresent isNotInCaseInsensitiveWhenPresent(String... values)
-
isNotInCaseInsensitiveWhenPresent
static IsNotInCaseInsensitiveWhenPresent isNotInCaseInsensitiveWhenPresent(Collection<String> values)
-
sortColumn
static SortSpecification sortColumn(String name)
-
-