Rob Bygrave
e71be4e1b1
Deprecate order() methods on Query, ExpressionList - migrate to orderBy()
...
Unfortunately we have order() and orderBy() methods which do the
same thing. I have decided to deprecate the order() ones in
favour of the orderBy() methods so that ultimately we will end
up with less methods and I think orderBy() is the correct choice.
Apologies for the migration pain here.
2023-06-01 21:21:39 +12:00
Rob Bygrave
bac7cd1ee7
Remove deprecated Query Bean fetchAll() - migrate to fetch()
...
```java
/**
* Deprecated in favor of fetch().
*/
@Deprecated
public final R fetchAll() {
return fetch();
}
```
2023-06-01 20:48:13 +12:00
Rob Bygrave
430926c5a9
Remove deprecated Query setLoadBeanCache() - migrate to setBeanCacheMode()
...
Typically migrate to `.setBeanCacheMode(CacheMode.PUT)` or `.setBeanCacheMode(CacheMode.OFF)`
```java
/**
* Deprecated - migrate to use setBeanCacheMode(CacheMode.PUT) or other CacheMode.
* <p>
* When set to true all the beans from this query are loaded into the bean cache.
*/
@Deprecated
Query<T> setLoadBeanCache(boolean loadBeanCache);
```
2023-06-01 20:44:31 +12:00
Rob Bygrave
79fd689e9a
Add support for raw SQL SubQuery expressions IN,EQ,NE,GT,GE,LT,LE,EXISTS,Not IN, Not EXISTS
...
For these expressions the SQL SubQuery is not parsed by ebean and
just used as is.
2023-03-24 22:38:52 +13:00
Rob Bygrave
4ec46e3008
[QueryBeans] Refactor splitting TQAssocBean into TQAssoc & TQAssocBean
...
- Requires ebean-agent to be up-to-date (13.13.2 or greater)
- Split TQAssocBean into 2, one for embeddable beans and the other for the reset
- The eq(), in() etc expressions go to TQAssoc
- Add fetch() methods to TQAssocBean
- No longer generate the fetch() methods as we now have them on TQAssocBean
2023-02-27 17:46:11 +13:00
Rob Bygrave
25416a3cda
For querybean associated beans, add missing eqIfPresent() + in() + notIn() + expressions
2023-02-26 19:24:00 +13:00
rob
0b615a79cc
Add _ifPresent() expressions for GT, GE, LT, LE (follow up from #2768 )
2023-02-22 14:04:26 +13:00
Rob Bygrave
4a0f8931a0
Add parameter type for Query.Property with DefaultUpdateQuery and TQRootBean
2022-11-09 23:41:42 +13:00
Rob Bygrave
3c8c52ca7f
Simplify to use single type (not use another different type for Query.Property)
2022-11-09 23:30:51 +13:00
Rob Bygrave
d29ef8934d
Add more operators to StdOperators
...
- stricter use of UpdateQuery.set()
- Numbers just use their own type - PBaseNumber
- PEnum just uses its own type
- Expr.factory() to expose factory
2022-11-09 17:47:16 +13:00
Rob Bygrave
97bbce321d
Make Query.Property parameterised with <BT> "Base Type" as Number, String, Temporal, Boolean or Object
...
These types then determine which functions are valid for the types. So:
- Number functions
- String/varchar functions
- Temporal Date, DateTime, Time functions
- Boolean functions
- Object being everything else
2022-11-08 21:57:36 +13:00
Rob Bygrave
3da924b943
Add Query.Property.of(), Move StdFunctions to ebean-api
2022-11-07 12:57:39 +13:00
Rob Bygrave
8565f5f807
Rename TQColumn -> Query.Property and move to api + use with UpdateQuery.set()
...
- Refactor rename TQColumn to Query.Property and move to ebean-api module
- Add UpdateQuery.set() methods to use Query.Property (as per #2849 )
2022-11-03 17:33:11 +13:00
Rob Bygrave
96e79248dc
Add StdFunctions, StdExpressions, TQColumn marker interface
2022-11-03 11:16:30 +13:00
Rob Bygrave
0a61852711
#2847 - Add support for Sub-query EQ, NE, LT, LE, GT, GE expressions
2022-11-03 00:22:48 +13:00
Rob Bygrave
dd0ed8ea76
#2873 - Query Beans: Support more TQProperty's as target value for inRangeWith()
2022-11-02 17:35:00 +13:00
Rob Bygrave
600aa10453
#2877 - Query Beans: Add lt, le, gt, ge <other property> e.g. whenRegistered.gt(QCustomer.Alias.whenActivated)
2022-11-02 16:32:49 +13:00
Rob Bygrave
f6b87ed0b4
#2876 & #2875 - Query Beans subquery exists/notExists + eq(other property), ne(other property)
2022-11-02 16:14:44 +13:00
Rob Bygrave
674150dc75
Minor dependency bump for jackson, assertj-core, joda-time, h2database
2022-09-02 10:50:23 +12:00
Rob Bygrave
8632aef268
Add missing final modifier on methods of query bean types
2022-08-18 16:49:39 +12:00
Rob Bygrave
595c057964
#2784 - Fix @Return javadoc for TQRootBean.findSingleAttribute()
2022-08-16 17:03:07 +12:00
Rob Bygrave
d703709f14
#2784 - Correct documentation for TQRootBean.findSingleAttribute with @Nullable
2022-08-12 15:50:17 +12:00
Rob Bygrave
7474430a63
#2768 - ENH: Add eqIfPresent() - a helper expression for fluid style when some EQ are optional
2022-08-01 16:36:09 +12:00
Snōwball and GitHub
52759e0510
Add notIn(Query) to query beans
...
Missing from query beans, but is available in the `ExpressionList` class.
2022-07-20 14:54:30 +02:00
Rob Bygrave
9252e72581
#2748 - Fix such that .setLoadBeanCache(false) ... sets CacheMode.OFF
2022-07-20 07:45:20 +12:00
Rob Bygrave
23d52ca192
#2731 - Change ebean-querybean annotations from Retention RUNTIME to CLASS
2022-07-04 16:58:06 +12:00
Rob Bygrave
48d7e79b16
Remove deprecated findLargeStream(), migrate to findStream()
...
findLargeStream() became no longer become needed due to improvements in the persistence context. Migrate to just use findStream() instead.
2022-04-06 18:17:25 +12:00
Rob Bygrave
24d8f38b1d
#2374 - Bump to Java 11 and module-path
2022-03-31 08:42:14 +13:00
Rob Bygrave
b3ee982b64
Use @NonNullApi to explicitly reflect non-null return types and params by default
2021-10-20 15:45:20 +13:00
Rob Bygrave
a445557ec3
#2422 - Remove extraneous jsr 305 @Nonnull
2021-10-19 17:59:25 +13:00
Rob Bygrave
8ee67410f9
#2387 - Additionally support setIdIn(Collection<?> ids)
...
Add overloaded method taking Collection of id values.
2021-09-23 15:32:40 +12:00
Ryszard Trojnacki
847ce5db88
Added PByteArray query bean type for byte[] column type.
2021-08-31 11:34:35 +02:00
rbygrave
9161e17476
#2318 - Refactor internals - final classes in querybean package
2021-08-17 21:39:57 +12:00
rbygrave
1642833fdb
Improve javadoc on TQRootBean and generated javadoc on query bean forFetchGroup() method
2021-07-22 18:56:02 +12:00
Robin Bygrave
9d54b264ad
#2219 - Compile error with ZonedDateTime and query beans - type argument java.time.ZonedDateTime is not within bounds of type-variable D
2021-04-19 17:04:57 +12:00
Vladimir Konkov
6d8a1c9398
Explicit locking method withLock() is unaccessible on query beans
2021-04-05 21:45:48 +03:00
Tobias
f9b55a06b8
Add bitwise operators to query beans
2021-03-31 12:53:06 +02:00
rob bygrave
5cb9b9b237
#2208 - When using fetchCache() with a single id / findOne ... doesn't hit L2 cache
...
Plus #2207 ENH: Query beans add support for nested FetchGroup
2021-03-29 23:21:07 +13:00
Rob Bygrave
2bb5a85bd6
ENH: Add Query findEach() with batch consumer
...
This is a variation of findEach() that makes it easy to have a batch consumer processing a large result in batches. For example, process in batches of 50 beans.
Note that the last batch consumed/processed will often have less than the batch size.
2021-03-10 00:18:35 +13:00
Ben Kempe
af4f70e3a7
add in(subQuery) support for query beans
2021-03-01 13:21:05 +01:00
robin
1a26cd717f
#2182 - Tidy javadoc - this may mean JDK 15 is required to generate javadoc
2021-03-01 23:40:06 +13:00
Rob Bygrave and GitHub
98a89156bf
Refactor query internals to reduce property parsing for partial select and fetch ( #2167 )
...
* Update test only - update TestBasicClobNoVer to use DB and AssertJ
* Refactor OrmQueryProperties internals to reduce raw property parsing
- Remove String properties
- Reduces parsing of properties via fetchProperties() selectProperties() methods
* No effective change - tidy pom.xml for ebean-querybean
* Refactor query internals adding fetchProperties() selectProperties()
- Adds SpiQueryFetch
- Used by query beans with Set<String> properties passed (effectively skipping any parsing)
2021-02-16 17:51:47 +13:00
rob bygrave
4c16b85e85
#2166 - Remove deprecated forUpdate(lockType) methods - migrate to withLock(lockType, waitType)
2021-02-14 10:52:18 +13:00
Robin Bygrave
2672dff512
#2155 - QueryBeans: Change to use own @Generated with retention RUNTIME
2021-02-10 15:28:55 +13:00
Rob Bygrave and GitHub
c66875449b
Add Query.withLock(LockType) and withLock(LockType, LockWait) ( #2116 )
...
Add Query.withLock(LockType) and withLock(LockType, LockWait)
2020-12-01 21:31:53 +13:00
rob bygrave
5c34b0daa5
Add support for Postgres lock types (no key, share, key share) with FOR UPDATE
2020-11-24 23:36:54 +13:00
rob bygrave
038db79737
#2069 - Add ebean-querybean, querybean-generator and kotlin-querybean-generator as modules
2020-10-09 00:02:09 +13:00