예제 #1
0
        public void AlterStoredProcedure(StoredProcedureInfo obj)
        {
            var oldObj = _database.FindStoredProcedure(obj);

            if (oldObj != null)
            {
                string gid = oldObj.GroupId;
                oldObj.Assign(obj);
                oldObj.GroupId = gid;
            }
        }
예제 #2
0
        private void FillWorkingSets()
        {
            if (_options.TableOptions.AllTables)
            {
                _tables.AddRange(_database.Tables);
            }
            else
            {
                _tables.AddRange(_options.TableOptions.TableFilter.Select(x => _database.FindTable(x)).Where(x => x != null));
            }

            if (_options.ViewOptions.AllObjects)
            {
                _views.AddRange(_database.Views);
            }
            else
            {
                _views.AddRange(_options.ViewOptions.ObjectFilter.Select(x => _database.FindView(x)).Where(x => x != null));
            }

            if (_options.StoredProcedureOptions.AllObjects)
            {
                _storedProcedures.AddRange(_database.StoredProcedures);
            }
            else
            {
                _storedProcedures.AddRange(_options.StoredProcedureOptions.ObjectFilter.Select(x => _database.FindStoredProcedure(x)).Where(x => x != null));
            }

            if (_options.FunctionOptions.AllObjects)
            {
                _functions.AddRange(_database.Functions);
            }
            else
            {
                _functions.AddRange(_options.FunctionOptions.ObjectFilter.Select(x => _database.FindFunction(x)).Where(x => x != null));
            }
        }