Hi Stephen,
in contrary to the documentation, dbi_dml does not return the number
of rows affected by the query. Typically the dbi_* tcl commands
are implemented via Exec() followed by a retrieving cmd, like in
dbi_1row does an Exec() + NextRow()
dbi_rows does an Exec() + many NextRow(),
etc.
but
Hello!
I've added a datatype "dict" to the list of possible DbiResults. "dicts"
returns a list of dicts, whereas "dict" returns a dict. The keys for the first
level is a simple counter. So instead of
{user_id 1 user_name Max} {user_id 2 user_name Lisa}
1 {user_id 1 user_name Max} 2 {user_id 2
Am 06.02.14 18:17, schrieb Wolfgang Winkler:
> I've added a datatype "dict" to the list of possible DbiResults.
...
> dict for {k v} $result {
> set user_id [dict get $v user_id]
> dict set result $k user_url "user?user_id=$user_id"
> }
ah, nice... updating the dict as result set is co
For the time being, i've used (abused?) the public
Dbi_Handle->rowIdx to return in the DML case the
number of affected rows. This has the advantage,
that all data-structures are unchanged, and the
modifications are quite local.
-g
Am 06.02.14 14:12, schrieb Gustaf Neumann:
> Hi Stephen,
>
> in co
On Thu, Feb 6, 2014 at 5:17 PM, Wolfgang Winkler
wrote:
> Hello!
>
> I've added a datatype "dict" to the list of possible DbiResults. "dicts"
> returns a list of dicts, whereas "dict" returns a dict. The keys for the first
> level is a simple counter. So instead of
>
> {user_id 1 user_name Max} {u
This used to work. I *think* what happened is it got overlooked when I
implemented the sqlite driver and had to change the driver interface
to accommodate it (sqlite doesn't return nrows - you have to step the
state machine yourself).
Maybe numRows should be added back as a *numRowsHint arg in the
Well, that doesn't make it available to the code that needs it...
So add numRowsHint to the public portion of Dbi_Handle. Set it to
DBI_NUM_ROWS_UNKNOWN before passing it to the driver in Exec. Driver
may fill it in. Upper layers use it if available, but don't rely on
it.
On Fri, Feb 7, 2014 at 1