Пример #1
0
        public void TestRemoveSqlPunctuation1()
        {
            const string input    = "select * from [database].[schema].[table];";
            const string expected = "select * from  database   schema   table  ";

            Assert.AreEqual(expected, SqlStrings.RemoveSqlPunctuation(input));
        }
Пример #2
0
        private static string SqlTransform(object sql)
        {
            const string space = " ";
            var          clean = Strings.SplitTitleCase(SqlStrings.RemoveSqlPunctuation(sql), space).ToLower();

            return(sql.ToString().ToLower() + " " + string.Join(space, clean.Split(space.ToCharArray(), StringSplitOptions.RemoveEmptyEntries).Distinct()));
        }