Skip to main content

Mapping and data handling

4 articles

Handle object fields, specialized types, and query results.

Back
  • JSON Field Mapping: Storing Java Objects and Maps

    Map a business object to JSON text using a type annotation, with Map configuration, update semantics and querying boundaries.

  • Mapping BCE Dates: Two Approaches

    BCE dates cause subtle "off-by-one" bugs between Java and databases. dbVisitor 6.7.0 adds JulianDayTypeHandler and PgDateTypeHandler to provide cross-database and PostgreSQL-native mappings. Database date ranges and handler boundaries still need consideration.

  • Key-Value Queries: Mapping Two Columns to a Map

    "Select two columns and build a Map" is a common pattern — ID-to-name, code-to-description, etc. The builder-level queryForPairs added in dbVisitor 6.7.0 returns a Map directly in one call, no manual iteration needed.

  • Streaming Large MySQL Tables

    Read large MySQL results row by row with dbVisitor and Connector/J to control application memory.