public static string SqlDecl(DirectTableMappingColumn p, bool storeDateTimeAsTicks) { string decl = "\"" + p.Name + "\" " + SqlType(p, storeDateTimeAsTicks) + " "; if (p.IsPK) { decl += "primary key "; } if (p.IsAutoInc) { decl += "autoincrement "; } if (!p.IsNullable) { decl += "not null "; } if (!string.IsNullOrEmpty(p.Collation)) { decl += "collate " + p.Collation + " "; } return(decl); }
public static string SqlType(DirectTableMappingColumn column, bool storeDateTimeAsTicks = false) { return(SqlType(column.TargetType, column.MaxStringLength, storeDateTimeAsTicks)); }