Beispiel #1
0
        public static bool viewsEqual(View view1, View view2)
        {
            string ddl1 = Regex.Replace(ddl(view1, Dialect.generic),"\\s","");
            string ddl2 = Regex.Replace(ddl(view2, Dialect.generic),"\\s","");

            return ddl1 == ddl2;
        }
Beispiel #2
0
        public static string ddl(View view, Dialect dialect)
        {
            string sql = "";

            if (dialect == Dialect.sqlServer)
            {
                sql = view.platformDdl;
            }
            else
            {
                // sql = view.platformDdl.Replace(view.schema + ".", "");
                sql = view.platformDdl;
                sql = System.Text.RegularExpressions.Regex.Replace(sql, @"""", "");
                sql = sql.Replace(view.schema + ".", "");
            }

            //sql = view.platformDdl.Replace(view.schema + ".","");

            return sql;
        }