Contact: fumanchu@aminus.org

Log in as guest/geniusql to create tickets

Changeset 22

Show
Ignore:
Timestamp:
03/06/07 18:05:51
Author:
fumanchu
Message:

Renamed Bijection.inverse to 'key_for'.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/geniusql/objects.py

    r21 r22  
    1313    """Bijective dict. Each key maps to only one value (and vice-versa).""" 
    1414     
    15     def inverse(self, value): 
     15    def key_for(self, value): 
    1616        """For the given value, return its corresponding key.""" 
    1717        for key, val in self.iteritems(): 
  • trunk/geniusql/providers/ado.py

    r21 r22  
    10841084    isolation_levels = ["READ UNCOMMITTED",] 
    10851085     
    1086     def __init__(self, db): 
    1087         self.transactions = {} 
    1088         self.db = db 
     1086    def _set_factory(self): 
    10891087        # MS Access can't use a pool, because there doesn't seem 
    10901088        # to be a commit timeout. See http://support.microsoft.com/kb/200300 
  • trunk/geniusql/select.py

    r21 r22  
    557557        if colkey in self.result: 
    558558            # Get the key for the table. 
    559             colkey = '%s_%s' % (table.schema.inverse(table), colkey) 
     559            colkey = '%s_%s' % (table.schema.key_for(table), colkey) 
    560560            newcol.name = '%s_%s' % (table.name, newcol.name) 
    561561            newcol.qname = table.schema.db.quote(newcol.name) 
     
    653653        """ 
    654654        if path is None: 
    655             schema = B.table.schema 
    656             for tkey in schema: 
    657                 if schema[tkey] is B.table: 
    658                     path = tkey 
    659                     break 
     655            path = B.table.schema.key_for(B.table) 
    660656        ref = A.table.references.get(path, None) 
    661657        if ref: