protected static void GetValues(DmlfUpdateFieldCollection fields, List<ChangeSetValue> values, TableInfo table, IDialectDataAdapter dda, ICdlValueConvertor converter) { var input = new CdlValueHolder(); var output = new CdlValueHolder(); foreach (var col in values) { var colinfo = table.FindColumn(col.Column); if (colinfo == null) continue; input.ReadFrom(col.Value); dda.AdaptValue(input, colinfo.CommonType, output, converter); fields.Add(new DmlfUpdateField { TargetColumn = colinfo.Name, Expr = new DmlfLiteralExpression { Value = output.GetValue(), } }); } }
protected static void GetValues(DmlfUpdateFieldCollection fields, List <ChangeSetValue> values, TableInfo table, IDialectDataAdapter dda, ICdlValueConvertor converter) { var input = new CdlValueHolder(); var output = new CdlValueHolder(); foreach (var col in values) { var colinfo = table.FindColumn(col.Column); if (colinfo == null) { continue; } input.ReadFrom(col.Value); dda.AdaptValue(input, colinfo.CommonType, output, converter); fields.Add(new DmlfUpdateField { TargetColumn = colinfo.Name, Expr = new DmlfLiteralExpression { Value = output.GetValue(), } }); } }
public DmlfUpdate() { Columns = new DmlfUpdateFieldCollection(); }
public DmlfInsert() { Columns = new DmlfUpdateFieldCollection(); }