Logo Search packages:      
Sourcecode: relational version File versions  Download package

def relational::relation::relation::rearrange (   self,
  other 
)
If two relations share the same attributes in a different order, this method
will use projection to make them have the same attributes' order.
It is not exactely related to relational algebra. Just a method used 
internally.
Will return None if they don't share the same attributes

Definition at line 89 of file relation.py.

                             :
        '''If two relations share the same attributes in a different order, this method
        will use projection to make them have the same attributes' order.
        It is not exactely related to relational algebra. Just a method used 
        internally.
        Will return None if they don't share the same attributes'''
        if (self.__class__!=other.__class__):
            return None
        if self.header.sharedAttributes(other.header) == len(self.header.attributes) == len(other.header.attributes):
            return other.projection(list(self.header.attributes))
        return None
        

Generated by  Doxygen 1.6.0   Back to index