public TenantSchema(StoreOptions options, Tenant tenant) { _features = options.Storage; _tenant = tenant; StoreOptions = options; DdlRules = options.Advanced.DdlRules; }
public Tenant(StorageFeatures features, StoreOptions options, IConnectionFactory factory, string tenantId) { TenantId = tenantId; _features = features; _options = options; _factory = factory; resetSequences(); }
public MartenDatabase(StoreOptions options, IConnectionFactory factory, string identifier) : base(options, options.AutoCreateSchemaObjects, options.Advanced.Migrator, identifier, factory.Create) { _features = options.Storage; _options = options; resetSequences(); Providers = options.Providers; }
public void RemoveSchemaItems(Type featureType, StorageFeatures features) { var feature = features.FindFeature(featureType); var writer = new StringWriter(); foreach (var schemaObject in feature.Objects) { schemaObject.WriteDropStatement(_options.DdlRules, writer); } _factory.RunSql(writer.ToString()); }
public Tenant(StorageFeatures features, StoreOptions options, IConnectionFactory factory, string tenantId) { TenantId = tenantId; _features = features; _options = options; _factory = factory; resetSequences(); Providers = options.AutoCreateSchemaObjects == AutoCreate.None ? options.Providers : new StorageCheckingProviderGraph(this, options.Providers); }
internal void IncludeDocumentMappingBuilders(StorageFeatures includedStorage) { foreach (var builder in includedStorage._builders.Values) { if (_builders.TryGetValue(builder.DocumentType, out var existing)) { existing.Include(builder); } else { _builders.Add(builder.DocumentType, builder); } } }
// TODO -- need to name the databases some how public MartenDatabase(StoreOptions options, IConnectionFactory factory, string tenantId) : base(options, options.AutoCreateSchemaObjects, options.Advanced.Migrator, "Marten", factory.Create) { TenantId = tenantId; _features = options.Storage; _options = options; _factory = factory; resetSequences(); Providers = options.AutoCreateSchemaObjects == AutoCreate.None ? options.Providers : new StorageCheckingProviderGraph(this, options.Providers); }
public TenantSchema(StoreOptions options, Tenant tenant) { _features = options.Storage; _tenant = tenant; StoreOptions = options; }