Skip to main content

2. Mapper API

For general usage, see 5.2 Mapper API; shared capabilities are covered in Parameters and Rules and Receiving Results. Status links in the table explain data-source-specific behavior.

Data sourceMethod AnnotationsMapper Reads and WritesKey StrategiesPaginationExecution OptionsCalling BuildersReferencing File MappersSession Management
MySQL✓ Supported✓ Supported◐ Partial✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported
PostgreSQL✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported
Oracle✓ Supported✓ Supported◐ Partial✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported
SQL Server✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported
DB2✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported
H2✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported
ClickHouse◐ Partial◐ Partial◐ Partial✓ Supported✓ Supported✓ Supported✓ Supported✓ Supported
Redis◐ Partial✕ Unsupported◐ Partial✕ Unsupported◐ Partial✕ Unsupported✓ Supported✓ Supported
MongoDB◐ Partial✓ Supported◐ Partial✓ Supported◐ Partial✓ Supported✓ Supported✓ Supported
ES 6✓ Supported◐ Partial◐ Partial✓ Supported◐ Partial✓ Supported✓ Supported✓ Supported
ES 7✓ Supported◐ Partial◐ Partial✓ Supported◐ Partial✓ Supported✓ Supported✓ Supported
Milvus◐ Partial◐ Partial◐ Partial✓ Supported◐ Partial✓ Supported◐ Partial✓ Supported
  • Method annotations: queries, writes, @Execute, multiline command assembly, and error handling.
  • Mapper reads and writes: BaseMapper CRUD, replacement, upsert, sample queries, and writes using Map arguments.
  • Key strategies: assigned and default keys, generated-key retrieval, selectKey, and composite keys.
  • Pagination: method annotations, BaseMapper, and file-mapper calls.
  • Execution options: statement mode, timeout, fetch settings, and result-set types, including scrolling.
  • Calling builders: obtain and use a builder through a Mapper or Session.
  • Referencing file mappers: query, write, and read return values by statement ID.
  • Session management: create mappers, reuse sessions, and access data across APIs.