You're right. There's thing thing about DIO where it does an
upvar $arrayName $arrayName $arrayName array
...and I'm not totally sure why... it's some sort of Damon magic.
But yeah, that's the problem, any array name that's also a variable
inside the method or a public variable of the class and it's gonna fail.
I've been working on DIO. It's fairly high overhead, creating an
object for every result, and it pulls several result variables across
to the result object whether they're requested or not... stuff like
that. I've been toying with the idea of trying to reuse result
objects due to the overhead of Itcl object creation. Also
occasionally studying Xotcl since that's the forthcoming "official"
object system.
One thing that makes it difficult is I'm a PostgreSQL guy and not a
MySQL/SQLite guy. A recent case in point, I want the "DIO update"
method to return the number of rows affected, but it's a different
result method, pgresult -cmdTuples rather than pgresult -numTuples,
and I don't know how the others handle that.
On Nov 9, 2005, at 12:53 PM, David N. Welton wrote:
package require DIO
set dbh [DIO::handle Postgresql dbh -db shopping]
$dbh array "select id, code from codes" res
puts $res(code)
This barfs because 'res' is a magic name. I don't mind picking
another
name, but it's a minor annoyance.
Ciao,
--
David N. Welton
- http://www.dedasys.com/davidw/
Linux, Open Source Consulting
- http://www.dedasys.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]