Makes the enclosed block atomic.
An atomic block works much like <transaction>, but uses the databases SAVEPOINT feature to better handle nested atomic blocks.
<!--- 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>
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
db |
Database | text | No | "_default" |
name | purpose | type | required? | default | choices |
---|---|---|---|---|---|
if |
Conditional expression | expression | No | yes |