Table of Contents

Class ClickHouseDataContextOptionsBuilderExtensions

Namespace
NextORM.ClickHouse
Assembly
nextorm.clickhouse.dll

Extension methods that configure a DataContextBuilder to use ClickHouse.

public static class ClickHouseDataContextOptionsBuilderExtensions
Inheritance
ClickHouseDataContextOptionsBuilderExtensions
Inherited Members

Methods

UseClickHouse(DataContextBuilder, ClickHouseDataSource)

Configures the builder to create ClickHouse contexts over the caller-supplied dataSource. The caller keeps ownership: the context never disposes the data source or its pooled client, and its own connection is built from a copy of the data source's settings.

public static DataContextBuilder UseClickHouse(this DataContextBuilder builder, ClickHouseDataSource dataSource)

Parameters

builder DataContextBuilder

The builder to configure.

dataSource ClickHouseDataSource

An already-created data source owned by the caller.

Returns

DataContextBuilder

The same builder, to allow chaining.

Exceptions

ArgumentNullException

dataSource is null.

UseClickHouse(DataContextBuilder, ClickHouseClient)

Configures the builder to create ClickHouse contexts over the caller-supplied client. The caller keeps ownership: the context never disposes the client, and its own connection is built from a copy of the client's settings.

public static DataContextBuilder UseClickHouse(this DataContextBuilder builder, ClickHouseClient client)

Parameters

builder DataContextBuilder

The builder to configure.

client ClickHouseClient

An already-created client owned by the caller.

Returns

DataContextBuilder

The same builder, to allow chaining.

Exceptions

ArgumentNullException

client is null.

UseClickHouse(DataContextBuilder, DbConnection)

Configures the builder to create ClickHouse contexts over the caller-supplied connection.

public static DataContextBuilder UseClickHouse(this DataContextBuilder builder, DbConnection connection)

Parameters

builder DataContextBuilder

The builder to configure.

connection DbConnection

An already-created connection owned by the caller.

Returns

DataContextBuilder

The same builder, to allow chaining.

UseClickHouse(DataContextBuilder, string)

Configures the builder to create ClickHouse contexts that own a connection built from connectionString.

public static DataContextBuilder UseClickHouse(this DataContextBuilder builder, string connectionString)

Parameters

builder DataContextBuilder

The builder to configure.

connectionString string

The ClickHouse connection string.

Returns

DataContextBuilder

The same builder, to allow chaining.