Exemple #1
0
 static SqlTemplate()
 {
     Select  = new SelectTemplate();
     Update  = new UpdateTemplate();
     Delete  = new DeleteTemplate();
     Insert  = new InsertTemplate();
     Repeate = new RepeateTemplate();
     Count   = new CountTemplate();
 }
Exemple #2
0
        public string UpdateRule(SqlRelationModel model, params string[] conditions)
        {
            UpdateTemplate template   = new UpdateTemplate();
            var            temp_model = model.CopyInstance();

            temp_model.FilterFunction = model.FilterFunction;
            temp_model.ResetMembers(model.PreTable);
            string sql = template.UpdateWithCondition(temp_model, conditions);

            model.ClearFilter();
            return(sql);
        }