Forum OpenACS Q&A: Whats the deal with '$QQ...' variables in tcl/adp pages?

Just going through the glassroom module and I've got a question
regarding the variables preceded by QQ,  you see this mainly when the
page is attempting to insert data into the DB, where all the page
variables have QQ preceding them.

Seen it around in other modules apart from just glassroom.

Any reasons for the QQ part??

Thanks

$QQvarname is part of the set_form_variables set of functions. QQ denotes that the single quotes are turned into double-single quotes and the string is trimmed. This way you can throw it into the db with fairly small amounts of effort. It's used in practically every module.

BTW: I've been using a modified version of this function internally for quite a while that does the $varname, $QQvarname, and also $DBvarname. $DBvarname does returns:

'quoted value with escaped single quotes'
or
NULL (if it's empty)

Helps my efforts in being lazy.

If anybody wants it, I'll throw it into the distribution.

I think we'll be able to handle this Oracle breakage internally within  the new db_* database API that has been implemented for 3.3.