Rob Bygrave and GitHub
7feb193e95
Merge pull request #3007 from ebean-orm/refactor/rename-loadContext-methods
...
Refactor rename methods in LoadContext
2023-03-25 15:39:40 +13: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
f7a11135a5
Refactor rename methods in LoadContext
...
Rename internal methods only
2023-03-23 22:11:02 +13:00
Rob Bygrave
bd318a5d85
Improve the logging around MarkedAsDeleted
2023-03-21 20:30:39 +13:00
Rob Bygrave
a2690fdccd
#2995 - Change DatabaseConfig.getClasses() to return a Set
...
The thinking is that it is safer to make this API change
rather than to return a shallow copy which you won't be
able to detect.
2023-03-14 11:56:01 +13:00
Rob Bygrave
a8cad4f3d9
Change such that querybean generated class registration can be used will explicit class registration
...
In DatabaseConfig.isAutoLoadModuleInfo() it only used the querybean generated class registration is classes.isEmpty(). Changing this so that it only uses the loadModuleInfo flag.
This means, unless loadModuleInfo is set to false the classes that register with ebean will be a combination of both the explicitly registered ones plus the classes from the querybean generated EbeanEntityRegister.
In addition, this changes the classes from List to Set.
2023-03-10 11:01:46 +13:00
Rob Bygrave
79c96c9ec1
Improve error message in InterceptReadWrite when lazy loading and no default server registered
2023-03-09 17:14:36 +13:00
rob
2e0dba3741
#2981 - ENH: Add profile-line-number-mode with options none | all | auto ... to control adding line numbers to profile locations
2023-02-22 23:02:42 +13:00
rob
34dc4375da
Tidy existing given that lineNumber in SpiProfileLocationFactory always comes in as 0
...
The history behind this is that originally there was a "profileId" concept where that was a int value that could be used as an "id" for a transactional method that we wanted to profile.
That went away and then the idea was that bytecode enhancement would determine the line number and we would use that but that was a bad idea and we ended up with lineNumber always as 0.
These days with StackWalker and DProfileLocation we can do this better that way so yeah. A followup to this is to add to the api a boolean flag as to whether a profile location should be with line numbers (which can change frequently due to refactoring etc)
2023-02-22 15:22:58 +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
b0364f3c42
Use StackWalker for ProfileLocation and CallOrigin
2023-02-21 14:21:18 +13:00
rob
fe241d8cce
Tidy internals, use Config.getOptional() when reading datasource.default / ebean.default.datasource
2023-02-20 09:07:45 +13:00
Rob Bygrave and GitHub
b9a502ca85
Merge pull request #2957 from FOCONIS/detailed-evict-stats
...
ENH: add statistics trimmedByGC/LRU/TTL/Idle to ServerCacheStatistics?
2023-02-14 16:29:35 +13:00
rob
5882169641
Merge branch 'feature/StdExpressions'
2023-02-14 11:35:31 +13:00
rob
f694f2946a
Rename test to StdOperatorsTest
2023-02-14 11:34:00 +13:00
rob
4c0144de61
Fix SqlOperators for sql injection
2023-02-14 11:33:28 +13:00
rob
eb7de343a8
#2963 - [ebean-agent] By default enable @DbArray to be nullable and @Transient field initialisation when generating default constructors
2023-02-14 08:01:48 +13:00
Rob Bygrave
20f6a659fe
#2959 - Improve logging for lazy loading error due to "markAsDeleted"
2023-02-07 19:59:33 +13:00
Roland Praml
010f73fea2
ENH: add statistics trimmedByGC/LRU/TTL/Idle to ServerCacheStatistics?
2023-02-02 14:10:54 +01:00
Roland Praml
371f50fb4d
NEW: ExpressionList has clear() method
2023-01-23 11:33:29 +01:00
Roland Praml
9ef59e359b
Removed supportsSelect (dead code)
2023-01-13 13:43:41 +01:00
Rob Bygrave
95512d4851
#2906 - Tidy LimitOffsetSqlLimiter
2022-12-01 22:27:57 +13:00
Rob Bygrave
37ba0b63e4
#2907 - Promote Db2SqlLimiter to be AnsiSqlRowsLimiter and move to ebean-api module
2022-12-01 22:18:16 +13:00
Rob Bygrave
22a5bd9b9d
#2906 - Refactor tidy SqlLimiter implementations
2022-12-01 21:39:00 +13:00
Serhii Dakhnii
3277fe81a1
Fixed mandatory LIMIT generation in case of firstRow>0
2022-11-30 21:36:08 +02:00
Rob Bygrave
e87a06a713
#2894 - Lack of setNullParameter() functionality on io.ebean.DtoQuery interface
2022-11-21 17:00:55 +13:00
Rob Bygrave
dd7605ac3a
#2888 - DatabaseFactory.create() fails with java.lang.InstantiationError: io.ebean.bean.EntityBeanIntercept in multi-module gradle setup
2022-11-15 14:50:34 +13:00
Rob Bygrave
47dfbb6157
#2864 - Not advertise services configurable via DatabaseConfig.putServiceObject() that are "internal"
...
"internal" meaning that in terms of module-path they are not in a properly exported package. For example,
they are in a subpackage of io.ebeaninternal
2022-11-10 13:11:08 +13:00
Rob Bygrave and GitHub
013123c1a7
Merge pull request #2864 from FOCONIS/feature/override-service-objects
...
NEW: Override service objects with DatabaseConfig.putServiceObject
2022-11-10 13:05:22 +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
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
Roland Praml
f8c6a3c960
NEW: Ovverride service objects with DatabaseConfig.putServiceObject
2022-10-25 10:28:55 +02:00
Noemi Praml
c855df8b8d
javadoc
2022-10-18 07:59:19 +02:00
Rob Bygrave
7df168f232
ENH: Add Transaction.rollbackAndContinue()
...
Typically useful for handling DuplicateKeyException where we expect
DuplicateKeyException to be thrown and catch it with the intention of
continuing processing using the same transaction.
Note that some databases like Oracle do not require this explicit
rollback() and would work without the rollbackAndContinue(). Postgres
in particular requires the rollback() call on the underlying connection
such that we can continue using that transaction/java.sql.Connection.
Note that in the existing test we can see that rollbackAndContinue()
is pretty close to being syntactic sugar. I think adding rollbackAndContinue()
is justified and complements the existing commitAndContinue().
2022-09-01 17:08:11 +12:00
Rob Bygrave
e3e30cafdd
Refactor tidy error and log messages - part 2
2022-08-27 17:15:08 +12:00
Rob Bygrave
c5e8b217e3
Refactor ScalarType, remove convertFromMillis() method (no longer needed)
...
Due to the move and change of CsvReader using StringParser ScalarType no longer
needs that general convertFromMillis() method. Note that date and dateTime ScalarTypes
still retain this conversion method.
2022-08-25 22:37:47 +12:00
Rob Bygrave
efe80a534c
Extract CsvReader - remove built in date, time, dateTime parsing - use StringParser instead
...
Just always use our own StringParser lambda function instead for parsing date, time and dateTime types.
2022-08-25 22:09:38 +12:00
Rob Bygrave
1aac01ead0
Extract CsvReader - move DefaultCsvCallback and add module-info
2022-08-25 17:49:11 +12:00
Rob Bygrave
216c43eea6
Extract CsvReader into separate ebean-csv-reader module
2022-08-25 17:25:49 +12:00
Rob Bygrave and GitHub
4b11147b83
Merge pull request #2801 from ebean-orm/feature/drop-feature-OnQueryOnly
...
Remove the OnQueryOnly (rollback) feature
2022-08-25 12:30:16 +12:00
Rob Bygrave
10c9b2addd
Remove ScalarType.isDateTimeCapable() ... (only used by CSV reader)
...
So the complexity cost doesn't justify itself against only being used
by CSV reader to validate when assigning a date/time format to a property
/ expression path.
2022-08-25 12:16:37 +12:00
Rob Bygrave
96b674114c
Remove the OnQueryOnly (rollback) feature
...
The better approach these days is to use the read-only datasource with autoCommit
2022-08-25 11:26:55 +12:00
Rob Bygrave
456086fb3c
Refactor DatabasePlatform - rename getters to accessors
...
Although this is public API these getters are not expected to be used
by application code so, I feel comfortable making this change.
2022-08-25 10:34:39 +12:00
Rob Bygrave
341b9a7449
Refactor DatabasePlatform - remove unused method tableExists()
2022-08-25 10:23:14 +12:00
Rob Bygrave
6c7cedc1f1
#2799 - Remove unused DatabasePlatform.treatEmptyStringsAsNull
2022-08-25 10:19:11 +12:00