Forum OpenACS Development: Response to What do we do with db_multirow and template::multirow?

"We", not "me" :)

In the course of dotLRN work OF ran into the need to add rows to an existing multirow.  Rather than switch to the template multirow API Arjun added an "-append" flag which does the Obvious Thing.  It's pretty useful in some circumstances.

So I'm all for extending db_multirow and other db_* procs in useful ways.

Do you want to make a specific, concise proposal for extending the proc so others can chime in?  Do others have extensions to the db API they'd like to propose, while we're at it?

Something like a "multirow_foreach" (or perhaps template::multirow foreach?  Seems to fit well there) might be useful.  Stuff one does now in the .adp template using "if" tags while looping through a multirow might be easier to pull into the .tcl script if such a construct existed, and I'm all in favor of being able to do that as IMO templates should contain as little logic as possible.

We might as well do a little public planning here and look into extending the API for the next release (which means it can be in the tree shortly after beta if you or someone else has time to do it).

Since you mention the template db API, there's a deeper global issue which I label "improved integration of the template stuff with the OpenACS core".  For example, the template code, which is always installed, stomps over request processor extension handlers which I think makes those obsolete (? haven't looked that deeply into this).  In other words there are rough edges in the integration.

And I'd like to get rid of the template db API altogether, the toolkit doesn't really need two unrelated db APIs but that's another story ...