ClickHouseWarehouseCatalog

class ClickHouseWarehouseCatalog(client: Client, val connection: String, val databases: List<String>) : WarehouseCatalog

The WarehouseCatalog of a ClickHouse server, over the host's client-v2 client:

  • the sources are the tables and views of databases that system.tables lists, but for the materialized views (their data is in the tables they write TO), their inner tables and wow_catalog itself;

  • a table's columns are system.columns', in order;

  • the wow_catalog rows of a table are those of format 1 in its database's wow_catalog, read with FINAL: a row of the same content written again is one row. A database without wow_catalog has none.

Each statement's result is read as JSONEachRow on Dispatchers.IO.

Constructors

Link copied to clipboard
constructor(client: Client, connection: String, databases: List<String>)

Properties

Link copied to clipboard
open override val connection: String
Link copied to clipboard
open override val databases: List<String>
Link copied to clipboard
open override val engine: String

Functions

Link copied to clipboard
open suspend override fun catalogChanges(database: String): Map<String, String>
Link copied to clipboard
open suspend override fun catalogRows(database: String, table: String): List<CatalogRow>
Link copied to clipboard
open suspend override fun table(database: String, table: String): WarehouseTable?
Link copied to clipboard
open suspend override fun tables(database: String): List<WarehouseTableInfo>
Link copied to clipboard
open override fun toString(): String