Ejemplo n.º 1
0
 public MQTIndex(MQT mqt, string name, bool nonUnique, short type)
 {
     this.mqt = mqt;
     this.name = name;
     this.nonUnique = nonUnique;
     this.type = type;
 }
Ejemplo n.º 2
0
        public static bool mqtsEqual(MQT mqt1, MQT mqt2)
        {
            string ddl1 = Regex.Replace(ddl(mqt1, Dialect.db2), "\\s", "");
            string[] ddl1Value = Regex.Split(ddl1.ToUpper(), "datainitiallydeferred".ToUpper());
            ddl1 = ddl1Value[0];

            string ddl2 = Regex.Replace(ddl(mqt2, Dialect.db2), "\\s", "");
            string[] ddl2Value = Regex.Split(ddl2.ToUpper(), "datainitiallydeferred".ToUpper());
            ddl2 = ddl2Value[0];

            return ddl1 == ddl2;
        }
Ejemplo n.º 3
0
        public static string ddl(MQT mqt, Dialect dialect)
        {
            string sql = "";
            if (dialect == Dialect.db2)
            {
                //sql = mqt.platformDdl.Replace(mqt.schema + ".", "");
                sql = mqt.platformDdl;
                sql = System.Text.RegularExpressions.Regex.Replace(sql, @"""", "");
                sql = sql.Replace(mqt.schema + ".", "");
            }
            else
                sql = mqt.platformDdl;

            sql = System.Text.RegularExpressions.Regex.Replace(sql, @"\s{2,}", " ");
            return sql;
        }