Пример #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);
        }
Пример #2
0
        protected override Sqls GenerateSqls(IModel model, ILogger logger)
        {
            var sqls = new Sqls
            {
                InsertSql = GenerateInsertSql(model, false),
                InsertAndIgnoreDuplicateSql = GenerateInsertSql(model, true),
                InsertNewAndUpdateOldSql    = GenerateInsertNewAndUpdateOldSql(model),
                UpdateSql = GenerateUpdateSql(model, logger),
                SelectSql = GenerateSelectSql(model)
            };

            return(sqls);
        }
        protected override Sqls GenerateSqls(TableInfo tableInfo)
        {
            var sqls = new Sqls
            {
                InsertSql = GenerateInsertSql(tableInfo, false),
                InsertAndIgnoreDuplicateSql = GenerateInsertSql(tableInfo, true),
                InsertNewAndUpdateOldSql    = GenerateInsertNewAndUpdateOldSql(tableInfo),
                UpdateSql = GenerateUpdateSql(tableInfo),
                SelectSql = GenerateSelectSql(tableInfo)
            };

            return(sqls);
        }
Пример #4
0
        protected override Sqls GenerateSqls(TableInfo 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);
        }