public Task <IStreamStore> GetStreamStore(string schema) { var settings = new PostgresStreamStoreSettings(ConnectionString) { Schema = schema, GetUtcNow = () => GetUtcNow() }; IStreamStore store = new PostgresStreamStore(settings); return(Task.FromResult(store)); }
public async Task <IStreamStore> GetStreamStore(string schema) { var settings = new PostgresStreamStoreSettings(ConnectionString) { Schema = schema, GetUtcNow = () => GetUtcNow() }; var store = new PostgresStreamStore(settings); return(store); }
public void Schema_creation_script_should_include_schema() { string schema = "custom_schema"; var store = new PostgresStreamStore(new PostgresStreamStoreSettings("server=.;database=sss") { Schema = schema, }); var sqlScript = store.GetSchemaCreationScript(); sqlScript.ToLowerInvariant().ShouldMatch("create schema if not exists " + schema); }
public void Can_export_database_creation_script() { string schema = "custom_schema"; var store = new PostgresStreamStore(new PostgresStreamStoreSettings("server=.;database=sss") { Schema = schema, }); var sqlScript = store.GetSchemaCreationScript(); sqlScript.ShouldBe(new Scripts(schema).CreateSchema); }
public override async Task <IStreamStore> GetStreamStore() { await CreateDatabase(); var settings = new PostgresStreamStoreSettings(ConnectionString) { Schema = _schema, GetUtcNow = () => GetUtcNow() }; var store = new PostgresStreamStore(settings); await store.DropAll(ignoreErrors : true); return(store); }
public async Task <IStreamStore> GetStreamStore(string schema) { await CreateDatabase(); var settings = new PostgresStreamStoreSettings(ConnectionString) { Schema = schema, GetUtcNow = () => GetUtcNow() }; var store = new PostgresStreamStore(settings); await store.CreateSchema(); return(store); }
public override async Task <IStreamStore> GetStreamStore() { await CreateDatabase(); var settings = new PostgresStreamStoreSettings(ConnectionString) { Schema = _schema, GetUtcNow = () => GetUtcNow(), ScavengeAsynchronously = false }; var store = new PostgresStreamStore(settings); await store.CreateSchema(); return(store); }
private async Task Init() { await _databaseManager.CreateDatabase(); var settings = new PostgresStreamStoreSettings(ConnectionString) { Schema = _schema, GetUtcNow = () => GetUtcNow(), ScavengeAsynchronously = false }; Store = new PostgresStreamStore(settings); if (_createSchema) { await Store.CreateSchemaIfNotExists(); } }