Repository navigation
v0.7.0
Minor Changes
-
8ee504e: A ClickHouse client for Cloudflare Workers and any
fetchruntime, and OpenTelemetry-shaped spans for every statement.@maple-dev/effect-orm/clickhouse-httpis a ClickHouseSqlClientover Effect'sHttpClient, soDatabaseruns where@effect/sql-clickhouse(Node only) cannot. Interrupting a statement aborts its request and sendsKILL QUERYfor itsquery_id; failures carry the sameSqlErrorreasons as Effect's driver; credentials travel in a header;asCommand,withQueryIdandwithSettingswork as there.Databaseopens one client span per statement, named and attributed per the OpenTelemetry database conventions:db.system.name,db.operation.name,db.collection.name,db.query.summary,db.response.returned_rowsanderror.type.withQuerySummary(name)names the statements an effect runs.CompiledQuery.collectionis the table a statement targets: a SELECT'sFROMtable, or the table a write changes.
-
6792323:
effect-orm pullwrites table definitions from an existing ClickHouse database, so adopting effect-orm on a database that already has tables no longer means writing everyCH.tableby hand.- It reads the database the config's
driverconnects to and writes oneCH.tableper table: engine and arguments, keys as declared, partition key, TTL, settings, comments, column defaults, codecs and skipping indexes. The definitions yield exactly what the database holds, sogenerate --baselineadopts them and the nextgeneratehas nothing to do. - Column types map to the built-ins that write the same SQL; others become
CH.customwith a fitting schema (UUID,Date,Decimal,Enum8, …) orCH.untyped. Views and non-MergeTree tables are written asexternal: true. Materialized views,SAMPLE BYandEPHEMERALcolumns are listed for review in the file's header. pullis also exported from/kit.
verifyreads a table's sorting and primary keys as declared. It had comparedsystem.tables.sorting_key, which has aVersionedCollapsingMergeTree's version column appended, so such a table always showed drift. - It reads the database the config's