[Informixdb-cvs] informixdb/doc manual.txt,1.14,1.15
Brought to you by:
chaese,
f-apolloner
From: Carsten H. <ch...@us...> - 2006-11-11 22:36:41
|
Update of /cvsroot/informixdb/informixdb/doc In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv4691/doc Modified Files: manual.txt Log Message: Document new features; getting closer to version 2.4 Index: manual.txt =================================================================== RCS file: /cvsroot/informixdb/informixdb/doc/manual.txt,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** manual.txt 8 Oct 2006 04:42:42 -0000 1.14 --- manual.txt 11 Nov 2006 22:36:39 -0000 1.15 *************** *** 130,133 **** --- 130,149 ---- >>> cursor.callproc('lower', ('FOO',)) + `New in version 2.4`: Parameters may also be specified using ``named`` + style, in which case the arguments must be a dictionary whose keys + correspond to the parameter names:: + + >>> cursor.execute('INSERT INTO names VALUES(:first,:last,:age)', + ... dict(first='some', last='body', age=56) ) + + If a parameter name is not in the dictionary, a KeyError will be raised. + However, the dictionary may contain more keys than the statement needs. + This allows, for example, to simply pass ``locals()`` to bind all + parameters from correspondingly named variables. + + Note: While it is perfectly acceptable to execute different statements + with different parameter styles, mixing parameter styles in the same + statement is not allowed. + Getting results --------------- |