Ejemplo n.º 1
0
        public override DbTypeBase ToGenericType()
        {
            DbTypeText res = new DbTypeText();

            res.IsUnicode = false;
            return(res);
        }
Ejemplo n.º 2
0
        public override DbTypeBase ToGenericType()
        {
            var res = new DbTypeText();

            res.IsUnicode = true;
            return(res);
        }
Ejemplo n.º 3
0
        public override DbTypeBase ToGenericType()
        {
            DbTypeText res = new DbTypeText();

            res.SetSpecificAttribute("mysql", "subtype", SqlName);
            return(res);
        }
Ejemplo n.º 4
0
        public override DbTypeBase ToGenericType()
        {
            var res = new DbTypeText();

            res.SetSpecificAttribute("oracle", "subtype", "long");
            return(res);
        }
Ejemplo n.º 5
0
        protected override DbTypeBase ToGenericTypeNoArray()
        {
            DbTypeText res = new DbTypeText();

            res.SetSpecificAttribute("pgsql", "subtype", SqlName);
            return(res);
        }
Ejemplo n.º 6
0
        public override DbTypeBase ToGenericType()
        {
            DbTypeText res = new DbTypeText();

            res.IsUnicode = false;
            res.SetSpecificAttribute("effiproz", "maxbytes", MaxBytes.ToString());
            return(res);
        }
Ejemplo n.º 7
0
        public override DbTypeBase ToGenericType()
        {
            DbTypeText res = new DbTypeText();

            res.IsUnicode = false;
            res.SetSpecificAttribute("mysql", "subtype", "longtext");
            return(res);
        }
Ejemplo n.º 8
0
        ITableStructure GetStructure(DbfFile dbf)
        {
            var res = new TableStructure();

            //output column names
            for (int i = 0; i < dbf.Header.ColumnCount; i++)
            {
                DbTypeBase type;
                // convert DBF type to DA type
                switch (dbf.Header[i].ColumnType)
                {
                case DbfColumn.DbfColumnType.Binary:
                    type = new DbTypeBlob();
                    break;

                case DbfColumn.DbfColumnType.Boolean:
                    type = new DbTypeLogical();
                    break;

                case DbfColumn.DbfColumnType.Date:
                    type = new DbTypeDatetime {
                        SubType = DbDatetimeSubType.Date
                    };
                    break;

                case DbfColumn.DbfColumnType.Character:
                    type = new DbTypeString {
                        Length = dbf.Header[i].Length
                    };
                    break;

                case DbfColumn.DbfColumnType.Integer:
                    type = new DbTypeInt();
                    break;

                case DbfColumn.DbfColumnType.Memo:
                    type = new DbTypeText();
                    break;

                case DbfColumn.DbfColumnType.Number:
                    type = new DbTypeNumeric {
                        Precision = dbf.Header[i].DecimalCount
                    };
                    break;

                default:
                    type = new DbTypeString();
                    break;
                }
                res.AddColumn(dbf.Header[i].Name, type);
            }
            return(res);
        }
Ejemplo n.º 9
0
        private MySqlTypeBase GetMySqlTypeText(DbTypeText type, IMySqlMigrationProfile profile, IProgressInfo progress)
        {
            string attr = null;

            if (type != null)
            {
                attr = type.GetSpecificAttribute("mysql", "subtype");
            }
            if (attr != null)
            {
                switch (attr)
                {
                case "tinytext": return(new MySqlTypeTinyText());

                case "text": return(new MySqlTypeText());

                case "mediumtext": return(new MySqlTypeMediumText());

                case "longtext": return(new MySqlTypeLongText());

                case "geometry": return(new MySqlTypeGeometry());

                case "point": return(new MySqlTypePoint());

                case "linestring": return(new MySqlTypeLineString());

                case "polygon": return(new MySqlTypePolygon());

                case "mutlipoint": return(new MySqlTypeMultiPoint());

                case "mutlilinestring": return(new MySqlTypeMultiLineString());

                case "mutlipolygon": return(new MySqlTypeMultiPolygon());

                case "geometrycollection": return(new MySqlTypeGeometryCollection());
                }
            }

            if (profile != null)
            {
                switch (profile.TextAffinity)
                {
                case MySqlTextAffinity.TinyText: return(new MySqlTypeTinyText());

                case MySqlTextAffinity.Text: return(new MySqlTypeText());

                case MySqlTextAffinity.MediumText: return(new MySqlTypeMediumText());

                case MySqlTextAffinity.LongText: return(new MySqlTypeLongText());
                }
            }
            return(new MySqlTypeText());
        }
Ejemplo n.º 10
0
        private ISpecificType GetPostgreSqlTypeText(DbTypeText type)
        {
            string subtype = type.GetSpecificAttribute("pgsql", "subtype");

            switch (subtype)
            {
            case "box2d": return(new PostGISTypeBox2D());

            case "box3d": return(new PostGISTypeBox3D());

            case "box3d_extent": return(new PostGISTypeBox3D_Extent());

            case "geometry": return(new PostGISTypeGeometry());

            case "geometry_dump": return(new PostGISTypeGeometry_Dump());

            case "geography": return(new PostGISTypeGeography());
            }
            return(new PostgreSqlTypeText());
        }
Ejemplo n.º 11
0
        protected override DbTypeBase ToGenericTypeNoArray()
        {
            DbTypeText res = new DbTypeText();

            return(res);
        }