public void GivenASqlScriptProvider()
 {
     _templateEngine = TemplateEngine.Default;
     _scriptProvider = new SqlScriptProvider(_templateEngine);
     _schemaSettings = new EventStoreDatabaseSchemaSettings(
         "UnitTesting",
         false,
         "Events_Test",
         "ProjectionIndex_Test",
         "ProjectionCheckpoint_Test");
 }
Exemplo n.º 2
0
 public OracleEventStore(Func <OracleConnection> connectionFactory, EventStoreDatabaseSchemaSettings schemaSettings, ISqlScriptProvider scriptProvider)
 {
     if (connectionFactory == null)
     {
         throw new ArgumentNullException(nameof(connectionFactory));
     }
     if (schemaSettings == null)
     {
         throw new ArgumentNullException(nameof(schemaSettings));
     }
     if (scriptProvider == null)
     {
         throw new ArgumentNullException(nameof(scriptProvider));
     }
     _connectionFactory = connectionFactory;
     _schemaSettings    = schemaSettings;
     _scriptProvider    = scriptProvider;
 }
Exemplo n.º 3
0
        public async Task <string> GetInitializationScriptAsync(EventStoreDatabaseSchemaSettings schemaSettings)
        {
            var template = await GetScriptTemplateAsync("CreateTables.template.sql");

            return(TemplateEngine.Generate(template, schemaSettings));
        }