Пример #1
0
        protected override SqlStatements GenerateSqlStatements(TableInfo tableInfo)
        {
            var sqlStatements = new SqlStatements
            {
                InsertSql = GenerateInsertSql(tableInfo, false),
                InsertAndIgnoreDuplicateSql = GenerateInsertSql(tableInfo, true),
                InsertNewAndUpdateOldSql    = GenerateInsertNewAndUpdateOldSql(tableInfo),
                UpdateSql = GenerateUpdateSql(tableInfo),
                SelectSql = GenerateSelectSql(tableInfo)
            };

            return(sqlStatements);
        }
Пример #2
0
        protected override SqlStatements GenerateSqlStatements(TableInfo model)
        {
            if (PipelineMode == PipelineMode.InsertNewAndUpdateOld)
            {
                throw new NotImplementedException("Sql Server not support InsertNewAndUpdateOld yet.");
            }

            var sqlStatements = new SqlStatements
            {
                InsertSql = GenerateInsertSql(model),
                InsertAndIgnoreDuplicateSql = GenerateInsertSql(model),
                UpdateSql = GenerateUpdateSql(model),
                SelectSql = GenerateSelectSql(model)
            };

            return(sqlStatements);
        }