Show
Ignore:
Timestamp:
11/29/05 12:43:34 (18 years ago)
Author:
jerome
Message:

Added support for SQLite3 database backend.
NEEDS TESTERS !

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/pgstorage.py

    r2418 r2593  
    118118            typ = "text" 
    119119        return pg._quote(field, typ) 
     120         
     121    def prepareRawResult(self, result) : 
     122        """Prepares a raw result by including the headers.""" 
     123        if result.ntuples() > 0 : 
     124            entries = [result.listfields()] 
     125            entries.extend(result.getresult()) 
     126            nbfields = len(entries[0]) 
     127            for i in range(1, len(entries)) : 
     128                fields = list(entries[i]) 
     129                for j in range(nbfields) : 
     130                    field = fields[j] 
     131                    if type(field) == StringType : 
     132                        fields[j] = self.databaseToUserCharset(field)  
     133                entries[i] = tuple(fields)     
     134            return entries 
     135