Esempio n. 1
0
        public static TableInfo GetInstance(DataConnectionSpec dcs)
        {
            if (dcs == null)
            {
                return(new MySqlTableInfo(null));
            }

            DataVendor vendor = DataManager.GetVendor(dcs);

            switch (vendor)
            {
            case DataVendor.MySql:
                return(new MySqlTableInfo(dcs));

            case DataVendor.SqlServer:
                return(new SqlServerTableInfo(dcs));

            case DataVendor.Oracle:
                return(new OracleTableInfo(dcs));

            case DataVendor.PostgreSql:
                return(new PostgreSqlTableInfo(dcs));
            }

            throw new NotImplementedException(getDisplayMember("GetInstance", "TableInfo class for {0} is not mapped through TableInfo.GetInstance().", vendor.ToString()));
        }
Esempio n. 2
0
        public static ConstraintInfo GetInstance(TableInfo parent)
        {
            DataVendor vendor = DataManager.GetVendor(parent.DataConnectionSpec);

            switch (vendor)
            {
            case DataVendor.MySql:
                return(new MySqlConstraintInfo(parent));

            case DataVendor.SqlServer:
                return(new SqlServerConstraintInfo(parent));

            case DataVendor.Oracle:
                return(new OracleConstraintInfo(parent));

            case DataVendor.PostgreSql:
                return(new PostgreSqlConstraintInfo(parent));
            }

            throw new NotImplementedException(getDisplayMember("GetInstance", "ConstraintInfo class for {0} is not mapped through ConstraintInfo.GetInstance().", vendor.ToString()));
        }
Esempio n. 3
0
        private static ADataLoader GetDataLoader(DataVendor vendor, ADBInstance instance)
        {
            switch (vendor)
            {
            case DataVendor.CaiHui:
                return(new DataLoaderCH(instance));

            case DataVendor.Wind:
                throw new NotImplementedException();

            case DataVendor.JuYuan:
                throw new NotImplementedException();

            case DataVendor.DZH:
                throw new NotImplementedException();

            case DataVendor.ZhaoYang:
                throw new NotImplementedException();

            default:
                throw new NotImplementedException();
            }
        }
Esempio n. 4
0
        public static void Initiate(DataVendor vendor, DatabaseType type, string conn)
        {
            ADBInstance db = GetDBInstance(type, conn);

            _DataLoader = GetDataLoader(vendor, db);
        }