public DocumentDbTests.Metadata.MyTrackedDoc Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Metadata.MyTrackedDoc document;
            document = _serializer.FromJson <DocumentDbTests.Metadata.MyTrackedDoc>(reader, 1);
            if (!reader.IsDBNull(2))
            {
                var correlationId = reader.GetFieldValue <string>(2);
                document.CorrelationId = correlationId;
            }
            if (!reader.IsDBNull(3))
            {
                var causationId = reader.GetFieldValue <string>(3);
                document.CausationId = causationId;
            }
            if (!reader.IsDBNull(4))
            {
                var lastModifiedBy = reader.GetFieldValue <string>(4);
                document.LastModifiedBy = lastModifiedBy;
            }
            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            StoreTracker(_session, document);
            return(document);
        }
        public DocumentDbTests.Concurrency.CoffeeShop Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Concurrency.CoffeeShop document;
            document = _serializer.FromJson <DocumentDbTests.Concurrency.CoffeeShop>(reader, 1);
            var version = reader.GetFieldValue <System.Guid>(2);

            _versions[id] = version;
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #3
0
        public DocumentDbTests.Metadata.MyVersionedDoc Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Metadata.MyVersionedDoc document;
            document = _serializer.FromJson <DocumentDbTests.Metadata.MyVersionedDoc>(reader, 1);
            var version = reader.GetFieldValue <System.Guid>(2);

            _versions[id]    = version;
            document.Version = version;
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #4
0
        public override void ApplyReaderDataToEvent(System.Data.Common.DbDataReader reader, Marten.Events.IEvent e)
        {
            if (!reader.IsDBNull(3))
            {
                var sequence = reader.GetFieldValue <long>(3);
                e.Sequence = sequence;
            }
            if (!reader.IsDBNull(4))
            {
                var id = reader.GetFieldValue <System.Guid>(4);
                e.Id = id;
            }
            var streamId = reader.GetFieldValue <System.Guid>(5);

            e.StreamId = streamId;
            if (!reader.IsDBNull(6))
            {
                var version = reader.GetFieldValue <long>(6);
                e.Version = version;
            }
            if (!reader.IsDBNull(7))
            {
                var timestamp = reader.GetFieldValue <System.DateTimeOffset>(7);
                e.Timestamp = timestamp;
            }
            if (!reader.IsDBNull(8))
            {
                var tenantId = reader.GetFieldValue <string>(8);
                e.TenantId = tenantId;
            }
            var isArchived = reader.GetFieldValue <bool>(9);

            e.IsArchived = isArchived;
        }
Beispiel #5
0
        public DocumentDbTests.Reading.Linq.query_with_select_many.TargetGroup Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Reading.Linq.query_with_select_many.TargetGroup document;
            document = _serializer.FromJson <DocumentDbTests.Reading.Linq.query_with_select_many.TargetGroup>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Reading.Linq.querying_through_n_deep_sub_collections.Top Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Reading.Linq.querying_through_n_deep_sub_collections.Top document;
            document = _serializer.FromJson <DocumentDbTests.Reading.Linq.querying_through_n_deep_sub_collections.Top>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #7
0
        public DocumentDbTests.Metadata.MyVersionedDoc Resolve(System.Data.Common.DbDataReader reader)
        {
            DocumentDbTests.Metadata.MyVersionedDoc document;
            document = _serializer.FromJson <DocumentDbTests.Metadata.MyVersionedDoc>(reader, 0);
            var version = reader.GetFieldValue <System.Guid>(1);

            document.Version = version;
            return(document);
        }
        public DocumentDbTests.Concurrency.CoffeeShop Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            if (_identityMap.TryGetValue(id, out var existing))
            {
                return(existing);
            }

            DocumentDbTests.Concurrency.CoffeeShop document;
            document = _serializer.FromJson <DocumentDbTests.Concurrency.CoffeeShop>(reader, 1);
            var version = reader.GetFieldValue <System.Guid>(2);

            _versions[id] = version;
            _session.MarkAsDocumentLoaded(id, document);
            _identityMap[id] = document;
            return(document);
        }
        public DocumentDbTests.Reading.Linq.SimpleEqualsParserTests.QueryTarget Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Reading.Linq.SimpleEqualsParserTests.QueryTarget document;
            document = _serializer.FromJson <DocumentDbTests.Reading.Linq.SimpleEqualsParserTests.QueryTarget>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #10
0
        public EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate document;
            document = _serializer.FromJson <EventSourcingTests.Bugs.Bug_1679_use_inner_type_for_self_aggregate.InnerAggregate>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Bugs.Bug_1217_order_by_count_of_sub_collection.Root Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Bugs.Bug_1217_order_by_count_of_sub_collection.Root document;
            document = _serializer.FromJson <DocumentDbTests.Bugs.Bug_1217_order_by_count_of_sub_collection.Root>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public CoreTests.Bugs.Bug616Account Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            CoreTests.Bugs.Bug616Account document;
            document = _serializer.FromJson <CoreTests.Bugs.Bug616Account>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #13
