Changeset 271:043b86377edc in livinglogic.python.orasql

Show
Ignore:
Timestamp:
07/21/08 12:07:20 (11 years ago)
Author:
Walter Doerwald <walter@…>
Branch:
default
Tags:
rel-1-25-1
Message:

Add readlobs options to orafind.py. Output parameter value in proc call error. Handle unicode in proc call.

Files:
4 modified

Legend:

Unmodified
Added
Removed
  • NEWS.rst

    r267 r271  
     1Changes in 1.25.1 (released 07/21/2008) 
     2--------------------------------------- 
     3 
     4*   ``orafind.py`` now has an additional options :option:`readlobs` (defaulting 
     5    to false). If this option is set, the value of LOBs in the records found, 
     6    will be printed. 
     7 
     8 
    19Changes in 1.25 (released 06/17/2008) 
    210------------------------------------- 
  • setup.py

    r267 r271  
    5656args=dict( 
    5757    name="ll-orasql", 
    58     version="1.25", 
     58    version="1.25.1", 
    5959    description="Utilities for working with cx_Oracle", 
    6060    long_description=descr, 
  • src/ll/orasql/__init__.py

    r267 r271  
    19041904        "blob": BLOB, 
    19051905    } 
    1906      
     1906 
    19071907    _py2cx = { 
    19081908        datetime.datetime: DATETIME, 
     
    19121912        float: NUMBER, 
    19131913        str: STRING, 
     1914        unicode: STRING, 
    19141915    } 
    19151916     
     
    19831984                t = self._py2cx[type(arg)] 
    19841985        except KeyError: 
    1985             raise TypeError("can't handle parameter %s of type %s in %r" % (arginfo.name, arginfo.datatype, self)) 
     1986            raise TypeError("can't handle parameter %s of type %s with value %r in %r" % (arginfo.name, arginfo.datatype, arg, self)) 
    19861987        if t is STRING and isinstance(arg, str) and len(arg) >= 4000: 
    19871988            t = CLOB 
  • src/ll/orasql/scripts/orafind.py

    r267 r271  
    9494    p.add_option("-c", "--color", dest="color", help="Color output (%s)" % ", ".join(colors), default="auto", choices=colors) 
    9595    p.add_option("-i", "--ignore-case", dest="ignorecase", help="Ignore case distinctions?", default=False, action="store_true") 
     96    p.add_option("-r", "--read-lobs", dest="readlobs", help="Read LOBs when printing records?", default=False, action="store_true") 
    9697 
    9798    (options, args) = p.parse_args(args) 
     
    114115    tablenames = [name.lower() for name in args[2:]] 
    115116 
    116     connection = orasql.connect(connectstring) 
     117    connection = orasql.connect(connectstring, readlobs=options.readlobs) 
    117118    c = connection.cursor() 
    118119