Exemplo n.º 1
0
        //
        // .ctor
        //

        #region internal protected DBDatabaseProperties(...)

        /// <summary>
        /// Creates a new instance of the DBDatabaseProperties
        /// </summary>
        /// <param name="databaseName"></param>
        /// <param name="productName"></param>
        /// <param name="productLevel"></param>
        /// <param name="serverEdition"></param>
        /// <param name="parameterFormat"></param>
        /// <param name="version"></param>
        /// <param name="supports"></param>
        /// <param name="caseSensitive"></param>
        /// <param name="layout"></param>
        /// <param name="supportedDbTypes"></param>
        /// <param name="supportedTopTypes"></param>
        internal protected DBDatabaseProperties(string databaseName,
                                                string productName,
                                                string productLevel,
                                                string serverEdition,
                                                string parameterFormat,
                                                Version version,
                                                DBSchemaTypes supports,
                                                bool caseSensitive,
                                                DBParameterLayout layout,
                                                System.Data.DbType[] supportedDbTypes,
                                                TopType[] supportedTopTypes,
                                                Schema.DBSchemaInformation schemaInfo,
                                                TypedOperationCollection unsupportedOps)
        {
            this._vers              = version;
            this._edition           = serverEdition;
            this._productlevel      = productLevel;
            this._name              = productName;
            this._paramformat       = parameterFormat;
            this.SupportedSchemas   = supports;
            this.CaseSensitiveNames = caseSensitive;
            this.ParameterLayout    = layout;
            this.SupportedDbTypes   = supportedDbTypes;
            this.SupportedTopTypes  = supportedTopTypes;
            this._schemainfo        = schemaInfo;
            this._unsupportedOps    = unsupportedOps;
        }
Exemplo n.º 2
0
        protected virtual void FillNotSupported(TypedOperationCollection all)
        {
            Array values = Enum.GetValues(typeof(DBSchemaOperation));

            //We don't support databases
            DBSchemaTypes type = DBSchemaTypes.Database;

            foreach (DBSchemaOperation op in values)
            {
                all.Add(type, op);
            }

            //We don't support users
            type = DBSchemaTypes.User;
            foreach (DBSchemaOperation op in values)
            {
                all.Add(type, op);
            }

            //we don't support groups or roles
            type = DBSchemaTypes.Group;
            foreach (DBSchemaOperation op in values)
            {
                all.Add(type, op);
            }

            //can't create functions
            type = DBSchemaTypes.Function;
            foreach (DBSchemaOperation op in values)
            {
                if (op != DBSchemaOperation.Exec)
                {
                    all.Add(type, op);
                }
            }

            //can't create sprocs
            type = DBSchemaTypes.StoredProcedure;
            foreach (DBSchemaOperation op in values)
            {
                if (op != DBSchemaOperation.Exec)
                {
                    all.Add(type, op);
                }
            }
        }