Class WingsJooqDaoAliasImpl
-
- All Implemented Interfaces:
-
org.jooq.DAO
public abstract class WingsJooqDaoAliasImpl<T extends Table<R>, WingsAliasTable<T>, R extends UpdatableRecord<R>, P, K> extends DAOImpl<R, P, T>In principle, the database information carried by Record should not be spread, so it's recommended to use Pojo instead of Record outside of Dao. For read method, it always returns Pojo; for write method, it supports both Record and Pojo. For the convenience of coding and to reduce data copying, you can use Record for operation. In batch processing, new Record is always used to improve performance. Note that alias is used in multi-table query, filed/condition and table must have the same name, otherwise there will be a syntax error. I.e., fields that are in different alias from the table.- Since:
2019-10-12
trydofor
-
-
Method Summary
Modifier and Type Method Description DSLContextctx()voidsetDslContext(@Nullable() Supplier<DSLContext> sup)set/remove dsl Supplier to current instance, e.g. voidsetTableExist(@MagicConstant(intValues = {"-1", 0, 1}) int type)-N:Unchecked | 0:Not exist | 1:Exists booleannotTableExist()Use `SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME=? TnewTable(String name)Create a new table with the same table structure. TnewTable(String prefix, String postfix)Based on the current table name, add prefixes, suffixes TgetAlias(String alias)TgetTable()TgetAlias()Get the system default table alias. RnewRecord(Object obj)Create new Record by object mapping. List<R>newRecord(Collection<P> pos)Create a list of records by pojo, usually used in batch. Loader<R>batchLoad(Collection<R> records, boolean ignoreOrReplace)Batch load records at once, and ignore/update on duplicate. ignore - check by `from dual where exists select * where `id` = ?` first, replace - use on duplicate key update statementintinsertInto(P pojo, boolean ignoreOrReplace)Insert Pojo, use mysql `insert ignore` or `replace into`, Note jooq mergeInto must all have values, and replace won't. JournalDiffdiffInsert(P pojo)Insert Pojo with ignoreOrReplace=false, and return the diff. JournalDiffdiffInsert(P pojo, boolean ignoreOrReplace)Insert Pojo and return the diff. Array<int>insertInto(Collection<P> pos, boolean ignoreOrReplace)batchInsert syntax sugar intmergeInto(P pojo, Function<T, Array<Field<out Object>>> fun)intmergeInto(T table, P pojo, Array<Field<out Object>> updateFields)insert one record by insert into DuplicateKey update. Array<int>batchMerge(Collection<R> records, int size, Function<T, Array<Field<out Object>>> fun)Array<int>batchMerge(T table, Collection<R> records, int size, Array<Field<out Object>> updateFields)Select first, then insert or update depending on whether record exists. Array<int>batchMerge(T table, Array<Field<out Object>> keys, Collection<R> records, int size, Array<Field<out Object>> updateFields)Use this method if there are no unique constraints in the db. Array<int>batchMerge(T table, Array<Field<out Object>> keys, BiPredicate<Object, Object> equals, Collection<R> records, int size, Array<Field<out Object>> updateFields)Use this method if there are no unique constraints in the db. Array<int>batchInsert(Collection<R> records, int size, boolean ignoreOrReplace)Batch insert records, use mysql's `insert ignore` or `replace into`. Array<int>batchInsert(Collection<R> records, int size)Batch insert records Array<int>batchStore(Collection<R> records, int size)Batch store (insert/update) record. Array<int>batchUpdate(T table, Array<Field<out Object>> whereFields, Collection<R> records, int size, Array<Field<out Object>> updateFields)Batch update record. Array<int>batchUpdate(Collection<R> records, int size)Batch update record. Array<int>batchExecute(Collection<R> records, int size, BiFunction<DSLContext, Collection<R>, Array<int>> exec)List<P>fetch(Function<T, Condition> fun)List<P>fetch(int limit, Function<T, Condition> fun)List<P>fetch(int offset, int limit, Function<T, Condition> fun)List<P>fetch(BiConsumer<T, SelectWhereOrder> fun)<E> List<E>fetch(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)<E> List<E>fetch(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)List<P>fetch(T table, Condition cond)List<P>fetch(T table, Condition cond, Array<QueryPart> selectsOrders)List<P>fetch(T table, Condition cond, Collection<out QueryPart> selectsOrders)List<P>fetch(T table, int limit, Array<QueryPart> selectsOrders)List<P>fetch(T table, int limit, Collection<out QueryPart> selectsOrders)List<P>fetch(T table, int offset, int limit, Array<QueryPart> selectsOrders)List<P>fetch(T table, int offset, int limit, Collection<out QueryPart> selectsOrders)List<P>fetch(T table, int limit, Condition cond, Array<QueryPart> selectsOrders)List<P>fetch(T table, int limit, Condition cond, Collection<out QueryPart> selectsOrders)List<P>fetch(T table, int offset, int limit, Condition cond, Array<QueryPart> selectsOrders)List<P>fetch(T table, int offset, int limit, Condition cond, Collection<out QueryPart> selectsOrders)List<P>fetch(T table, int offset, int limit, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy)<E> List<E>fetch(Class<E> claz, T table, Array<QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int limit, T table, Array<QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int limit, T table, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int offset, int limit, T table, Array<QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int offset, int limit, T table, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int limit, T table, Condition cond, Array<QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int limit, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int offset, int limit, T table, Condition cond, Array<QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int offset, int limit, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(Class<E> claz, int offset, int limit, T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy)<E> List<E>fetch(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int limit, T table, Array<QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int limit, T table, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Array<QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int limit, T table, Condition cond, Array<QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int limit, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Condition cond, Array<QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> List<E>fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy)PfetchOne(Function<T, Condition> fun)PfetchLimitOne(Function<T, Condition> fun)Optional<P>fetchOptional(Function<T, Condition> fun)Optional<P>fetchLimitOptional(Function<T, Condition> fun)PfetchOne(BiConsumer<T, SelectWhereOrder> fun)PfetchLimitOne(BiConsumer<T, SelectWhereOrder> fun)Optional<P>fetchOptional(BiConsumer<T, SelectWhereOrder> fun)Optional<P>fetchLimitOptional(BiConsumer<T, SelectWhereOrder> fun)<E> EfetchOne(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)<E> EfetchLimitOne(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)<E> Optional<E>fetchOptional(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)<E> Optional<E>fetchLimitOptional(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)<E> EfetchOne(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)<E> EfetchLimitOne(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)<E> Optional<E>fetchOptional(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)<E> Optional<E>fetchLimitOptional(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)PfetchOne(T table, Array<QueryPart> selectsOrders)PfetchOne(T table, Collection<out QueryPart> selectsOrders)PfetchLimitOne(T table, Array<QueryPart> selectsOrders)PfetchLimitOne(T table, Collection<out QueryPart> selectsOrders)Optional<P>fetchOptional(T table, Array<QueryPart> selectsOrders)Optional<P>fetchOptional(T table, Collection<out QueryPart> selectsOrders)Optional<P>fetchLimitOptional(T table, Array<QueryPart> selectsOrders)Optional<P>fetchLimitOptional(T table, Collection<out QueryPart> selectsOrders)PfetchOne(T table, Condition cond, Array<QueryPart> selectsOrders)PfetchOne(T table, Condition cond, Collection<out QueryPart> selectsOrders)PfetchLimitOne(T table, Condition cond, Array<QueryPart> selectsOrders)PfetchLimitOne(T table, Condition cond, Collection<out QueryPart> selectsOrders)Optional<P>fetchOptional(T table, Condition cond, Array<QueryPart> selectsOrders)Optional<P>fetchOptional(T table, Condition cond, Collection<out QueryPart> selectsOrders)Optional<P>fetchLimitOptional(T table, Condition cond, Array<QueryPart> selectsOrders)Optional<P>fetchLimitOptional(T table, Condition cond, Collection<out QueryPart> selectsOrders)PfetchOne(T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy, boolean limit)<E> EfetchOne(Class<E> claz, T table, Array<QueryPart> selectsOrders)<E> EfetchOne(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)<E> EfetchLimitOne(Class<E> claz, T table, Array<QueryPart> selectsOrders)<E> EfetchLimitOne(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)<E> Optional<E>fetchOptional(Class<E> claz, T table, Array<QueryPart> selectsOrders)<E> Optional<E>fetchOptional(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)<E> Optional<E>fetchLimitOptional(Class<E> claz, T table, Array<QueryPart> selectsOrders)<E> Optional<E>fetchLimitOptional(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)<E> EfetchOne(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)<E> EfetchOne(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> EfetchLimitOne(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)<E> EfetchLimitOne(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> Optional<E>fetchOptional(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)<E> Optional<E>fetchOptional(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> Optional<E>fetchLimitOptional(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)<E> Optional<E>fetchLimitOptional(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> EfetchOne(Class<E> claz, T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy, boolean limit)<E> EfetchOne(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)<E> EfetchOne(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)<E> EfetchLimitOne(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)<E> EfetchLimitOne(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)<E> Optional<E>fetchOptional(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)<E> Optional<E>fetchOptional(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)<E> Optional<E>fetchLimitOptional(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)<E> Optional<E>fetchLimitOptional(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)<E> EfetchOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)<E> EfetchOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> EfetchLimitOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)<E> EfetchLimitOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> Optional<E>fetchOptional(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)<E> Optional<E>fetchOptional(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> Optional<E>fetchLimitOptional(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)<E> Optional<E>fetchLimitOptional(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)<E> EfetchOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy, boolean limit)intdelete(Function<T, Condition> fun)intdelete(T table, Condition cond)Delete by condition JournalDiffdiffDelete(T table, Condition cond)Delete a record and get the Diff JournalDiffdiffUpdate(T table, Map<Field<out Object>, out Object> setter, Condition cond)Update a record and get the Diff intupdate(T table, Map<out Object, out Object> setter, Condition cond)intupdate(T table, Map<out Object, out Object> setter, Condition cond, boolean skipNull)Keys can either be of type String, Name, or Field. Values can either be of type or Fieldintupdate(T table, P pojo, Condition cond)intupdate(T table, P pojo, Condition cond, boolean skipNull)Update record by pojo key and value, skip null. intupdate(P pojo, boolean skipNull)Update record by pojo key and value, by PK Array<int>update(Collection<P> pojos, boolean skipNull)Update record by pojo key and value, by PK longcount(Function<T, Condition> fun)longcount(T table, Condition cond)count table by condition, requires table with the same name as condition voidskipPkAndNull(R record, boolean skipNull)-
Methods inherited from class org.jooq.impl.DAOImpl
configuration, count, delete, deleteById, dialect, exists, existsById, family, fetch, fetchOne, fetchOptional, fetchRange, findAll, findById, findOptionalById, getTable, getType, insert, mapper, merge, setConfiguration, settings, update -
Methods inherited from class org.jooq.DAO
getId -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
ctx
@NotNull() DSLContext ctx()
-
setDslContext
void setDslContext(@Nullable() Supplier<DSLContext> sup)
set/remove dsl Supplier to current instance, e.g. mocking DSL. if Supplier or its result is null, return the original Dsl.
- Parameters:
sup- to supply Dsl.
-
setTableExist
void setTableExist(@MagicConstant(intValues = {"-1", 0, 1}) int type)
-N:Unchecked | 0:Not exist | 1:Exists
- Parameters:
type- -1|0|1
-
notTableExist
boolean notTableExist()
Use `SELECT 1 FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME=? AND TABLE_SCHEMA=SCHEMA()` to check the table existence in the current database.
- Returns:
Whether not exist
-
newTable
@NotNull() T newTable(String name)
Create a new table with the same table structure. Used in sharding table, shadow table scenario
- Parameters:
name- new table name- Returns:
new table
-
newTable
@NotNull() T newTable(String prefix, String postfix)
Based on the current table name, add prefixes, suffixes
-
newRecord
@NotNull() R newRecord(Object obj)
Create new Record by object mapping.
- Parameters:
obj- object with some mapping rules.- Returns:
record
-
newRecord
@NotNull() List<R> newRecord(Collection<P> pos)
Create a list of records by pojo, usually used in batch.
- Parameters:
pos- pojos- Returns:
list of record
-
batchLoad
@NotNull() Loader<R> batchLoad(Collection<R> records, boolean ignoreOrReplace)
Batch load records at once, and ignore/update on duplicate. ignore - check by `from dual where exists select * where `id` = ?` first, replace - use on duplicate key update statement- Parameters:
records- all recordignoreOrReplace- ignore or update on duplicate- Returns:
result, should use ModifyAssert to check
-
insertInto
int insertInto(P pojo, boolean ignoreOrReplace)
Insert Pojo, use mysql `insert ignore` or `replace into`, Note jooq mergeInto must all have values, and replace won't.
- Parameters:
pojo- pojoignoreOrReplace- ignore or update on duplicate- Returns:
result, should use ModifyAssert to check
-
diffInsert
@NotNull() JournalDiff diffInsert(P pojo)
Insert Pojo with ignoreOrReplace=false, and return the diff.
-
diffInsert
@NotNull() JournalDiff diffInsert(P pojo, boolean ignoreOrReplace)
Insert Pojo and return the diff.
-
insertInto
Array<int> insertInto(Collection<P> pos, boolean ignoreOrReplace)
batchInsert syntax sugar
- Parameters:
pos- pojo recordsignoreOrReplace- ignore or replace if DuplicateKey- Returns:
array of affected records, can use ModifyAssert to check
-
mergeInto
int mergeInto(T table, P pojo, Array<Field<out Object>> updateFields)
insert one record by insert into DuplicateKey update.
- Parameters:
table- table with the same name as updateFieldspojo- pojo recordupdateFields- fields to update if Duplicate Key, should not use table alias- Returns:
affected records, can use ModifyAssert to check
-
batchMerge
Array<int> batchMerge(Collection<R> records, int size, Function<T, Array<Field<out Object>>> fun)
-
batchMerge
Array<int> batchMerge(T table, Collection<R> records, int size, Array<Field<out Object>> updateFields)
Select first, then insert or update depending on whether record exists.
- Parameters:
table- table with the same name as updateFieldsrecords- collection of recordsize- batch size, <=0 mean no batchingupdateFields- fields to update if Duplicate Key, should not use table alias- Returns:
array of affected records, can use ModifyAssert to check
-
batchMerge
Array<int> batchMerge(T table, Array<Field<out Object>> keys, Collection<R> records, int size, Array<Field<out Object>> updateFields)
Use this method if there are no unique constraints in the db. (1) batch SELECT based on KEYS first, (2) INSERT or UPDATE based on the records. String comparison ignores case
- Parameters:
table- table with the same name as updateFieldskeys- keys of Duplicate Keyrecords- collection of recordsize- batch size, <=0 mean no batchingupdateFields- fields to update if Duplicate Key, should not use table alias- Returns:
array of affected records, can use ModifyAssert to check
-
batchMerge
Array<int> batchMerge(T table, Array<Field<out Object>> keys, BiPredicate<Object, Object> equals, Collection<R> records, int size, Array<Field<out Object>> updateFields)
Use this method if there are no unique constraints in the db. (1) batch SELECT based on KEYS first, (2) INSERT or UPDATE based on the records.
- Parameters:
table- table with the same name as updateFieldskeys- keys of Duplicate Keyequals- predicate of equalsrecords- collection of recordsize- batch size, <=0 mean no batchingupdateFields- fields to update if Duplicate Key, should not use table alias- Returns:
array of affected records, can use ModifyAssert to check
-
batchInsert
Array<int> batchInsert(Collection<R> records, int size, boolean ignoreOrReplace)
Batch insert records, use mysql's `insert ignore` or `replace into`. Note that jooq mergeInto is not perfect, requires both to have values, while `replace` does not.
- Parameters:
records- collection of recordsize- batch size, <=0 mean no batchingignoreOrReplace- ignore or replace if Duplicate Key- Returns:
array of affected records, can use ModifyAssert to check
-
batchInsert
Array<int> batchInsert(Collection<R> records, int size)
Batch insert records
- Parameters:
records- collection of recordsize- batch size, <=0 mean no batching- Returns:
array of affected records, can use ModifyAssert to check
-
batchStore
Array<int> batchStore(Collection<R> records, int size)
Batch store (insert/update) record.
- Parameters:
records- collection of recordsize- batch size, <=0 mean no batching- Returns:
array of affected records, can use ModifyAssert to check
-
batchUpdate
Array<int> batchUpdate(T table, Array<Field<out Object>> whereFields, Collection<R> records, int size, Array<Field<out Object>> updateFields)
Batch update record.
- Parameters:
table- table with the same name as updateFieldswhereFields- where condition fieldsrecords- collection of recordsize- batch size, <=0 mean no batchingupdateFields- fields to update- Returns:
array of affected records, can use ModifyAssert to check
-
batchUpdate
Array<int> batchUpdate(Collection<R> records, int size)
Batch update record.
- Parameters:
records- collection of recordsize- batch size, <=0 mean no batching- Returns:
array of affected records, can use ModifyAssert to check
-
batchExecute
Array<int> batchExecute(Collection<R> records, int size, BiFunction<DSLContext, Collection<R>, Array<int>> exec)
-
fetch
@NotNull() List<P> fetch(BiConsumer<T, SelectWhereOrder> fun)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)
-
fetch
@NotNull() List<P> fetch(T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() List<P> fetch(T table, int limit, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() List<P> fetch(T table, int offset, int limit, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() List<P> fetch(T table, int limit, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() List<P> fetch(T table, int offset, int limit, Condition cond, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() List<P> fetch(T table, int offset, int limit, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() List<P> fetch(T table, int offset, int limit, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int limit, T table, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int limit, T table, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int offset, int limit, T table, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int offset, int limit, T table, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int limit, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int limit, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int offset, int limit, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int offset, int limit, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(Class<E> claz, int offset, int limit, T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int limit, T table, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int limit, T table, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int limit, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int limit, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetch
@NotNull() <E> List<E> fetch(RecordMapper<in Record, E> mapper, int offset, int limit, T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy)
-
fetchLimitOne
@Nullable() P fetchLimitOne(Function<T, Condition> fun)
-
fetchOptional
@NotNull() Optional<P> fetchOptional(Function<T, Condition> fun)
-
fetchLimitOptional
@NotNull() Optional<P> fetchLimitOptional(Function<T, Condition> fun)
-
fetchOne
@Nullable() P fetchOne(BiConsumer<T, SelectWhereOrder> fun)
-
fetchLimitOne
@Nullable() P fetchLimitOne(BiConsumer<T, SelectWhereOrder> fun)
-
fetchOptional
@NotNull() Optional<P> fetchOptional(BiConsumer<T, SelectWhereOrder> fun)
-
fetchLimitOptional
@NotNull() Optional<P> fetchLimitOptional(BiConsumer<T, SelectWhereOrder> fun)
-
fetchOne
@Nullable() <E> E fetchOne(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(Class<E> claz, BiConsumer<T, SelectWhereOrder> fun)
-
fetchOne
@Nullable() <E> E fetchOne(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(RecordMapper<in Record, E> mapper, BiConsumer<T, SelectWhereOrder> fun)
-
fetchOne
@Nullable() P fetchOne(T table, Collection<out QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() P fetchLimitOne(T table, Array<QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() P fetchLimitOne(T table, Collection<out QueryPart> selectsOrders)
-
fetchOptional
@NotNull() Optional<P> fetchOptional(T table, Array<QueryPart> selectsOrders)
-
fetchOptional
@NotNull() Optional<P> fetchOptional(T table, Collection<out QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() Optional<P> fetchLimitOptional(T table, Array<QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() Optional<P> fetchLimitOptional(T table, Collection<out QueryPart> selectsOrders)
-
fetchOne
P fetchOne(T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() P fetchLimitOne(T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() P fetchLimitOne(T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchOptional
@NotNull() Optional<P> fetchOptional(T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchOptional
@NotNull() Optional<P> fetchOptional(T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() Optional<P> fetchLimitOptional(T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() Optional<P> fetchLimitOptional(T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchOne
@Nullable() P fetchOne(T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy, boolean limit)
-
fetchOne
@Nullable() <E> E fetchOne(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(Class<E> claz, T table, Array<QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(Class<E> claz, T table, Array<QueryPart> selectsOrders)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(Class<E> claz, T table, Array<QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(Class<E> claz, T table, Collection<out QueryPart> selectsOrders)
-
fetchOne
<E> E fetchOne(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(Class<E> claz, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(Class<E> claz, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchOne
@Nullable() <E> E fetchOne(Class<E> claz, T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy, boolean limit)
-
fetchOne
@Nullable() <E> E fetchOne(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)
-
fetchOne
@Nullable() <E> E fetchOne(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(RecordMapper<in Record, E> mapper, T table, Array<QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(RecordMapper<in Record, E> mapper, T table, Collection<out QueryPart> selectsOrders)
-
fetchOne
<E> E fetchOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchOne
<E> E fetchOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchLimitOne
@Nullable() <E> E fetchLimitOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchOptional
@NotNull() <E> Optional<E> fetchOptional(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(RecordMapper<in Record, E> mapper, T table, Condition cond, Array<QueryPart> selectsOrders)
-
fetchLimitOptional
@NotNull() <E> Optional<E> fetchLimitOptional(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out QueryPart> selectsOrders)
-
fetchOne
@Nullable() <E> E fetchOne(RecordMapper<in Record, E> mapper, T table, Condition cond, Collection<out SelectFieldOrAsterisk> selects, Collection<out OrderField<out Object>> orderBy, boolean limit)
-
delete
int delete(T table, Condition cond)
Delete by condition
- Parameters:
table- the tablecond- where condition- Returns:
affected records
-
diffDelete
@NotNull() JournalDiff diffDelete(T table, Condition cond)
Delete a record and get the Diff
-
diffUpdate
@NotNull() JournalDiff diffUpdate(T table, Map<Field<out Object>, out Object> setter, Condition cond)
Update a record and get the Diff
-
update
int update(T table, Map<out Object, out Object> setter, Condition cond, boolean skipNull)
Keys can either be of type String, Name, or Field. Values can either be of type or Field- Parameters:
table- table with the same name as condition/settersetter- update key and valuecond- conditionskipNull- whether skip `null` values, true requires map to be editable.- Returns:
affected records
-
update
int update(T table, P pojo, Condition cond, boolean skipNull)
Update record by pojo key and value, skip null.
- Parameters:
table- table with the same name as conditionpojo- pojocond- condition- Returns:
affected records
-
update
int update(P pojo, boolean skipNull)
Update record by pojo key and value, by PK
- Parameters:
pojo- pojoskipNull- whether skip `null` values- Returns:
affected records
-
update
Array<int> update(Collection<P> pojos, boolean skipNull)
Update record by pojo key and value, by PK
- Parameters:
pojos- pojosskipNull- whether skip `null` values- Returns:
array of affected records
-
count
long count(T table, Condition cond)
count table by condition, requires table with the same name as condition
-
skipPkAndNull
void skipPkAndNull(R record, boolean skipNull)
-
-
-
-