public void GetSetClause_wrap_only_spaces() { Dictionary <string, string> d = new Dictionary <string, string>(); d.Add("first name", "'john'"); d.Add("last", "'smith'"); SqlGeneratorConfig config = new SqlGeneratorConfig("table"); config.NameWrappingPattern = IdentifierWrappingPattern.WrapOnlyObjectNamesThatContainSpaces; string set = DataRowExtensions.GetSetClause(config, d); Assert.Equal("SET `first name` = 'john', last = 'smith'", set); }
public void GetStClause_wrap_all_prefix_columns() { Dictionary <string, string> d = new Dictionary <string, string>(); d.Add("first name", "'john'"); d.Add("last", "'smith'"); SqlGeneratorConfig config = new SqlGeneratorConfig("table"); config.NameWrappingPattern = IdentifierWrappingPattern.WrapAllObjectNames; config.PrefixColumnNameWithTableName = true; string set = DataRowExtensions.GetSetClause(config, d); Assert.Equal("SET `table`.`first name` = 'john', `table`.`last` = 'smith'", set); }