Esempio n. 1
0
 protected internal virtual void ReplaceTo(NamedObject target)
 {
     if (target == null)
     {
         return;
     }
     if (GetType() != target.GetType())
     {
         throw new ArgumentException();
     }
     if (target.Control == null && Control != null)
     {
         target.Control = Control;
     }
     Control = null;
     for (int i = Nodes.Count - 1; 0 <= i; i--)
     {
         TreeNode node = Nodes[i];
         if (node.Target == this)
         {
             node.Target = target;
             target.Nodes.Add(node);
         }
     }
     Nodes.Clear();
 }
Esempio n. 2
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            PgsqlBasicType t = (PgsqlBasicType)obj;

            return(InputFunction == t.InputFunction &&
                   OutputFunction == t.OutputFunction &&
                   ReceiveFunction == t.ReceiveFunction &&
                   SendFunction == t.SendFunction &&
                   TypmodInFunction == t.TypmodInFunction &&
                   TypmodOutFunction == t.TypmodOutFunction &&
                   AnalyzeFunction == t.AnalyzeFunction &&
                   InternalLength == t.InternalLength &&
                   PassedbyValue == t.PassedbyValue &&
                   Alignment == t.Alignment &&
                   Storage == t.Storage &&
                   Like == t.Like &&
                   Category == t.Category &&
                   Preferred == t.Preferred &&
                   Default == t.Default &&
                   Element == t.Element &&
                   Delimiter == t.Delimiter &&
                   Collatable == t.Collatable);
        }
Esempio n. 3
0
        //public override void Restore()
        //{
        //    if (_backup == null)
        //    {
        //        return;
        //    }
        //    RestoreFrom(_backup);
        //}

        public override bool ContentEquals(NamedObject obj)
        {
            SchemaObject o = (SchemaObject)obj;

            if (!base.ContentEquals(o))
            {
                if (Triggers.Count != o.Triggers.Count)
                {
                    return(false);
                }
            }
            foreach (Trigger t in Triggers)
            {
                int i = o.Triggers.IndexOf(t);
                if (i == -1)
                {
                    return(false);
                }
                if (!t.ContentEquals(o.Triggers[i]))
                {
                    return(false);
                }
            }
            return(true);
        }
Esempio n. 4
0
        public override bool ContentEquals(NamedObject obj)
        {
            Trigger t = obj as Trigger;

            return(base.ContentEquals(obj) &&
                   UpdateEventColumns.Equals(t.UpdateEventColumns) &&
                   (TableSchema == t.TableSchema) &&
                   (TableName == t.TableName) &&
                   (Definition == t.Definition));
        }
Esempio n. 5
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            PgsqlEnumType t = (PgsqlEnumType)obj;

            return(ArrayEquals(Labels, t.Labels));
        }
Esempio n. 6
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            CheckConstraint c = (CheckConstraint)obj;

            return(Condition == c.Condition);
        }
Esempio n. 7
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            KeyConstraint c = (KeyConstraint)obj;

            return(_isPrimary == c._isPrimary);
        }
Esempio n. 8
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            PgsqlDatabase db = (PgsqlDatabase)obj;

            return(Settings.ContentEquals(db.Settings));
        }
Esempio n. 9
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            Tablespace ts = (Tablespace)obj;

            return(Name == ts.Name &&
                   Path == ts.Path);
        }
Esempio n. 10
0
        //public override void Restore()
        //{
        //    base.Restore();
        //}

        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            PgsqlTablespace ts = (PgsqlTablespace)obj;

            return(Oid == ts.Oid &&
                   Owner == ts.Owner &&
                   ArrayEquals(Options, ts.Options));
        }
Esempio n. 11
0
 public override bool ContentEquals(NamedObject obj)
 {
     if (!base.ContentEquals(obj))
     {
         return(false);
     }
     return(DbaUserName == _backup.DbaUserName &&
            Encoding == _backup.Encoding &&
            DefaultTablespace == _backup.DefaultTablespace &&
            ConnectionInfo.Equals(_backup.ConnectionInfo) &&
            Version == _backup.Version &&
            DictionaryEquals(_attributes, _backup._attributes));
 }
