Beispiel #1
0
        public void Alter(Action <MartenRegistry> configure)
        {
            var registry = new MartenRegistry();

            configure(registry);

            Alter(registry);
        }
        public void can_override_with_MartenRegistry()
        {
            var registry = new MartenRegistry();
            registry.For<Organization>().Searchable(x => x.Time2, pgType:"timestamp");

            var schema = new DocumentSchema(new StoreOptions(), null, null);
            schema.Alter(registry);

            schema.MappingFor(typeof(Organization)).DuplicatedFields.Single(x => x.MemberName == "Time2")
                .PgType.ShouldBe("timestamp");
        }
Beispiel #3
0
        public void can_override_with_MartenRegistry()
        {
            var registry = new MartenRegistry();

            registry.For <Organization>().Searchable(x => x.Time2, pgType: "timestamp");

            var schema = new DocumentSchema(new StoreOptions(), null, null);

            schema.Alter(registry);

            schema.MappingFor(typeof(Organization)).DuplicatedFields.Single(x => x.MemberName == "Time2")
            .PgType.ShouldBe("timestamp");
        }
Beispiel #4
0
 public void Include(MartenRegistry registry)
 {
     _storeOptions.Storage.IncludeDocumentMappingBuilders(registry._storeOptions.Storage);
 }
Beispiel #5
0
 public void Alter(MartenRegistry registry)
 {
     // TODO -- later, latch on MartenRegistry type? May not really matter
     registry.Alter(StoreOptions);
 }
 protected virtual void ConfigureSchema(MartenRegistry cfg)
 {
 }