view demo/increment.ur @ 2000:bddee3af70c4

Tweaking uw_commit() logic, partly to fix a resource clean-up bug on SQL serialization failures
author Adam Chlipala <adam@chlipala.net>
date Tue, 15 Apr 2014 19:12:49 -0400
parents e6bc6bbd7a32
children
line wrap: on
line source
sequence seq

fun increment () = nextval seq

fun main () =
    src <- source 0;
    return <xml><body>
      <dyn signal={n <- signal src; return <xml>{[n]}</xml>}/>
      <button value="Update" onclick={fn _ => n <- rpc (increment ()); set src n}/>
    </body></xml>