Esempio n. 1
0
        public string SelectCountTable(SqlRelationModel model)
        {
            CountTemplate template = new CountTemplate();
            StringBuilder sql      = new StringBuilder();

            sql.Append(template.SelectCount(model.EntityModel));
            sql.Append(JoinRule(model, model.Tables));
            return(sql.ToString());
        }
Esempio n. 2
0
 static SqlTemplate()
 {
     Select  = new SelectTemplate();
     Update  = new UpdateTemplate();
     Delete  = new DeleteTemplate();
     Insert  = new InsertTemplate();
     Repeate = new RepeateTemplate();
     Count   = new CountTemplate();
 }
Esempio n. 3
0
        public string SelectCountSource(SqlRelationModel model)
        {
            CountTemplate template = new CountTemplate();
            StringBuilder sql      = new StringBuilder();

            model.UseDefaultFilter();
            sql.Append(template.SelectCount(model.EntityModel));
            sql.Append(JoinRule(model, model.Sources));
            model.ClearFilter();
            return(sql.ToString());
        }