我有 SqlKata 生成的以下查询:
UPDATE "temp"."dbe01_measures" SET "category2name" = 'category4name'.
预期的查询是:
UPDATE "temp"."dbe01_measures" SET "category2name" = "category4name"
我想使用 category4name 作为列名,而不是作为值。
代码是:
var query = new Query(dimensionDataSource.Object)
var valuesToUpdateForQ1 = new Dictionary<string, object>
{
{toOptionDataSourceMetadata.NameColumn, fromDimension.DimensionDisplayName}
};
query.AsUpdate(new ReadOnlyDictionary<string, object>(valuesToUpdateForQ1));
var sqlQueryString1 = new QueryFactory { Compiler = new PostgresCompiler() }.Compiler.Compile(query1).ToString();