Beispiel #1
0
        private bool OkToScript(SQLObjectType sot, string schema, string name)
        {
            bool answer = false;

            if (!sot.Script)
            {
                return(answer);
            }

            if (sot.SQLObjects.Count == 0)
            {
                answer = true;
            }
            else
            {
                foreach (SQLObject so in sot.SQLObjects)
                {
                    SQLObjectAction soa = so.CheckAction(schema, name);
                    if (soa == SQLObjectAction.MatchedAndDoNotScript)
                    {
                        answer = false;
                        break;
                    }
                    else if (soa == SQLObjectAction.MatchedAndScript)
                    {
                        answer = true;
                        break;
                    }
                }
            }
            return(answer);
        }
Beispiel #2
0
        public static ISQLObject CreateSQLObject(string name, SQLObjectType sQLObjectType)
        {
            try
            {
                if (string.IsNullOrEmpty(name))
                {
                    throw new MissingParameterException("name", "SQLObjectFactory.CreateSQLObject(string name, SQLObjectType sQLObjectType)", "SQLObjectFactory was passed an empty or null name string");
                }

                return(new MuteableSQLObject(name, sQLObjectType));
            }
            catch (Exception)
            {
                throw;
            }
        }
Beispiel #3
0
 public MuteableSQLObject(string name, SQLObjectType sQLObjectType)
 {
     globalName          = name;
     globalSQLObjectType = sQLObjectType;
 }