Link Search Menu Expand Document

IClickHouseDbSetting


This interface extends IDbSetting with a ClickHouse-specific setting. It is implemented by ClickHouseDbSetting, the default database setting registered for ClickHouseConnection.

IsWaitForMutationsEnabled is only consulted by BulkMerge/BulkUpdate/BulkDelete in RepoDb.ClickHouse.BulkOperations; the plain Update/UpdateAll/Delete/DeleteAll operations never read it.

Properties

Below is the list of properties, in addition to the ones inherited from IDbSetting.

NameDescription
IsWaitForMutationsEnabledGets or sets a value indicating whether BulkMerge/BulkUpdate/BulkDelete (from RepoDb.ClickHouse.BulkOperations) block until their ALTER TABLE mutation completes. Has no effect on the plain Update/UpdateAll/Delete/DeleteAll operations.

How to Implement?

You have to manually create a class that implements this interface (typically by deriving from BaseDbSetting, the same way ClickHouseDbSetting does).

public class MyCustomClickHouseDbSetting : BaseDbSetting, IClickHouseDbSetting
{
    public MyCustomClickHouseDbSetting()
    {
        AreTableHintsSupported = false;
        ClosingQuote = "`";
        OpeningQuote = "`";
        ParameterPrefix = string.Empty;
    }

    public bool IsWaitForMutationsEnabled { get; set; } = true;
}

Usability

Once the class has been implemented, call DbSettingMapper to map it against ClickHouseConnection.

DbSettingMapper.Add(typeof(ClickHouseConnection), new MyCustomClickHouseDbSetting(), true);