<atomic> mark a block as being atomic

name
atomic
xml namespace
http://moyaproject.com/db

Makes the enclosed block atomic.

An atomic block works much like <transaction>, but uses the databases SAVEPOINT feature to better handle nested atomic blocks.

Example

<!--- taken from Moya Social Links -->
<db:atomic>
    <db:get model="#Link" let:id="link" dst="link" />
    <db:get model="#Vote" let:link="link" dst="vote" />
    <db:create if="not vote"
        model="#Vote" let:link="link" let:user=".user" let:score="score" dst="vote" />
    <let link.score="link.score - vote.score" vote.score="score" />
    <let link.score="link.score + vote.score" />
</db:atomic>
attributes
name purpose type required? default choices
db Database text No "_default"
inherited attributes
name purpose type required? default choices
if Conditional expression expression No yes