diff --git a/jOOQ-website/contribute.php b/jOOQ-website/contribute.php index 477548b9b7..64766c5f1e 100644 --- a/jOOQ-website/contribute.php +++ b/jOOQ-website/contribute.php @@ -1,12 +1,16 @@ Become a jOOQer'; +} +function getSlogan() { + return "jOOQ can only be as great as its community. You can make the change happen! jOOQ needs + motivated staff, providing new database integrations, website translations, and shouting out to + the world about jOOQ. You have a blog? Write about jOOQ in your language!"; } -function getSlogan() {} function printContent() { ?> -
jOOQ needs your help to implement all of this and more! Make it to the hall of fame of jOOQ contributors:
Thanks to all of the above people!
-You can contribute anything. Ideas, feature requests or bug reports (please use trac, and be explicit). Or code! If you want to share code, please follow these instructions
+You can contribute anything. Ideas, feature requests or bug reports (please use trac, and be explicit). You can also help enlarge the community, by shouting out to the world about jOOQ and how you use it. You have a blog? Write about jOOQ!
+Or contribute code! If you want to share code, please follow these instructions
Should you wish to provide an extension/support for a new RDBMS (such as Informix, Firebird, etc) your work would consist of these steps:
When you consider jOOQ for your project, you might also have considered any of these similar products:
+
jOOX stands for Java Object Oriented XML. It is a simple wrapper for the org.w3c.dom package, diff --git a/jOOQ-website/manual/ADVANCED/index.php b/jOOQ-website/manual/ADVANCED/index.php index 2d654e9abc..114f3b9400 100644 --- a/jOOQ-website/manual/ADVANCED/index.php +++ b/jOOQ-website/manual/ADVANCED/index.php @@ -14,7 +14,7 @@ function printContent() { ?>
| The jOOQ User Manual : Advanced topics | previous : next | +The jOOQ User Manual : Advanced topics | previous : next |
+ The + Result<R extends Record> + is essentially a wrapper for a List<R extends Record> + providing + many convenience methods for accessing single elements in + the result + set. Depending on the type of SELECT statement, + <R> can be bound + to a sub-type of Record, for instance to an + org.jooq.UpdatableRecord. + See the section on + Updatable Records + for further details. +
+ ++ A similar object is the + Cursor<R extends Record>. + Unlike the Result, the cursor has not fetched all data from the database yet. + This means, you save memory (and potentially speed), but you can only access + data sequentially and you have to keep a JDBC ResultSet alive. Cursors behave + very much like the java.util.Iterator, + by providing a very simple API: +
++// Check whether there are any more records to be fetched +boolean hasNext() throws SQLException; + +// Fetch the next record from the underlying JDBC ResultSet +R fetchOne() throws SQLException; + +// Close the underlying JDBC ResultSet. Don't forget to call this, before disposing the Cursor. +void close() throws SQLException;+ +
+ The Record itself holds all the data from your selected tuple. If it is + a org.jooq.TableRecord, then it corresponds exactly to the type of one of your + physical tables in your database. But any anonymous or ad-hoc tuple can + be represented by the plain Record. A record mainly provides access to + its data and adds convenience methods for data type conversion. These + are the main access ways: +
++// If you can keep a reference of the selected field, then you can get the corresponding value type-safely +<T> T getValue(Field<T> field); + +// If you know the name of the selected field within the tuple, +// then you can get its value without any type information +Object getValue(String fieldName); + +// If you know the index of the selected field within the tuple, +// then you can get its value without any type information +Object getValue(int index);+
+ In some cases, you will not be able to reference the selected Fields + both when you create the SELECT statement and when you fetch data from + Records. Then you might use field names or indexes, as with JDBC. + However, of course, the type information will then be lost as well. If + you know what type you want to get, you can always use the Record's + convenience methods for type conversion, however. Some examples: +
++// These methods will try to convert a value to a BigDecimal. +// This will work for all numeric types and for CHAR/VARCHAR types, if they contain numeric values: +BigDecimal getValueAsBigDecimal(String fieldName); +BigDecimal getValueAsBigDecimal(int fieldIndex); + +// This method can perform arbitrary conversions +<T> T getValue(String fieldName, Class<? extends T> type); +<T> T getValue(int fieldIndex, Class<? extends T> type);+ - diff --git a/jOOQ-website/notes.php b/jOOQ-website/notes.php index 8d6ac16619..91360879e9 100644 --- a/jOOQ-website/notes.php +++ b/jOOQ-website/notes.php @@ -1,9 +1,13 @@ From 2009 to ' . date('Y'); +} +function getSlogan() { + return "jOOQ has come a long way. The community is growing as features are being added + in the beginning, jOOQ was no more than type-safe querying for simple statements. See how + jOOQ is growing to support almost all SQL constructs by 12 different RDBMS"; } -function getSlogan() {} function printContent() { $contents = file('inc/RELEASENOTES.txt'); diff --git a/jOOQ-website/src/main/resources/manual.xml b/jOOQ-website/src/main/resources/manual.xml index 51b5430c42..fe46b2661f 100644 --- a/jOOQ-website/src/main/resources/manual.xml +++ b/jOOQ-website/src/main/resources/manual.xml @@ -391,7 +391,91 @@ MySQLFactory create = new MySQLFactory(connection);
+ The
+
+ A similar object is the
+
+// Check whether there are any more records to be fetched +boolean hasNext() throws SQLException; + +// Fetch the next record from the underlying JDBC ResultSet +R fetchOne() throws SQLException; + +// Close the underlying JDBC ResultSet. Don't forget to call this, before disposing the Cursor. +void close() throws SQLException;+ +
+ The Record itself holds all the data from your selected tuple. If it is
+ a
+// If you can keep a reference of the selected field, then you can get the corresponding value type-safely +<T> T getValue(Field<T> field); + +// If you know the name of the selected field within the tuple, +// then you can get its value without any type information +Object getValue(String fieldName); + +// If you know the index of the selected field within the tuple, +// then you can get its value without any type information +Object getValue(int index);+
+ In some cases, you will not be able to reference the selected Fields + both when you create the SELECT statement and when you fetch data from + Records. Then you might use field names or indexes, as with JDBC. + However, of course, the type information will then be lost as well. If + you know what type you want to get, you can always use the Record's + convenience methods for type conversion, however. Some examples: +
++// These methods will try to convert a value to a BigDecimal. +// This will work for all numeric types and for CHAR/VARCHAR types, if they contain numeric values: +BigDecimal getValueAsBigDecimal(String fieldName); +BigDecimal getValueAsBigDecimal(int fieldIndex); + +// This method can perform arbitrary conversions +<T> T getValue(String fieldName, Class<? extends T> type); +<T> T getValue(int fieldIndex, Class<? extends T> type);+