public static void addDefinition(string name, bool hasLenght, bool hasSperatedValues, bool isDate, bool isNumeric, bool isString, bool canCollate) { CreationTemplate crTemp = new CreationTemplate(); crTemp.name = name; crTemp.hasLength = hasLenght; crTemp.hasSperatedValues = hasSperatedValues; crTemp.isDate = isDate; crTemp.isNumeric = isNumeric; crTemp.isString = isString; crTemp.canCollate = canCollate; CreationTemplateDefinitions.addDefinition(crTemp); }
public string getSql() { string sql = "`" + this.name + "` "; CreationTemplate crTempl = CreationTemplateDefinitions.getTemplateByName(this.dataType); sql += this.dataType; if (null != crTempl) { if (crTempl.hasLength && this.length > 0) { sql += "(" + this.length + ") "; } } sql += " "; if (this.defaultValue.Length > 0) { this.defaultValue.Replace("'", ""); sql += "DEFAULT '" + this.defaultValue + "'"; } return(sql); }
public static void addDefinition(CreationTemplate def) { creationDefintion.Add(def); }