-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 17/07/13 18:37, Keith Medcalf wrote:
> cr1 = cn.cursor() cr2 = cn.cursor()
>
> cr1.execute('select ...') while True: row = cr1.fetchone() if not row:
> break
While that is normal DBAPI, it is far more verbose and unpythonic than the
SQLite wrappers (disclosure: I'm the author of one of them). Code can use
iterators and look something like this:
for id,one,two in db.cursor().execute("select id, one, two from XXX"):
three=one+two
db.cursor().execute("insert into .... ", (three,))
Roger
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAlHnV8sACgkQmOOfHg372QTfbwCeIYJTKpLSn+RGlsDcMA/S18WI
4QcAoOHgcf3mcRwfWwR2IrB87DbS0oQY
=gtkt
-----END PGP SIGNATURE-----
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users