Beispiel #1
0
        protected override Sqls GenerateSqls(IModel model)
        {
            var sqls = new Sqls();

            sqls.InsertSql = GenerateInsertSql(model, false);
            sqls.InsertAndIgnoreDuplicateSql = GenerateInsertSql(model, true);
            sqls.InsertNewAndUpdateOldSql    = GenerateInsertNewAndUpdateOldSql(model);
            sqls.UpdateSql = GenerateUpdateSql(model);
            sqls.SelectSql = GenerateSelectSql(model);
            return(sqls);
        }
        protected override Sqls GenerateSqls(IModel model)
        {
            if (PipelineMode == PipelineMode.InsertNewAndUpdateOld)
            {
                throw new NotImplementedException("Sql Server not suport InsertNewAndUpdateOld yet.");
            }
            var sqls = new Sqls();

            sqls.InsertSql = GenerateInsertSql(model);
            sqls.InsertAndIgnoreDuplicateSql = GenerateInsertSql(model);
            sqls.UpdateSql = GenerateUpdateSql(model);
            sqls.SelectSql = GenerateSelectSql(model);
            return(sqls);
        }