public static string AskUserForAuthenticationInformation()
        {
            InitialUserPrompts();
            var sqlToolAuthenticationInfo = new SqlToolAuthenticationInformation();

            return(sqlToolAuthenticationInfo.GetPostgresConnectionString());
        }
        public async Task Setup()
        {
            Host = "databank.c9mrseu2nxwi.us-east-1.rds.amazonaws.com";
            var ignore = new Ignore();

            Username = ignore.Username;
            Password = ignore.Password;
            Database = ignore.Database;
            Port     = 5432;

            LoginInfo = new SqlToolAuthenticationInformation(Host, Username, Password, Database, Port);
            var sqlToolAuthenticationInformation = new SqlToolAuthenticationInformation();
            var connectionString = sqlToolAuthenticationInformation.GetPostgresConnectionString();

            setupInsertRepo        = new InsertRepository();
            selectKeysList         = new List <string>(new string[] { "firstname", "lastname", "email", "created_date", "address", "city", "state", "zip" });
            selectValuesList       = new List <string>(new string[] { "Tyler", "Durden", "*****@*****.**", "420 Paper St.", "Wilmington", "DE", "19886" });
            verifyUpdateValuesList = new List <string>(new string[] { "Brad", "Pitt", "*****@*****.**", "8/18/1980 12:00:00 AM" });

            await setupInsertRepo.Command(connString, "Insert into people (firstname, lastname, email, created_date) values ('Robert', 'Paulson', '*****@*****.**', current_timestamp)");

            await setupInsertRepo.Command(connString, "Insert into people (firstname, lastname, email, created_date) values ('Tyler', 'Durden', '*****@*****.**', current_timestamp)");

            await setupInsertRepo.Command(connString, "Insert into address (pid, address, city, state, zip, created_on) " +
                                          " values ((select id from people where email = '*****@*****.**'), '420 Paper St.', 'Wilmington', 'DE', '19886', current_timestamp)");

            await setupInsertRepo.Command(connString, "Insert into people (firstname, lastname, email, created_date) values ('Edward', 'Norton', '*****@*****.**', current_timestamp)");
        }
        public static SqlToolAuthenticationInformation InitialUserPrompts()
        {
            var userCredentials = new SqlToolAuthenticationInformation();
            var inputs          = new List <string>();

            foreach (var ac in SqlToolAuthenticationInformation.ListOfAttestationCharacteristics)
            {
                Console.WriteLine("Enter " + ac);
                inputs.Add(Console.ReadLine());
                Console.WriteLine();
            }
            if (inputs[0] != "")
            {
                userCredentials.Host = inputs[0];
            }
            userCredentials.Username = inputs[1];
            userCredentials.Password = inputs[2];
            userCredentials.Database = inputs[3];
            int  port;
            bool portIsInt = Int32.TryParse(inputs[4], out port);

            if (portIsInt)
            {
                userCredentials.Port = port;
            }
            else
            {
                Console.WriteLine("Invalid Port");
            }

            if (userCredentials.Host == "HATCH" || userCredentials.Host == "hatch" || userCredentials.Host == "Hatch")
            {
                Console.WriteLine("http://www.enterthehatch.com/");
            }
            return(userCredentials);
        }