Contact: fumanchu@aminus.org

Log in as guest/geniusql to create tickets

Changeset 33

Show
Ignore:
Timestamp:
03/13/07 20:06:47
Author:
fumanchu
Message:

Fluff.

Files:

Legend:

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

    r32 r33  
    414414     
    415415    def __init__(self): 
    416         # Make a copy of the class-level 'dict 
     416        # Make a copy of the class-level dict 
    417417        self._reverse_types = self._reverse_types.copy() 
    418418     
  • trunk/geniusql/providers/ado.py

    r32 r33  
    522522         
    523523        cols = [] 
    524         pytype = self.db.typeadapter.python_type 
     524        get_pytype = self.db.typeadapter.python_type 
    525525        for row in data: 
    526526            # I tried passing criteria to OpenSchema, but passing None is 
     
    530530             
    531531            dbtype = dbtypes[row[11]] 
     532            pytype = get_pytype(dbtype) 
     533             
    532534            default = row[8] 
    533535            if default is not None: 
    534                 deftype = pytype(dbtype) 
    535                 if issubclass(deftype, (int, long, float)): 
     536                if issubclass(pytype, (int, long, float)): 
    536537                    # We may have stuck extraneous quotes in the default 
    537538                    # value when using numeric defaults with MSAccess. 
    538539                    if default.startswith("'") and default.endswith("'"): 
    539540                        default = default[1:-1] 
    540                 default = deftype(default) 
     541                default = pytype(default) 
    541542             
    542543            name = str(row[3]) 
    543             c = geniusql.Column(pytype(dbtype), dbtype, 
     544            c = geniusql.Column(pytype, dbtype, 
    544545                                default, hints={}, key=(name in pknames), 
    545546                                name=name, qname=self.db.quote(name))