From 42a6d61be0c529b52d16e34998e96183219aea65 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Thu, 23 Apr 2009 16:13:02 -0400 Subject: Cookie signatures for RPCs --- tests/cookieJsec.ur | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 tests/cookieJsec.ur (limited to 'tests/cookieJsec.ur') diff --git a/tests/cookieJsec.ur b/tests/cookieJsec.ur new file mode 100644 index 00000000..46668cf8 --- /dev/null +++ b/tests/cookieJsec.ur @@ -0,0 +1,27 @@ +table t : {Id : int} + +cookie c : int + +fun setter r = + setCookie c (readError r.Id); + return Done + +fun writer () = + ido <- getCookie c; + case ido of + None => error No cookie + | Some id => dml (INSERT INTO t (Id) VALUES ({[id]})) + +fun preWriter () = return +