예제 #1
0
        protected override void LoadInternal(IEnumerable <SqlTableWithRecords> records, JsonOperationContext context)
        {
            using (var writer = new RelationalDatabaseWriter(this, Database))
            {
                foreach (var table in records)
                {
                    var stats = writer.Write(table, null, CancellationToken);

                    LogStats(stats, table);
                }

                writer.Commit();
            }
        }
예제 #2
0
파일: SqlEtl.cs 프로젝트: yitaom2/ravendb
        protected override int LoadInternal(IEnumerable <SqlTableWithRecords> records, DocumentsOperationContext context)
        {
            var count = 0;

            using (var writer = new RelationalDatabaseWriter(this, Database))
            {
                foreach (var table in records)
                {
                    var stats = writer.Write(table, null, CancellationToken);

                    LogStats(stats, table);

                    count += stats.DeletedRecordsCount + stats.InsertedRecordsCount;
                }

                writer.Commit();
            }

            return(count);
        }