Requere property description for prepared statiment.
Sample code:
curs = conn.cursor()
curs2 = = conn.cursor()
curs.execute(outer_sql)
prepare_outer_space(curs.description)
for orow in curs:
out_outer(orow)
curs2.execute(inner_sql, orow[0])
if not is_inner_space_prepared():
prepare_inner_space(curs2.description)
for irow in curs2:
out_inner(irow)
Replace sample:
#Prepared
curs = conn.cursor()
p_outer_sql = curs.prep(outer_sql)
prepare_outer_space(p_outer_sql.description)
curs2 = conn.cursor()
p_inner_sql = curs.prep(inner_sql)
prepare_inner_space(p_inner_sql.description)
#Executed
curs.execute(p_outer_sql)
for orow in curs:
out_outer(orow)
curs2.execute(p_inner_sql, orow[0])
for irow in curs2:
out_inner(irow)
===Russion===
Хотелось бы уметь получать описание полей запроса из
prepared statiment-а.
Сейчас для этой цели приходится выполнять дополнительный
запрос, или анализировать - первое ли это выролнение.
Код получается несколько запутанный и смешанный. ;-)
Logged In: YES
user_id=414645
Thanks for pointing this out. I don't know why I didn't
include a description property in the PreparedStatement
interface; it's a natural fit. In these snapshots, that
property has been added:
http://kinterbasdb.sourceforge.net/snapshots/3.2/kinterbasdb-3.2_pre_20060424.src.tar.gz
http://kinterbasdb.sourceforge.net/snapshots/3.2/kinterbasdb-3.2_pre_20060424.win32-FB-2.0-py2.4.exe
You can see example code in the test suite, file
test_cursor.py / class PreparedStatementTest / method
testProperty_description:
http://kinterbasdb.sourceforge.net/test-suite/releases/kinterbasdb-test-suite-2006_04_24.tar.bz2
As for the Russian sentences, here's my attempt to
translate. I tried to translate idiomatically rather than
literally, because literal translations sound so unnatural.
If you have any feedback on the translation, I'd be glad to
hear it.
---
Хотелось бы уметь получать описание полей запроса из
prepared statiment-а.
->
I would like to be able to get the description of a field
from a prepared statement.
Сейчас для этой цели приходится выполнять дополнительный
запрос, или анализировать - первое ли это выролнение.
->
At present, it is necessary to execute an additional
statement to achieve this goal, or to determine whether this
is the first execution.
Код получается несколько запутанный и смешанный.
->
The code should work out the tangles and confusion.
---
Logged In: YES
user_id=414645
Now available in official release 3.2rc1.