Mercurial > urweb
comparison demo/sql.ur @ 708:1a317a707d71
Add primary keys to demo
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Tue, 07 Apr 2009 16:22:11 -0400 |
parents | 20fab0e96217 |
children | 5819fb63c93a |
comparison
equal
deleted
inserted
replaced
707:d8217b4cb617 | 708:1a317a707d71 |
---|---|
1 table t : { A : int, B : float, C : string, D : bool } | 1 table t : { A : int, B : float, C : string, D : bool } |
2 PRIMARY KEY A | |
2 | 3 |
3 fun list () = | 4 fun list () = |
4 rows <- queryX (SELECT * FROM t) | 5 rows <- queryX (SELECT * FROM t) |
5 (fn row => <xml><tr> | 6 (fn row => <xml><tr> |
6 <td>{[row.T.A]}</td> <td>{[row.T.B]}</td> <td>{[row.T.C]}</td> <td>{[row.T.D]}</td> | 7 <td>{[row.T.A]}</td> <td>{[row.T.B]}</td> <td>{[row.T.C]}</td> <td>{[row.T.D]}</td> |