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
builderDataContextBuilderThe builder to configure.
dataSourceClickHouseDataSourceAn already-created data source owned by the caller.
Returns
- DataContextBuilder
The same builder, to allow chaining.
Exceptions
- ArgumentNullException
dataSourceis 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
builderDataContextBuilderThe builder to configure.
clientClickHouseClientAn already-created client owned by the caller.
Returns
- DataContextBuilder
The same builder, to allow chaining.
Exceptions
- ArgumentNullException
clientis 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
builderDataContextBuilderThe builder to configure.
connectionDbConnectionAn 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
builderDataContextBuilderThe builder to configure.
connectionStringstringThe ClickHouse connection string.
Returns
- DataContextBuilder
The same builder, to allow chaining.