Ejemplo n.º 1
0
    def diff_privileges(self, inobj):
        """Generate SQL statements to grant or revoke privileges

        :param inobj: a YAML map defining the input object
        :return: list of SQL statements
        """
        return diff_privs(self, self.privileges, inobj, inobj.privileges)
Ejemplo n.º 2
0
    def diff_privileges(self, inobj):
        """Generate SQL statements to grant or revoke privileges

        :param inobj: a YAML map defining the input object
        :return: list of SQL statements
        """
        return diff_privs(self, self.privileges, inobj, inobj.privileges)
Ejemplo n.º 3
0
    def diff_privileges(self, incol):
        """Generate SQL statements to grant or revoke privileges

        :param incol: a YAML map defining the input column
        :return: list of SQL statements
        """
        return [diff_privs(self._table, self.privileges, incol._table,
                           incol.privileges, self.name)]
Ejemplo n.º 4
0
    def diff_privileges(self, incol):
        """Generate SQL statements to grant or revoke privileges

        :param incol: a YAML map defining the input column
        :return: list of SQL statements
        """
        return [diff_privs(self._table, self.privileges, incol._table,
                           incol.privileges, self.name)]
Ejemplo n.º 5
0
    def diff_privileges(self, inobj):
        """Generate SQL statements to grant or revoke privileges

        :param inobj: a YAML map defining the input object
        :return: list of SQL statements
        """
        stmts = []
        currprivs = self.privileges if hasattr(self, 'privileges') else {}
        newprivs = inobj.privileges if hasattr(inobj, 'privileges') else {}
        stmts.append(diff_privs(self, currprivs, inobj, newprivs))
        return stmts
Ejemplo n.º 6
0
    def diff_privileges(self, incol):
        """Generate SQL statements to grant or revoke privileges

        :param incol: a YAML map defining the input column
        :return: list of SQL statements
        """
        stmts = []
        currprivs = self.privileges if hasattr(self, 'privileges') else {}
        newprivs = incol.privileges if hasattr(incol, 'privileges') else {}
        stmts.append(diff_privs(self._table, currprivs, incol._table, newprivs,
                                self.name))
        return stmts