Mercurial > urweb
comparison lib/top.ur @ 440:19d7f79cd584
Time MIN/MAX
author | Adam Chlipala <adamc@hcoop.net> |
---|---|
date | Thu, 30 Oct 2008 15:16:37 -0400 |
parents | 0ce90d4d9ae7 |
children | dfc8c991abd0 |
comparison
equal
deleted
inserted
replaced
439:322c8620bbdf | 440:19d7f79cd584 |
---|---|
155 fun oneOrNoRows (tables ::: {{Type}}) (exps ::: {Type}) | 155 fun oneOrNoRows (tables ::: {{Type}}) (exps ::: {Type}) |
156 (q : sql_query tables exps) [tables ~ exps] = | 156 (q : sql_query tables exps) [tables ~ exps] = |
157 query q | 157 query q |
158 (fn fs _ => return (Some fs)) | 158 (fn fs _ => return (Some fs)) |
159 None | 159 None |
160 | |
161 fun oneRow (tables ::: {{Type}}) (exps ::: {Type}) | |
162 (q : sql_query tables exps) [tables ~ exps] = | |
163 o <- oneOrNoRows q; | |
164 return (case o of | |
165 None => error <xml>Query returned no rows</xml> | |
166 | Some r => r) | |
167 |