示例#1
0
        public override DbTypeBase ToGenericType()
        {
            var res = new DbTypeBlob();

            res.SetSpecificAttribute("effiproz", "maxbytes", MaxBytes.ToString());
            return(res);
        }
示例#2
0
        public override DbTypeBase ToGenericType()
        {
            var res = new DbTypeBlob();

            res.SetSpecificAttribute("oracle", "subtype", "longraw");
            return(res);
        }
示例#3
0
        public override DbTypeBase ToGenericType()
        {
            DbTypeBlob res = new DbTypeBlob();

            res.SetSpecificAttribute("mssql", "subtype", "variant");
            return(res);
        }
示例#4
0
        public override DbTypeBase ToGenericType()
        {
            DbTypeBlob res = new DbTypeBlob();

            res.SetSpecificAttribute("mysql", "subtype", "meduimblob");
            return(res);
        }
示例#5
0
        public ISpecificType GetMySqlTypeBlob(DbTypeBlob type, IMySqlMigrationProfile profile, IProgressInfo progress)
        {
            string attr = type.GetSpecificAttribute("mysql", "subtype");

            if (attr == "tinyblob")
            {
                return(new MySqlTypeTinyBlob());
            }
            if (attr == "blob")
            {
                return(new MySqlTypeBlob());
            }
            if (attr == "mediumblob")
            {
                return(new MySqlTypeMediumBlob());
            }
            if (attr == "longblob")
            {
                return(new MySqlTypeLongBlob());
            }
            if (profile != null)
            {
                switch (profile.BlobAffinity)
                {
                case MySqlBlobAffinity.TinyBlob: return(new MySqlTypeTinyBlob());

                case MySqlBlobAffinity.Blob: return(new MySqlTypeBlob());

                case MySqlBlobAffinity.MediumBlob: return(new MySqlTypeMediumBlob());

                case MySqlBlobAffinity.LongBlob: return(new MySqlTypeLongBlob());
                }
            }
            return(new MySqlTypeBlob());
        }
示例#6
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);
        }
示例#7
0
        public override DbTypeBase ToGenericType()
        {
            var res = new DbTypeBlob();

            return(res);
        }
示例#8
0
        protected override DbTypeBase ToGenericTypeNoArray()
        {
            DbTypeBlob res = new DbTypeBlob();

            return(res);
        }