Skip to content

Commit

Permalink
[#6472] DB2 and HSQLDB support this syntax as well
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaseder committed Aug 3, 2017
1 parent ccdca97 commit 5ec1248
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 247 deletions.
22 changes: 3 additions & 19 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-2.5.xml
Expand Up @@ -8221,25 +8221,9 @@ create.selectFrom(AUTHOR)
<section id="data-types-lobs">
<title>BLOBs and CLOBs</title>
<content><html>
<p>
jOOQ aims for hiding all JDBC details from jOOQ client API. Specifically, <reference class="java.sql.Clob"/> and <reference class="java.sql.Blob"/> are quite "harsh" APIs with a few caveats that may even depend on JDBC driver specifics.
</p>

<p>
<code>Clob</code> and <code>Blob</code> are resources (but not <reference class="java.lang.AutoCloseable"/>!) with open connections to the database. This makes no sense in an ordinary jOOQ context, when eagerly fetching all the results through <code>fetch()</code> methods. <code>fetchLazy()</code> and <code>fetchStream()</code> might be candidates where <code>Clob</code> and <code>Blob</code> types could make sense as the underlying <reference class="java.sql.ResultSet"/> and <reference class="java.sql.PreparedStatement"/> are still open while consuming these resources.
</p>

<p>
<code>ByteArrayInputStream</code> and <code>ByteArrayOutputStream</code> on the other hand are two different types which cannot be represented as a single <code>Field&lt;T&gt;</code> type. If either would be chosen as the <code>&lt;T&gt;</code> type, we'd get read-only or write-only fields. So for full lazy streaming support, we'd need another 2-way wrapper type, similar to <code>Clob</code> and <code>Blob</code>.
</p>

<p>
In many cases, streaming binary data isn't really necessary as the<code>byte[]</code> can be easily kept in memory (and it is done so for further processing anyway, e.g. when working with images), so the extra work might not really be needed. This is particularly true in Oracle, where BLOBs are the only binary types in the absences of a formal (VAR)BINARY type, and CLOBs start at 4000 bytes.
</p>

<p>
Hence, jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources.
</p>
<p>
jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources. True support for LOBs is on the roadmap, though.
</p>
</html></content>
</section>

Expand Down
22 changes: 3 additions & 19 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-2.6.xml
Expand Up @@ -8828,25 +8828,9 @@ create.selectFrom(AUTHOR)
<section id="data-types-lobs">
<title>BLOBs and CLOBs</title>
<content><html>
<p>
jOOQ aims for hiding all JDBC details from jOOQ client API. Specifically, <reference class="java.sql.Clob"/> and <reference class="java.sql.Blob"/> are quite "harsh" APIs with a few caveats that may even depend on JDBC driver specifics.
</p>

<p>
<code>Clob</code> and <code>Blob</code> are resources (but not <reference class="java.lang.AutoCloseable"/>!) with open connections to the database. This makes no sense in an ordinary jOOQ context, when eagerly fetching all the results through <code>fetch()</code> methods. <code>fetchLazy()</code> and <code>fetchStream()</code> might be candidates where <code>Clob</code> and <code>Blob</code> types could make sense as the underlying <reference class="java.sql.ResultSet"/> and <reference class="java.sql.PreparedStatement"/> are still open while consuming these resources.
</p>

<p>
<code>ByteArrayInputStream</code> and <code>ByteArrayOutputStream</code> on the other hand are two different types which cannot be represented as a single <code>Field&lt;T&gt;</code> type. If either would be chosen as the <code>&lt;T&gt;</code> type, we'd get read-only or write-only fields. So for full lazy streaming support, we'd need another 2-way wrapper type, similar to <code>Clob</code> and <code>Blob</code>.
</p>

<p>
In many cases, streaming binary data isn't really necessary as the<code>byte[]</code> can be easily kept in memory (and it is done so for further processing anyway, e.g. when working with images), so the extra work might not really be needed. This is particularly true in Oracle, where BLOBs are the only binary types in the absences of a formal (VAR)BINARY type, and CLOBs start at 4000 bytes.
</p>

<p>
Hence, jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources.
</p>
<p>
jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources. True support for LOBs is on the roadmap, though.
</p>
</html></content>
</section>

Expand Down
22 changes: 3 additions & 19 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml
Expand Up @@ -10302,25 +10302,9 @@ Result<BookRecord> result = create.selectFrom(BOOK).where(BOOK.ID.eq(5)).fetch()
<section id="data-types-lobs">
<title>BLOBs and CLOBs</title>
<content><html>
<p>
jOOQ aims for hiding all JDBC details from jOOQ client API. Specifically, <reference class="java.sql.Clob"/> and <reference class="java.sql.Blob"/> are quite "harsh" APIs with a few caveats that may even depend on JDBC driver specifics.
</p>

<p>
<code>Clob</code> and <code>Blob</code> are resources (but not <reference class="java.lang.AutoCloseable"/>!) with open connections to the database. This makes no sense in an ordinary jOOQ context, when eagerly fetching all the results through <code>fetch()</code> methods. <code>fetchLazy()</code> and <code>fetchStream()</code> might be candidates where <code>Clob</code> and <code>Blob</code> types could make sense as the underlying <reference class="java.sql.ResultSet"/> and <reference class="java.sql.PreparedStatement"/> are still open while consuming these resources.
</p>

<p>
<code>ByteArrayInputStream</code> and <code>ByteArrayOutputStream</code> on the other hand are two different types which cannot be represented as a single <code>Field&lt;T&gt;</code> type. If either would be chosen as the <code>&lt;T&gt;</code> type, we'd get read-only or write-only fields. So for full lazy streaming support, we'd need another 2-way wrapper type, similar to <code>Clob</code> and <code>Blob</code>.
</p>

<p>
In many cases, streaming binary data isn't really necessary as the<code>byte[]</code> can be easily kept in memory (and it is done so for further processing anyway, e.g. when working with images), so the extra work might not really be needed. This is particularly true in Oracle, where BLOBs are the only binary types in the absences of a formal (VAR)BINARY type, and CLOBs start at 4000 bytes.
</p>

<p>
Hence, jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources.
</p>
<p>
jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources. True support for LOBs is on the roadmap, though.
</p>
</html></content>
</section>

Expand Down
22 changes: 3 additions & 19 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml
Expand Up @@ -10866,25 +10866,9 @@ Result<BookRecord> result = create.selectFrom(BOOK).where(BOOK.ID.eq(5)).fetch()
<section id="data-types-lobs">
<title>BLOBs and CLOBs</title>
<content><html>
<p>
jOOQ aims for hiding all JDBC details from jOOQ client API. Specifically, <reference class="java.sql.Clob"/> and <reference class="java.sql.Blob"/> are quite "harsh" APIs with a few caveats that may even depend on JDBC driver specifics.
</p>

<p>
<code>Clob</code> and <code>Blob</code> are resources (but not <reference class="java.lang.AutoCloseable"/>!) with open connections to the database. This makes no sense in an ordinary jOOQ context, when eagerly fetching all the results through <code>fetch()</code> methods. <code>fetchLazy()</code> and <code>fetchStream()</code> might be candidates where <code>Clob</code> and <code>Blob</code> types could make sense as the underlying <reference class="java.sql.ResultSet"/> and <reference class="java.sql.PreparedStatement"/> are still open while consuming these resources.
</p>

<p>
<code>ByteArrayInputStream</code> and <code>ByteArrayOutputStream</code> on the other hand are two different types which cannot be represented as a single <code>Field&lt;T&gt;</code> type. If either would be chosen as the <code>&lt;T&gt;</code> type, we'd get read-only or write-only fields. So for full lazy streaming support, we'd need another 2-way wrapper type, similar to <code>Clob</code> and <code>Blob</code>.
</p>

<p>
In many cases, streaming binary data isn't really necessary as the<code>byte[]</code> can be easily kept in memory (and it is done so for further processing anyway, e.g. when working with images), so the extra work might not really be needed. This is particularly true in Oracle, where BLOBs are the only binary types in the absences of a formal (VAR)BINARY type, and CLOBs start at 4000 bytes.
</p>

<p>
Hence, jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources.
</p>
<p>
jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources. True support for LOBs is on the roadmap, though.
</p>
</html></content>
</section>

Expand Down
18 changes: 1 addition & 17 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-3.10.xml
Expand Up @@ -18661,23 +18661,7 @@ Result<Record2<String, String>> result = create.select( Actor.ACTOR.FIRST_NAME,
<title>BLOBs and CLOBs</title>
<content><html>
<p>
jOOQ aims for hiding all JDBC details from jOOQ client API. Specifically, <reference class="java.sql.Clob"/> and <reference class="java.sql.Blob"/> are quite "harsh" APIs with a few caveats that may even depend on JDBC driver specifics.
</p>

<p>
<code>Clob</code> and <code>Blob</code> are resources (but not <reference class="java.lang.AutoCloseable"/>!) with open connections to the database. This makes no sense in an ordinary jOOQ context, when eagerly fetching all the results through <code>fetch()</code> methods. <code>fetchLazy()</code> and <code>fetchStream()</code> might be candidates where <code>Clob</code> and <code>Blob</code> types could make sense as the underlying <reference class="java.sql.ResultSet"/> and <reference class="java.sql.PreparedStatement"/> are still open while consuming these resources.
</p>

<p>
<code>ByteArrayInputStream</code> and <code>ByteArrayOutputStream</code> on the other hand are two different types which cannot be represented as a single <code>Field&lt;T&gt;</code> type. If either would be chosen as the <code>&lt;T&gt;</code> type, we'd get read-only or write-only fields. So for full lazy streaming support, we'd need another 2-way wrapper type, similar to <code>Clob</code> and <code>Blob</code>.
</p>

<p>
In many cases, streaming binary data isn't really necessary as the<code>byte[]</code> can be easily kept in memory (and it is done so for further processing anyway, e.g. when working with images), so the extra work might not really be needed. This is particularly true in Oracle, where BLOBs are the only binary types in the absences of a formal (VAR)BINARY type, and CLOBs start at 4000 bytes.
</p>

<p>
Hence, jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources.
jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources. True support for LOBs is on the roadmap, though.
</p>
</html></content>
</section>
Expand Down
22 changes: 3 additions & 19 deletions jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml
Expand Up @@ -11676,25 +11676,9 @@ Result<BookRecord> result = create.selectFrom(BOOK).where(BOOK.ID.eq(5)).fetch()
<section id="data-types-lobs">
<title>BLOBs and CLOBs</title>
<content><html>
<p>
jOOQ aims for hiding all JDBC details from jOOQ client API. Specifically, <reference class="java.sql.Clob"/> and <reference class="java.sql.Blob"/> are quite "harsh" APIs with a few caveats that may even depend on JDBC driver specifics.
</p>

<p>
<code>Clob</code> and <code>Blob</code> are resources (but not <reference class="java.lang.AutoCloseable"/>!) with open connections to the database. This makes no sense in an ordinary jOOQ context, when eagerly fetching all the results through <code>fetch()</code> methods. <code>fetchLazy()</code> and <code>fetchStream()</code> might be candidates where <code>Clob</code> and <code>Blob</code> types could make sense as the underlying <reference class="java.sql.ResultSet"/> and <reference class="java.sql.PreparedStatement"/> are still open while consuming these resources.
</p>

<p>
<code>ByteArrayInputStream</code> and <code>ByteArrayOutputStream</code> on the other hand are two different types which cannot be represented as a single <code>Field&lt;T&gt;</code> type. If either would be chosen as the <code>&lt;T&gt;</code> type, we'd get read-only or write-only fields. So for full lazy streaming support, we'd need another 2-way wrapper type, similar to <code>Clob</code> and <code>Blob</code>.
</p>

<p>
In many cases, streaming binary data isn't really necessary as the<code>byte[]</code> can be easily kept in memory (and it is done so for further processing anyway, e.g. when working with images), so the extra work might not really be needed. This is particularly true in Oracle, where BLOBs are the only binary types in the absences of a formal (VAR)BINARY type, and CLOBs start at 4000 bytes.
</p>

<p>
Hence, jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources.
</p>
<p>
jOOQ currently doesn't explicitly support JDBC BLOB and CLOB data types. If you use any of these data types in your database, jOOQ will map them to byte[] and String instead. In simple cases (small data), this simplification is sufficient. In more sophisticated cases, you may have to bypass jOOQ, in order to deal with these data types and their respective resources. True support for LOBs is on the roadmap, though.
</p>
</html></content>
</section>

Expand Down

0 comments on commit 5ec1248

Please sign in to comment.