Skip to content

Commit f24f91b

Browse files
Add command text optional parameter to ClickHouseConnection.CreateCommand() (#88)
1 parent 1c56881 commit f24f91b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ClickHouse.Driver/ADO/ClickHouseConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -427,7 +427,7 @@ private async Task<HttpResponseMessage> PostStreamAsync(string sql, HttpContent
427427
}
428428
}
429429

430-
public new ClickHouseCommand CreateCommand() => new ClickHouseCommand(this);
430+
public new ClickHouseCommand CreateCommand(string commandText = null) => new (this) { CommandText = commandText };
431431

432432
void IDisposable.Dispose()
433433
{

ClickHouse.Driver/IClickHouseConnection.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ namespace ClickHouse.Driver;
55

66
public interface IClickHouseConnection : IDbConnection
77
{
8-
new ClickHouseCommand CreateCommand();
8+
new ClickHouseCommand CreateCommand(string commandText = null);
99
}

0 commit comments

Comments
 (0)