Available in versions: Dev (3.22) | Latest (3.21) | 3.20 | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12
Creating results and records in memory
Supported by ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
Most of the time, a jOOQ org.jooq.Result or org.jooq.Record is produced by fetching data from a database. But both types can also be created entirely in memory, without any database interaction, using API on the DSLContext. This is useful for a variety of use-cases, including:
- Providing results to a MockConnection or to a MockFileDatabase in tests.
- Using ad-hoc data as a table in SQL queries, via the VALUES() table constructor.
- Reading data that was previously exported by jOOQ, or produced by some other system, e.g. in order to import it into a database.
- Using any of jOOQ's formatting and mapping utilities on data that doesn't originate from a database.
None of the methods described in this section require a JDBC connection. A DSLContext created from a SQLDialect only, e.g. via DSL.using(SQLDialect.POSTGRES), is sufficient.
Table of contents
- 4.12.1.
- Creating new results and records
- 4.12.2.
- Reading CSV
- 4.12.3.
- Reading JSON
- 4.12.4.
- Reading XML
- 4.12.5.
- Reading HTML
- 4.12.6.
- Reading text
- 4.12.7.
- Reading string arrays
- 4.12.8.
- Working with in-memory results
| previous : next |
Feedback
Do you have any feedback about this page? We'd love to hear it!