All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ecwid.clickhouse.mapped.MappedResponse.kt Maven / Gradle / Ivy

package com.ecwid.clickhouse.mapped

import com.ecwid.clickhouse.ClickHouseResponse
import com.ecwid.clickhouse.typed.TypedRow

internal class MappedResponse(
	private val typedResponse: ClickHouseResponse,
	private val mapper: (TypedRow) -> T
) : ClickHouseResponse {

	override fun iterator(): Iterator {
		return MappedIterator(typedResponse.iterator(), mapper)
	}

	override fun close() {
		typedResponse.close()
	}

	override fun getMeta() = typedResponse.getMeta()

	override fun getStatistic() = typedResponse.getStatistic()

	override fun getRows(): Long = typedResponse.getRows()

	override fun getRowsBeforeLimitAtLeast(): Long? = typedResponse.getRowsBeforeLimitAtLeast()

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy