Yes to both. Our bank transfer example in rama-demo-gallery is a good example of this. https://github.com/redplanetlabs/rama-demo-gallery
I can't say I understand the example. It seems to talk a lot about implementation details compared to the naive SQL:
create table account (
account_id bigint primary key,
balance bigint not null default 0,
check (balance >= 0)
);
begin;
update account set balance = balance - $amount where account_id = $from_id;
update account set balance = balance + $amount where account_id = $to_id;
commit;Who hurt you?