Module: ActiveRecord::ConnectionAdapters::ClickHouse::ErrorTranslation

Included in:
ActiveRecord::ConnectionAdapters::ClickHouseAdapter
Defined in:
lib/active_record/connection_adapters/clickhouse/error_translation.rb

Constant Summary collapse

EXCEPTION_CLASS_BY_CODE =
{
  60 => UnknownTable,
  81 => UnknownDatabase,
  241 => MemoryLimitExceeded,
  159 => QueryTimeout,
  160 => QueryTimeout,
  497 => AccessDenied,
  516 => AuthenticationError
}.freeze
NULL_INSERT_MESSAGE =

Code 53 is TYPE_MISMATCH at large; only its NULL-insert shape (surfaced by input_format_null_as_default = 0) is a Rails not-null violation.

/Cannot insert NULL value into a column of type/
READONLY_CODE =

READONLY: the server refusing a write for a readonly user or a read_only: true connection — same refusal Rails models client-side with while_preventing_writes, so it raises Rails' class for it.

164