private void UpdateProjection(string name, string expectedQuery)
        {
            _console.Important("Update existing projection: " + name);

            var currentQuery = _projections.GetQuery(name, EventStoreCredentials.Default);

            if (expectedQuery != currentQuery)
            {
                _projections.UpdateQuery(name, expectedQuery, EventStoreCredentials.Default);
            }
        }
Exemplo n.º 2
0
        public static void ShowQuery(ProjectionsManager manager, string[] commandArgs)
        {
            var nameAndCredentials = GetProjectionNameAndCredentials(commandArgs);

            if (nameAndCredentials == null)
            {
                Log("Invalid arguments, should be: <projection-name> [<login> <password>].");
                return;
            }
            var name = nameAndCredentials.Item1;

            Log("{0}'s query :", name);
            LogUnformatted(manager.GetQuery(name, nameAndCredentials.Item2));
        }
Exemplo n.º 3
0
 public string GetQuery(string projectionName)
 {
     return(projectionsManager.GetQuery(projectionName, userCredentials));
 }