Example #1
0
 public override string MapType(Type type, Core.Data.DataFieldInfo dfi)
 {
     if (type.Namespace.Equals("MySql.Data.Types"))
     {
         return(type.Name.Replace("MySql", ""));
     }
     else
     {
         return(base.MapType(type, dfi));
     }
 }
Example #2
0
        public override string MapFieldType(FieldType type, Core.Data.DataFieldInfo dfi)
        {
            if (dfi.FieldLength.HasValue && dfi.FieldLength.Value == Int32.MaxValue)
            {//they want to store lots o' text, lets change the type to a text field here since mysql has a row limit
                if (type == FieldType.String)
                {
                    return(base.MapFieldType(FieldType.Text, dfi));
                }
                if (type == FieldType.UnicodeString)
                {
                    return(base.MapFieldType(FieldType.UnicodeText, dfi));
                }
            }

            return(base.MapFieldType(type, dfi));
        }