Skip to content

Commit

Permalink
Released ao-dbc-4.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
ao-apps committed May 11, 2024
1 parent 9f9a67c commit baf7a2a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 53 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
ao-dbc - Simplified JDBC access for simplified code.
Copyright (C) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023 AO Industries, Inc.
Copyright (C) 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 AO Industries, Inc.
support@aoindustries.com
7262 Bull Pen Cir
Mobile, AL 36695
Expand Down Expand Up @@ -37,9 +37,9 @@ along with ao-dbc. If not, see <https://www.gnu.org/licenses/>.
shortTitle="Changelog"
tocLevels="1"
datePublished="2016-10-29T19:31:26-05:00"
dateModified="2023-10-17T12:25:38Z"
dateModified="2024-05-11T16:20:52Z"
>
<c:set var="latestRelease" value="3.1.1" />
<c:set var="latestRelease" value="4.0.0" />
<c:if test="${
fn:endsWith('@{project.version}', '-SNAPSHOT')
and !fn:endsWith('@{project.version}', '-POST-SNAPSHOT')
Expand All @@ -55,46 +55,56 @@ along with ao-dbc. If not, see <https://www.gnu.org/licenses/>.
>
<!-- TODO: queryConsumer and updateConsumer, similar to queryCollection and updateCollection? Not needed since have stream methods? -->
<!-- TODO: per-ResultSet and per-Statement SQLWarning logging, via wrapper. Other warning logging (Connection) via wrapper, too -->
<ul>
<li>
<p>
<code>DatabaseAccess</code> now implements transactional methods instead of them only being on
<code>Database</code>. This allows code to accept <code>DatabaseAccess</code> while still being able to
efficiently have its own transactional block. Previously, <code>DatabaseAccess</code> was typically used
only for one-off database calls.
</p>
<p>
When transactional methods are via a <code>Database</code> instance, the implementation is the same as
before. When the transactional methods are via a <code>DatabaseConnection</code>, they are directly
implemented on the connection.
</p>
</li>
<li>
New <code>DatabaseConnection.onCommit(…)</code> and <code>DatabaseConnection.onRollback(…)</code> events.
</li>
<li>
New set of methods that return <code><ao:a rel="nofollow" href="@{javadoc.link.javase}java.base/java/util/Optional.html">Optional</ao:a></code>
instead of throwing <code><ao:a href="apidocs/com.aoapps.dbc/com/aoapps/dbc/NoRowException.html">NoRowException</ao:a></code>.
</li>
<li>
<p>
<strong>Breaking change:</strong> Single-row <code>DatabaseAccess.queryObject(…)</code>,
<code>DatabaseAccess.updateObject(…)</code>, and all related more specific type methods will no longer
return <code>null</code> when there is a row with a SQL NULL value, instead will throw
<code><ao:a href="apidocs/com.aoapps.dbc/com/aoapps/dbc/NullDataException.html">NullDataException</ao:a></code>.
This was already the behavior for primitive types (and related wrappers). This aligns the behavior across
all types.
</p>
<p>
When SQL NULL values are expected, use one of the new <code>DatabaseAccess.queryObjectNullable(…)</code>,
<code>DatabaseAccess.queryObjectOptionalNullable(…)</code>, or related more specific type methods.
</p>
</li>
<li>Implemented remaining SQL types for formatted result set exceptions/logging.</li>
</ul>
</changelog:release>
</c:if>