Esempio n. 12
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            ForeignKeyConstraint c = (ForeignKeyConstraint)obj;

            return(ReferenceSchemaName == c.ReferenceSchemaName &&
                   ReferenceConstraintName == c.ReferenceConstraintName &&
                   UpdateRule == c.UpdateRule &&
                   DeleteRule == c.DeleteRule);
        }
Esempio n. 13
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (GetType() != obj.GetType())
            {
                return(false);
            }
            if (Identifier != obj.Identifier)
            {
                return(false);
            }
            Comment c = (Comment)obj;

            return(Text == c.Text);
        }
Esempio n. 14
0
        //public override void Restore()
        //{
        //    RestoreFrom(_backup);
        //}
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            Constraint c = (Constraint)obj;

            return(TableSchema == c.TableSchema &&
                   TableName == c.TableName &&
                   IsTemporaryName == c.IsTemporaryName &&
                   Deferrable == c.Deferrable &&
                   Deferred == c.Deferred);
        }
Esempio n. 15
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            User u = (User)obj;

            return(Id == u.Id &&
                   Name == u.Name &&
                   Password == u.Password &&
                   IsPasswordShadowed == u.IsPasswordShadowed &&
                   PasswordExpiration == u.PasswordExpiration);
        }
Esempio n. 16
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            PgsqlRangeType t = (PgsqlRangeType)obj;

            return(Subtype == t.Subtype &&
                   SubtypeOpClass == t.SubtypeOpClass &&
                   Collation == t.Collation &&
                   CanonicalFunction == t.CanonicalFunction &&
                   SubtypeDiff == t.SubtypeDiff);
        }
Esempio n. 17
0
 public virtual bool ContentEquals(NamedObject obj)
 {
     if (obj == null)
     {
         return(false);
     }
     if (GetType() != obj.GetType())
     {
         return(false);
     }
     if (Identifier != obj.Identifier)
     {
         return(false);
     }
     return(true);
 }
Esempio n. 18
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            Column c = (Column)obj;

            return(BaseType == c.BaseType &&
                   DataLength == c.DataLength &&
                   Precision == c.Precision &&
                   WithTimeZone == c.WithTimeZone &&
                   DataType == c.DataType &&
                   DefaultValue == c.DefaultValue &&
                   NotNull == c.NotNull &&
                   CommentText == c.CommentText);
        }
Esempio n. 19
0
 public static void SetDependency(NamedObject from, NamedObject to)
 {
     if (from == null || to == null)
     {
         return;
     }
     if (from.Dependencies == null)
     {
         from.Dependencies = new SortedList <string, NamedObject>();
     }
     if (to.DependOn == null)
     {
         to.DependOn = new SortedList <string, NamedObject>();
     }
     from.Dependencies[to.GetIdentifier()] = to;
     to.DependOn[from.GetIdentifier()]     = from;
 }
Esempio n. 20
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            PgsqlUser u = (PgsqlUser)_backup;

            return(Oid == u.Oid &&
                   CanLogin == u.CanLogin &&
                   IsInherit == u.IsInherit &&
                   CanCreateDb == u.CanCreateDb &&
                   CanCreateRole == u.CanCreateRole &&
                   IsSuperUser == u.IsSuperUser &&
                   Replication == u.Replication &&
                   BypassRowLevelSecurity == BypassRowLevelSecurity &&
                   ArrayEquals(Config, u.Config) &&
                   ConnectionLimit == u.ConnectionLimit);
        }
Esempio n. 21
0
        public override bool ContentEquals(NamedObject obj)
        {
            if (!base.ContentEquals(obj))
            {
                return(false);
            }
            Selectable s = (Selectable)obj;

            if (Columns.Count != s.Columns.Count)
            {
                return(false);
            }
            for (int i = 0; i < Columns.Count; i++)
            {
                if (!Columns[i].ContentEquals(s.Columns[i]))
                {
                    return(false);
                }
            }
            return(true);
        }