Ejemplo n.º 1
0
 public MergeQueryObject(
     IBulkLoader bulkLoader,
     ExpressionToSql expressionToSql)
 {
     _bulkLoader      = bulkLoader;
     _expressionToSql = expressionToSql;
 }
Ejemplo n.º 2
0
 public DocumentProvider(IBulkLoader <T>?bulkLoader, IDocumentStorage <T> queryOnly, IDocumentStorage <T> lightweight, IDocumentStorage <T> identityMap, IDocumentStorage <T> dirtyTracking)
 {
     BulkLoader    = bulkLoader;
     QueryOnly     = queryOnly;
     Lightweight   = lightweight;
     IdentityMap   = identityMap;
     DirtyTracking = dirtyTracking;
 }
Ejemplo n.º 3
0
 public Watcher(ILog view, IFolderModel model, ILineCounter counter, IBulkLoader loader, string folder, string filter)
 {
     _view               = view;
     _model              = model;
     _counter            = counter;
     _counter.FolderPath = folder;
     _loader             = loader;
     _directory          = folder;
     _filter             = filter;
 }
Ejemplo n.º 4
0
 private async Task loadDocumentsAsync <T>(IReadOnlyCollection <T> documents, IBulkLoader <T> loader, BulkInsertMode mode, NpgsqlConnection conn, CancellationToken cancellation)
 {
     if (mode == BulkInsertMode.InsertsOnly)
     {
         await loader.LoadAsync(_tenant, Serializer, conn, documents, cancellation).ConfigureAwait(false);
     }
     else
     {
         await loader.LoadIntoTempTableAsync(_tenant, Serializer, conn, documents, cancellation).ConfigureAwait(false);
     }
 }
Ejemplo n.º 5
0
 private void loadDocuments <T>(IEnumerable <T> documents, IBulkLoader <T> loader, BulkInsertMode mode, NpgsqlConnection conn, CharArrayTextWriter writer)
 {
     if (mode == BulkInsertMode.InsertsOnly)
     {
         loader.Load(_tenant, Serializer, conn, documents, writer);
     }
     else
     {
         loader.LoadIntoTempTable(_tenant, Serializer, conn, documents, writer);
     }
 }
Ejemplo n.º 6
0
 public BulkLoaderContext(
     IBulkLoader bulkLoader,
     string tableName,
     SqlConnection conn,
     bool keepIdentityColumnValue,
     IEnumerable <T> dataToInsert,
     int batchSize)
 {
     _withoutMembers          = new List <string>();
     _renameFields            = new Dictionary <string, string>();
     _bulkLoader              = bulkLoader;
     _tableName               = tableName;
     _conn                    = conn;
     _keepIdentityColumnValue = keepIdentityColumnValue;
     _dataToInsert            = dataToInsert;
     _batchSize               = batchSize;
 }
Ejemplo n.º 7
0
 public SubClassDocumentStorage(IDocumentStorage parent)
 {
     _parent             = parent;
     _parentIdAssignment = _parent.As <IdAssignment <TBase> >();
     _parentBulkLoader   = _parent.As <IBulkLoader <TBase> >();
 }
Ejemplo n.º 8
0
 public SubClassBulkLoader(IBulkLoader <TRoot> inner)
 {
     _inner = inner;
 }