tomasfabian / ksqlDB.RestApi.Client-DotNet

ksqlDb.RestApi.Client is a C# LINQ-enabled client API for issuing and consuming ksqlDB push and pull queries and executing statements.
MIT License
94 stars 25 forks source link

Feature/support for passing session variables #40

Closed tomasfabian closed 1 year ago

tomasfabian commented 1 year ago

The aim of this PR is to add support for substitution variables requested in #39 in the following manner:

var statement = new KSqlDbStatement("CREATE TYPE ${typeName} AS STRUCT<name VARCHAR, address ADDRESS>;")
{
  SessionVariables = new Dictionary<string, object> { { "typeName", typeName } }
};

var httpResponseMessage = await restApiClient.ExecuteStatementAsync(statement);