Changeset 33
- Timestamp:
- 03/13/07 20:06:47
- Files:
-
- trunk/geniusql/adapters.py (modified) (1 diff)
- trunk/geniusql/providers/ado.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/geniusql/adapters.py
r32 r33 414 414 415 415 def __init__(self): 416 # Make a copy of the class-level 'dict416 # Make a copy of the class-level dict 417 417 self._reverse_types = self._reverse_types.copy() 418 418 trunk/geniusql/providers/ado.py
r32 r33 522 522 523 523 cols = [] 524 pytype = self.db.typeadapter.python_type524 get_pytype = self.db.typeadapter.python_type 525 525 for row in data: 526 526 # I tried passing criteria to OpenSchema, but passing None is … … 530 530 531 531 dbtype = dbtypes[row[11]] 532 pytype = get_pytype(dbtype) 533 532 534 default = row[8] 533 535 if default is not None: 534 deftype = pytype(dbtype) 535 if issubclass(deftype, (int, long, float)): 536 if issubclass(pytype, (int, long, float)): 536 537 # We may have stuck extraneous quotes in the default 537 538 # value when using numeric defaults with MSAccess. 538 539 if default.startswith("'") and default.endswith("'"): 539 540 default = default[1:-1] 540 default = deftype(default)541 default = pytype(default) 541 542 542 543 name = str(row[3]) 543 c = geniusql.Column(pytype (dbtype), dbtype,544 c = geniusql.Column(pytype, dbtype, 544 545 default, hints={}, key=(name in pknames), 545 546 name=name, qname=self.db.quote(name))
