diff options
author | Adam Chlipala <adamc@hcoop.net> | 2008-10-30 15:16:37 -0400 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2008-10-30 15:16:37 -0400 |
commit | 7e90e2dd45c936519b6397a3ac9f8cb481ea6511 (patch) | |
tree | fe9ae1798baecaadf006b54d792997b0fb2db54c /lib/top.ur | |
parent | 5421d219d4b51b4b8ef18524d5b7db5c4939c36d (diff) |
Time MIN/MAX
Diffstat (limited to 'lib/top.ur')
-rw-r--r-- | lib/top.ur | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -157,3 +157,11 @@ fun oneOrNoRows (tables ::: {{Type}}) (exps ::: {Type}) query q (fn fs _ => return (Some fs)) None + +fun oneRow (tables ::: {{Type}}) (exps ::: {Type}) + (q : sql_query tables exps) [tables ~ exps] = + o <- oneOrNoRows q; + return (case o of + None => error <xml>Query returned no rows</xml> + | Some r => r) + |