summaryrefslogtreecommitdiff
path: root/tests/blob.ur
blob: 37c3f753c411670bbdd4ce15f516b71e0daa205e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
sequence s
table t : { Id : int, Nam : option string, Data : blob, Desc : string }

fun save r =
    id <- nextval s;
    dml (INSERT INTO t (Id, Nam, Data, Desc) VALUES ({[id]}, {[fileName r.Data]}, {[fileData r.Data]}, {[r.Desc]}));
    main ()

and main () = return <xml><body>
  <form>
    <textbox{#Desc}/>
    <upload{#Data}/>
    <submit action={save}/>
  </form>
</body></xml>