comparison demo/chat.ur @ 708:1a317a707d71

Add primary keys to demo
author Adam Chlipala <adamc@hcoop.net>
date Tue, 07 Apr 2009 16:22:11 -0400
parents 4e260887d8f2
children 5819fb63c93a
comparison
equal deleted inserted replaced
707:d8217b4cb617 708:1a317a707d71
2 type t = string 2 type t = string
3 end) 3 end)
4 4
5 sequence s 5 sequence s
6 table t : { Id : int, Title : string, Room : Room.topic } 6 table t : { Id : int, Title : string, Room : Room.topic }
7 PRIMARY KEY Id
7 8
8 fun chat id = 9 fun chat id =
9 r <- oneRow (SELECT t.Title, t.Room FROM t WHERE t.Id = {[id]}); 10 r <- oneRow (SELECT t.Title, t.Room FROM t WHERE t.Id = {[id]});
10 ch <- Room.subscribe r.T.Room; 11 ch <- Room.subscribe r.T.Room;
11 12