0
        public Marten.Testing.Documents.Issue Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            Marten.Testing.Documents.Issue document;
            document = _serializer.FromJson <Marten.Testing.Documents.Issue>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public EventSourcingTests.Aggregation.Invoice Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            EventSourcingTests.Aggregation.Invoice document;
            document = _serializer.FromJson <EventSourcingTests.Aggregation.Invoice>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Bugs.Bug_1256_querying_against_a_uint_type.DocWithUint Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Bugs.Bug_1256_querying_against_a_uint_type.DocWithUint document;
            document = _serializer.FromJson <DocumentDbTests.Bugs.Bug_1256_querying_against_a_uint_type.DocWithUint>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Reading.Linq.IsNullNotNullArbitraryDepthTests.UserNested Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Reading.Linq.IsNullNotNullArbitraryDepthTests.UserNested document;
            document = _serializer.FromJson <DocumentDbTests.Reading.Linq.IsNullNotNullArbitraryDepthTests.UserNested>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #17
0
        public DocumentDbTests.Bugs.Bug_849_not_node_not_correctly_evaluated.TestClass Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Bugs.Bug_849_not_node_not_correctly_evaluated.TestClass document;
            document = _serializer.FromJson <DocumentDbTests.Bugs.Bug_849_not_node_not_correctly_evaluated.TestClass>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity document;
            document = _serializer.FromJson <EventSourcingTests.Bugs.Bug_2025_event_inheritance_in_projection.Identity>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Bugs.Bug_717_permutation_of_Linq_queries.MainEntity Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <long>(0);

            DocumentDbTests.Bugs.Bug_717_permutation_of_Linq_queries.MainEntity document;
            document = _serializer.FromJson <DocumentDbTests.Bugs.Bug_717_permutation_of_Linq_queries.MainEntity>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Bugs.GuyWithIntArray Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Bugs.GuyWithIntArray document;
            document = _serializer.FromJson <DocumentDbTests.Bugs.GuyWithIntArray>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Reading.Linq.TypeWithInnerCollectionsWithJsonConverterAttribute Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Reading.Linq.TypeWithInnerCollectionsWithJsonConverterAttribute document;
            document = _serializer.FromJson <DocumentDbTests.Reading.Linq.TypeWithInnerCollectionsWithJsonConverterAttribute>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #22
0
        public EventSourcingTests.Projections.QuestParty Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            EventSourcingTests.Projections.QuestParty document;
            document = _serializer.FromJson <EventSourcingTests.Projections.QuestParty>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #23
0
        public DocumentDbTests.Bugs.MyClass Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <string>(0);

            DocumentDbTests.Bugs.MyClass document;
            document = _serializer.FromJson <DocumentDbTests.Bugs.MyClass>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car document;
            document = _serializer.FromJson <DocumentDbTests.Bugs.Bug_1219_ordering_by_attributes.Car>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #25
0
        public DocumentDbTests.Bugs.MartenStoredState <System.Collections.Generic.Dictionary <string, string> > Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Bugs.MartenStoredState <System.Collections.Generic.Dictionary <string, string> > document;
            document = _serializer.FromJson <DocumentDbTests.Bugs.MartenStoredState <System.Collections.Generic.Dictionary <string, string> > >(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public EventSourcingTests.Aggregation.when_using_inline_lambdas_to_define_the_projection.SystemState Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            EventSourcingTests.Aggregation.when_using_inline_lambdas_to_define_the_projection.SystemState document;
            document = _serializer.FromJson <EventSourcingTests.Aggregation.when_using_inline_lambdas_to_define_the_projection.SystemState>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Reading.Linq.Player Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Reading.Linq.Player document;
            document = _serializer.FromJson <DocumentDbTests.Reading.Linq.Player>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #28
0
        public DocumentDbTests.Writing.Identity.NonStandardDoc Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <string>(0);

            DocumentDbTests.Writing.Identity.NonStandardDoc document;
            document = _serializer.FromJson <DocumentDbTests.Writing.Identity.NonStandardDoc>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
Beispiel #29
0
        public DocumentDbTests.Writing.document_inserts.RecordDocument Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <System.Guid>(0);

            DocumentDbTests.Writing.document_inserts.RecordDocument document;
            document = _serializer.FromJson <DocumentDbTests.Writing.document_inserts.RecordDocument>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }
        public DocumentDbTests.Reading.Linq.PaginationTestDocument Resolve(System.Data.Common.DbDataReader reader)
        {
            var id = reader.GetFieldValue <string>(0);

            DocumentDbTests.Reading.Linq.PaginationTestDocument document;
            document = _serializer.FromJson <DocumentDbTests.Reading.Linq.PaginationTestDocument>(reader, 1);
            _session.MarkAsDocumentLoaded(id, document);
            return(document);
        }