예제 #1
0
        private string GetElementCmd()
        {
            string element = "";
            string primark = " PRIMARY KEY ( `RowId`";

            foreach (Element e in elementList)
            {
                element += string.Format(" `{0}`", e.keyName);
                element += MySqlTemplate.GetDataTypeCmd(e.dataType);
                if (e.isNotNull)
                {
                    element += " NOT NULL";
                }
                element += ",";
                if (e.isPrimarkKey)
                {
                    primark += string.Format(", `{0}`", e.keyName);
                }
            }
            primark += "))ENGINE=InnoDB" + MySqlTemplate.GetEncodingCmd(encoding);
            return(element + primark);
        }