Rob Bygrave
29e2b81092
#2813 - Sometimes subquery use wrong alias in SQL
...
The reason for this is that as part of DefaultOrmQuery.copy() it uses
DefaultExpressionList.copy() and that assumed that expressions were
safe to share which is NOT the case for IN and EXISTS sub-query expressions
so InQueryExpression and ExistsQueryExpression
The effective fix for this is that DefaultExpressionList.copy() changes
to call SpiExpression.copy() and for InQueryExpression and ExistsQueryExpression
to implement that copy() by creating a copy of the sub-query.
A "side-fix" is that in DefaultOrmQuery.createExtraJoinsToSupportManyWhereClause()
it was creating an instance of ManyWhereJoins, then mutating it ... and if we
change that to only doing the assignment at the end (object assignment is atomic)
then racy access reading ManyWhereJoins would always get a fully completed non-mutating
instance of ManyWhereJoins. Noting this because it kind of points to where I think
the race condition is (in createExtraJoinsToSupportManyWhereClause()) but noting that
with the change to DefaultExpressionList.copy() this "side-fix" isn't required per say.
2022-08-31 17:24:55 +12:00
Rob Bygrave
f07c7411fa
No effective change - tidy SqlTreeAlias only
2022-08-30 12:37:27 +12:00
Rob Bygrave
e46bbcf8cf
NaturalKeyQueryData use the matchSingleProperty + IntelliJ Inspect various improvements
...
The non-use of the matchSingleProperty meant it fell back to the multi-property match
2022-08-27 23:10:13 +12:00
Rob Bygrave
0c2ab729bc
IntelliJ Inspect various improvements
2022-08-27 22:37:48 +12:00
Rob Bygrave
81ef967d9f
IntelliJ Inspect various improvements
2022-08-27 22:02:32 +12:00
Rob Bygrave
7ce85fe5f2
Refactor method names SpiJsonReader and DocStore types
2022-08-27 20:09:27 +12:00
Rob Bygrave
e3e30cafdd
Refactor tidy error and log messages - part 2
2022-08-27 17:15:08 +12:00
Rob Bygrave
e51ac7de36
Refactor tidy error and log messages
2022-08-27 16:50:54 +12:00
Rob Bygrave
ee71c79125
Tidy DefaultTypeManager, reduce unnecessary fields
2022-08-27 16:08:30 +12:00
Rob Bygrave
bce2dec1cd
Remove unused imports in DefaultTypeManager
2022-08-27 15:40:06 +12:00
Rob Bygrave
b7e62df371
Refactor extract ebean-joda-time module - move joda ScalarTypes
...
Moves the joda-time ScalarTypes into a new ebean-joda-time module. Include
the ebean-joda-time module in the classpath, and the extra types will be
service loaded (by DefaultTypeManager).
2022-08-26 17:32:31 +12:00
Rob Bygrave
9984b53070
Refactor move BasicTypeConverter to ebean-core-type module
...
Doing this in preparation for moving the joda-type ScalarTypes into their own module
2022-08-26 15:21:30 +12:00
Rob Bygrave
4c13a3a779
Refactor move package - server.type.DataBind to server.bind, server.text.json -> server.json
...
The DataBind classes don't need to be in with server.type anymore.
The server.text.json package can just reduce package nesting.
2022-08-26 14:51:19 +12:00
Rob Bygrave
a13f581a65
Refactor ScalarTypeBaseDateTime, merge into ScalarTypeUtils both IsoJsonDateTimeParser and DecimalUtils
...
That is, merge the static util methods into ScalarTypeUtils
2022-08-26 13:15:55 +12:00
Rob Bygrave
f319ee66ad
Refactor move ScalarTypeBaseDateTime to ebean-core-type module
2022-08-26 13:02:42 +12:00
Rob Bygrave
09e20934d7
Refactor move ScalarTypeBaseDate to ebean-core-type module
2022-08-26 12:30:50 +12:00
Rob Bygrave
5b22506b9b
Refactor move ScalarTypeBaseVarchar to ebean-core-type module
2022-08-26 12:28:29 +12:00
Rob Bygrave
13a913428e
DecimalUtils - remove unused methods converting between Instance and BigDecimal
2022-08-26 12:24:15 +12:00
Rob Bygrave
5667f1b118
ScalarTypeCharArray - remove unused method jsonWrite() with incorrect params
2022-08-26 12:20:36 +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
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
186019da7f
Refactor ScalarType move format() default method from ScalarTypeBase to ScalarType
2022-08-25 13:00:30 +12:00
Rob Bygrave
7d1772cb54
Refactor ScalarType remove loadIgnore() method to implement in BeanProperty & DynamicPropertyBase
2022-08-25 12:53:44 +12:00
Rob Bygrave
cd30c47951
Refactor move ScalarTypeBase to the ebean-core-type module (for external reuse)
...
Doing this in preparation for moving the joda-time scalar types into their own module
(so that they can become optional).
2022-08-25 12:42:12 +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
26f0605d72
Refactor ScalarType methods from getters to accessors
2022-08-25 12:25:38 +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
4252445eb4
Use AppLog and System.Logger for logging - static imports
2022-08-23 15:18:46 +12:00
Rob Bygrave
a23f241fff
Use AppLog and System.Logger for logging rather than slf4j-api
...
The avaje-applog-slf4j dependency means this is still using
slf4j-api for implementation. Remove that dependency and
service load the desired implementation.
2022-08-18 22:44:31 +12:00
Rob Bygrave
c0a3f7e05d
Refactor rename internal methods - io.ebeaninternal.server.query
2022-08-18 11:11:12 +12:00
Rob Bygrave
dc730fd97b
#2788 - Support mapping @DbArray List<Float> to Postgres float4[]
2022-08-18 08:23:52 +12:00
Rob Bygrave and GitHub
841b268fc7
Merge pull request #2791 from ebean-orm/feature/InternString
...
Just use String.intern() now that we are on min Java 11 runtime.
2022-08-17 17:38:41 +12:00
Rob Bygrave
51d2f52d19
#2782 - Support MariaDB jdbc driver update - Batched JDBC SQLException translation, SqlRow BLOB reading
...
- Batched JDBC SQLException translation - Need to dig into nested exception to get cause error state
- SqlRow BLOB reading - BLOB can come as LONGVARBINARY (TestRawSqlBuilder)
- Fix test for history using system time (TestHistoryInsert)
- Fix SqlQueryCancelTest
- Fix TestSqlUpdateExceptions
2022-08-17 17:25:28 +12:00
Rob Bygrave
507027df0a
#2782 #2783 - Forward only fetchSize() for MySql and MariaDB is Integer.MIN_VALUE and 1 respectively
2022-08-17 16:17:26 +12:00
Rob Bygrave
50d45c6da9
Just use String.intern() now that we are on min Java 11 runtime.
2022-08-17 15:21:16 +12:00
Rob Bygrave and GitHub
f5e9356451
Merge pull request #2783 from Wooza/patch-1
...
Bump mariadb-java-client to 3.0.7
2022-08-17 14:55:20 +12:00
Flo and GitHub
e8afba7ed2
Use fetch size 1 instead of Integer.MIN_VALUE
2022-08-10 19:26:40 +02:00
Rob Bygrave
475b05052e
Refactor rename internal methods for SpiQueryPlan and DbReadContext
...
Change the getter methods to use accessor style
2022-08-09 15:43:16 +12:00
Rob Bygrave and GitHub
2df6f2e5fb
Merge pull request #2770 from ebean-orm/feature/sqlquery-useTransaction
...
Add SqlQuery usingTransaction() for consistency and deprecate ExtendedServer API
2022-08-09 11:59:10 +12:00
Rob Bygrave
c7bd6c8bde
Support a naming convention function that can be applied to metrics names for reporting
...
For example, can apply a lower case underscore naming convention to the metrics names. This
can be done such that it doesn't have to be applied every time the metrics are collected and
reported.
2022-08-08 21:34:00 +12:00
Rob Bygrave and GitHub
797e1f4bd2
Merge pull request #2767 from ebean-orm/feature/2766-json-ref-bean
...
#2766 Explicitly specify disableLazyLoad on beans created from JSON by default
2022-08-03 20:36:19 +12:00
Rob Bygrave and GitHub
a14507e563
Merge pull request #2765 from ebean-orm/feature/2762-forUpdate-pagingList-count
...
#2762 - forUpdate is NOT included in query copy() method
2022-08-03 20:35:45 +12:00
Rob Bygrave and GitHub
732f0e13e2
Merge pull request #2745 from ebean-orm/feature/2733-rename-moduleInfoLoader
...
#2733 - Rename ModuleInfoLoader to EntityClassRegister and _Ebean$ModuleInfo to EbeanEntityRegister
2022-08-03 20:35:21 +12:00
Rob Bygrave
4050d5e900
Add SqlQuery usingTransaction() for consistency and deprecate ExtendedServer API
...
- The ExtendedServer API is replaced by use of query usingTransaction()
- Add SqlQuery usingTransaction() for consistency with Query and DtoQuery
2022-08-02 15:35:00 +12:00
Rob Bygrave
47b940f672
#2760 - Add ServerMetrics.asData() ... for consistency
2022-08-02 08:35:48 +12:00
Rob Bygrave
01d5aa8199
#2760 - Add ServerMetrics.asJson() ... to support conversion of collected metrics to json
2022-08-01 16:54:49 +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