QueryOptionsBuilder

Builder for QueryOptions, providing a DSL for configuration.

Functions

Link copied to clipboard
abstract fun json(json: Json): QueryOptionsBuilder

Sets a custom Json instance for use within this query. Overrides the default JSON configuration provided in DataAccess.

Link copied to clipboard
abstract fun registerCompositeMapper(name: String, schema: String = "", mapper: PgCompositeMapper<*>): QueryOptionsBuilder

Registers a custom PgCompositeMapper for a specific PostgreSQL composite type. Useful when you want to map a composite type to a class differently than the default or bypass reflection for a specific query.

Link copied to clipboard

Registers a custom TypeHandler for use within this query. This handler will take precedence over globally registered handlers.

Link copied to clipboard

Directs Octavius to return ALL composite types encountered in this query as nested Map<String, Any?> instead of mapping them to Kotlin classes. Useful for dynamic reporting or handling arbitrary queries.

Link copied to clipboard
abstract fun returnCompositeAsMap(name: String, schema: String = ""): QueryOptionsBuilder

Directs Octavius to return a specific composite type as a nested Map<String, Any?> instead of trying to map it to a Kotlin class.