Exemple #1
0
        public PostgreSQL(string cs)
        {
            //SearchPath=wtr..
            //searchpath=schemanamehere..
            //NpgsqlConnection conn = new NpgsqlConnection(cs);
            //"Server=127.0.0.1;Database=eeeeee;User id=npgsql_tests;password=npgsql_tests;");
            ConnectionString = cs;

            Name = ConnectionStringUtility.GetToken(cs, "Database", "");
            var pw = ConnectionStringUtility.GetToken(cs, "password", "");
            var logSafeConnectionString = cs;

            if (pw.Trim() != "")
            {
                logSafeConnectionString = logSafeConnectionString.ToLower().Replace(pw, "*******");
            }

            SqlCommands.Add(logSafeConnectionString);
        }