示例#1
0
 internal PgsqlUser(PgsqlUser basedOn) : base(basedOn)
 {
     Oid                    = basedOn.Oid;
     CanLogin               = basedOn.CanLogin;
     IsInherit              = basedOn.IsInherit;
     CanCreateDb            = basedOn.CanCreateDb;
     CanCreateRole          = basedOn.CanCreateRole;
     IsSuperUser            = basedOn.IsSuperUser;
     Replication            = basedOn.Replication;
     BypassRowLevelSecurity = BypassRowLevelSecurity;
     Config                 = (string[])basedOn.Config.Clone();
     ConnectionLimit        = basedOn.ConnectionLimit;
 }
示例#2
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);
        }
示例#3
0
        public override void Restore()
        {
            if (_backup == null)
            {
                return;
            }
            base.Restore();
            PgsqlUser u = (PgsqlUser)_backup;

            Oid                    = u.Oid;
            CanLogin               = u.CanLogin;
            IsInherit              = u.IsInherit;
            CanCreateDb            = u.CanCreateDb;
            CanCreateRole          = u.CanCreateRole;
            IsSuperUser            = u.IsSuperUser;
            Replication            = u.Replication;
            BypassRowLevelSecurity = BypassRowLevelSecurity;
            Config                 = (string[])u.Config.Clone();
            ConnectionLimit        = u.ConnectionLimit;
        }
示例#4
0
 public override void Backup()
 {
     _backup = new PgsqlUser(this);
 }