Paul van Beukering wrote:
>    Is it a feature/good idea/possible,  to set fields in one sql statement,
>    in order to gain speed?
>     
>    for example:
>    <mm:listnodes type="myobjecttype" constraints="WHERE myfield > 0">
>        <mm:setfield name="myfield">0</mm:setfield>
>    </mm:listnodes>

It is a good idea, but it is not possible right now. Mainly because there
currently don't exist 'update' queries in MMBase, so you can only change
node-by-node.

'update' queries would be nice extension of the query-framework.

To start with I would suggest a different syntax though, perhaps:

<mm:updatenodescontainer type="myobjecttype">
  <mm:constraint field="myfield" operator=">" value="0" />
  <mm:setfield name="myfield">0</mm:setfield>
  <mm:updatenodes />
</mm:updatenodes>

Or similarly, because to start with, I think that it would be a bit hard to
mix update date select queries in one tag.

I think this feature would be quit a major change.

Michiel



-- 
Michiel Meeuwissen                  mihxil'
Mediacentrum 140 H'sum                [] ()
+31 (0)35 6772979         nl_NL eo_XX en_US



_______________________________________________
Developers mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/developers

Reply via email to