* feat: Add query.setHint() to support sql hint as inline comment in select queries
This is for ORM queries only.
An ORM query like:
new QCustomer()
.setHint("FirstRows")
.select(QCustomer.Alias.id, QCustomer.Alias.name)
.findList();
Produces SQL that includes the hint as an inline comment like:
select /*+ FirstRows */ t0.id, t0.name
from customer t0
* Fix test QOrderTest
* feat: Add includeLabelInSql configuration option to include query label as inline comment in generated sql select
The generated select queries can look like:
select /* MyInnerTest.insert_and_find */ t0.id, ...
Using either query.setLabel() or profile location (which all query beans get by default). This means that tooling looking at sql in the database can more easily relate that sql back to application code.
* More tests for labels with includeLabelInSql=true
* Remove trim when using profileLocation label
This version of avaje-config supports using AWS AppConfig as a configuration source (via avaje-aws-appconfig). It also supports dynamic changing Logback logging levels (via avaje-dynamic-logback).
commit 20152e16891582f8ff466a93ec2cf01871824d6d
Author: Rob Bygrave <robin.bygrave@gmail.com>
Date: Tue Feb 27 20:59:51 2024 +1300
#3341 Update DatabaseConfig for fluid style + javadoc
commit 1c495a7384
Author: Roland Praml <roland.praml@foconis.de>
Date: Mon Feb 26 10:25:42 2024 +0100
Fix: Compile errors
commit 574876b758
Merge: df7b0487777634fc3e
Author: Roland Praml <roland.praml@foconis.de>
Date: Fri Feb 23 16:16:39 2024 +0100
Merge branch 'master-rob' into FOCONIS-string-length-validation
commit df7b04877d
Author: Rob Bygrave <robin.bygrave@gmail.com>
Date: Mon Jun 26 21:16:32 2023 +1200
#3121 BindMaxLength validation
At deploy time derive a BindMaxLength property to use
per BeanProperty
commit 4683877e0b
Merge: 9a4b9d4bed0020ab8c
Author: Rob Bygrave <robin.bygrave@gmail.com>
Date: Fri Jun 23 16:51:34 2023 +1200
Merge branch 'string-length-validation' of github.com:FOCONIS/ebean into FOCONIS-string-length-validation
commit d0020ab8ce
Author: Roland Praml <roland.praml@foconis.de>
Date: Tue Jun 20 14:47:20 2023 +0200
Length validation less invasive
commit 9b3b8ad46a
Author: Roland Praml <roland.praml@foconis.de>
Date: Tue Jun 20 13:03:04 2023 +0200
extended DataBind, so that it could return the last bound object
commit ca3c02bc1c
Author: Roland Praml <roland.praml@foconis.de>
Date: Mon Jun 19 09:52:52 2023 +0200
Failing test for SqlServer
This is the batch size used with PreparedStatement executeBatch() with
batched inserts, updates and deletes. 20 is really on the low side and
bumping this default to 100 seems good and right.
When using DatabaseBuilder.readOnlyDatabase(true) then
ebean will:
- Set the DataSourceBuilder to use autoCommit=true and readOnly=true
- Use the same DataSource instance for both dataSource and readOnlyDataSource
This is to simplify the setup/configuration for creating a Database that
will only have read-only use.
Note that readOnly=true is a JDBC hint and for example H2 database effectively
ignores that hint where as Postgres will enforce the read-only true nature.
That is, existing code using DataSourceConfig has access to the getter
methods of DataSourceConfig. The DataSourceBuilder interface only has
the setter methods and DataSourceBuilder.Settings has both getters and
setter methods.
That is, the refactor to extract the DataSourceBuilder interface also
split off the getter methods to the DataSourceBuilder.Settings interface
(because most of the time when using the builder we only need the
setter methods and effectively hiding the getter methods behind the settings()
is useful to simplify the API for users).
So DatabaseBuilder.Settings has all the getters for code looking to read
the configuration that has been set. So DatabaseBuilder now just has the
setter methods.
Use DatabaseBuilder.settings() to access the settings and read the config
that has been set.
First step in migrating the ebean-datasource API to use builder pattern.
DataSourceConfig (concrete type) migrating to DataSourceBuilder (interface).
A followup step will deprecate the use of DataSourceConfig.