<changelog:release
projectName="@{documented.name}"
version="4.0.0"
datePublished="2024-05-11T16:20:52Z"
groupId="@{project.groupId}"
artifactId="@{documented.artifactId}"
scmUrl="@{project.scm.url}"
>
<ul>
<li>
<p>
<code>DatabaseAccess</code> now implements transactional methods instead of them only being on
<code>Database</code>. This allows code to accept <code>DatabaseAccess</code> while still being able to
efficiently have its own transactional block. Previously, <code>DatabaseAccess</code> was typically used
only for one-off database calls.
</p>
<p>
When transactional methods are via a <code>Database</code> instance, the implementation is the same as
before. When the transactional methods are via a <code>DatabaseConnection</code>, they are directly
implemented on the connection.
</p>
</li>
<li>
New <code>DatabaseConnection.onCommit(…)</code> and <code>DatabaseConnection.onRollback(…)</code> events.
</li>
<li>
New set of methods that return <code><ao:a rel="nofollow" href="@{javadoc.link.javase}java.base/java/util/Optional.html">Optional</ao:a></code>
instead of throwing <code><ao:a href="apidocs/com.aoapps.dbc/com/aoapps/dbc/NoRowException.html">NoRowException</ao:a></code>.
</li>
<li>
<p>
<strong>Breaking change:</strong> Single-row <code>DatabaseAccess.queryObject(…)</code>,
<code>DatabaseAccess.updateObject(…)</code>, and all related more specific type methods will no longer
return <code>null</code> when there is a row with a SQL NULL value, instead will throw
<code><ao:a href="apidocs/com.aoapps.dbc/com/aoapps/dbc/NullDataException.html">NullDataException</ao:a></code>.
This was already the behavior for primitive types (and related wrappers). This aligns the behavior across
all types.
</p>
<p>
When SQL NULL values are expected, use one of the new <code>DatabaseAccess.queryObjectNullable(…)</code>,
<code>DatabaseAccess.queryObjectOptionalNullable(…)</code>, or related more specific type methods.
</p>
</li>
<li>Implemented remaining SQL types for formatted result set exceptions/logging.</li>
</ul>
</changelog:release>

<changelog:release
projectName="@{documented.name}"
version="3.1.1"
Expand Down
26 changes: 13 additions & 13 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ along with ao-dbc. If not, see <https://www.gnu.org/licenses/>.
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>com.aoapps</groupId><artifactId>ao-oss-parent</artifactId><version>1.24.3<!-- -POST-SNAPSHOT --></version>
<groupId>com.aoapps</groupId><artifactId>ao-oss-parent</artifactId><version>1.24.3-POST-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>

Expand Down Expand Up @@ -236,41 +236,41 @@ along with ao-dbc. If not, see <https://www.gnu.org/licenses/>.
<dependencies>
<!-- Direct -->
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-collections</artifactId><version>3.0.0<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-collections</artifactId><version>3.0.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-concurrent</artifactId><version>4.0.5<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-concurrent</artifactId><version>4.0.5${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-encoding</artifactId><version>7.0.0<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-encoding</artifactId><version>7.0.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-hodgepodge</artifactId><version>5.2.0<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-hodgepodge</artifactId><version>5.2.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-lang</artifactId><version>5.6.0<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-lang</artifactId><version>5.6.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-sql</artifactId><version>2.0.1<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-sql</artifactId><version>2.0.1${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-sql-failfast</artifactId><version>2.0.0<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-sql-failfast</artifactId><version>2.0.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-sql-pool</artifactId><version>2.0.1<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-sql-pool</artifactId><version>2.0.1${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-sql-tracker</artifactId><version>2.1.0<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-sql-tracker</artifactId><version>2.1.0${POST-SNAPSHOT}</version>
</dependency>
<!-- Transitive -->
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-collections-transformers</artifactId><version>2.0.0<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-collections-transformers</artifactId><version>2.0.0${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-sql-wrapper</artifactId><version>2.1.1<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-sql-wrapper</artifactId><version>2.1.1${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>com.aoapps</groupId><artifactId>ao-tempfiles</artifactId><version>3.0.2<!-- ${POST-SNAPSHOT} --></version>
<groupId>com.aoapps</groupId><artifactId>ao-tempfiles</artifactId><version>3.0.2${POST-SNAPSHOT}</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId><artifactId>commons-lang3</artifactId><version>3.14.0</version>
Expand Down

0 comments on commit baf7a2a

Please sign in to comment.