Esempio n. 1
0
        public IMartenQueryable <T> QueryRawEventDataOnly <T>()
        {
            _tenant.EnsureStorageExists(typeof(StreamAction));

            _store.Events.AddEventType(typeof(T));

            return(_session.Query <T>());
        }
Esempio n. 2
0
        public IMartenQueryable <T> QueryRawEventDataOnly <T>()
        {
            _tenant.EnsureStorageExists(typeof(StreamAction));

            if (_store.Events.AllAggregates().Any(x => x.AggregateType == typeof(T)))
            {
                return(_session.Query <T>());
            }

            _store.Events.AddEventType(typeof(T));

            return(_session.Query <T>());
        }
Esempio n. 3
0
        public void Start(DaemonLifecycle lifecycle)
        {
            _logger.StartingProjection(this, lifecycle);

            _tenant.EnsureStorageExists(_projection.Produces);

            startConsumers();

            Lifecycle = lifecycle;
            _fetcher.Start(this, lifecycle, _cancellation.Token);


        }
Esempio n. 4
0
 public void EnsureStorageExists(ITenant tenant)
 {
     foreach (var type in Produces)
     {
         tenant.EnsureStorageExists(type);
     }
 }
Esempio n. 5
0
 private void ensureStorageExists()
 {
     if (_projection is IDocumentProjection)
     {
         _tenant.EnsureStorageExists(_projection.ProjectedType());
     }
 }
Esempio n. 6
0
        public void StartAll()
        {
            Logger.BeginStartAll(_tracks.Values);

            foreach (var track in _tracks.Values)
            {
                _tenant.EnsureStorageExists(track.ViewType);
            }

            _tenant.EnsureStorageExists(typeof(EventStream));

            findCurrentEventLogPositions();

            foreach (var track in _tracks.Values)
            {
                track.Start(DaemonLifecycle.Continuous);
            }

            Logger.FinishedStartingAll();
        }
 public void EnsureStorageExists(ITenant tenant)
 {
     tenant.EnsureStorageExists(typeof(QuestPatchTestProjection));
 }
Esempio n. 8
0
 public void EnsureStorageExists(Type documentType)
 {
     _inner.EnsureStorageExists(documentType);
 }
Esempio n. 9
0
 private void ensureAsStringStorage()
 {
     if (StreamIdentity == StreamIdentity.AsGuid)
     {
         throw new InvalidOperationException("This Marten event store is configured to identify streams with Guids");
     }
     _tenant.EnsureStorageExists(typeof(EventStream));
 }
Esempio n. 10
0
        public void Append(Guid stream, params object[] events)
        {
            _tenant.EnsureStorageExists(typeof(EventStream));

            if (_unitOfWork.HasStream(stream))
            {
                _unitOfWork.StreamFor(stream).AddEvents(events.Select(EventStream.ToEvent));
            }
            else
            {
                var eventStream = new EventStream(stream, events.Select(EventStream.ToEvent).ToArray(), false);

                _unitOfWork.StoreStream(eventStream);
            }
        }
Esempio n. 11
0
 public void EnsureStorageExists(ITenant tenant)
 {
     tenant.EnsureStorageExists(Produces);
 }