comparison lib/ur/top.ur @ 1072:9001966ae1c8

Weakening-type coercions for SQL values
author Adam Chlipala <adamc@hcoop.net>
date Sun, 13 Dec 2009 13:00:55 -0500
parents b89e3d8731ed
children d89f98f0b4bb
comparison
equal deleted inserted replaced
1071:26197c957ad6 1072:9001966ae1c8
232 (fn fs acc => 232 (fn fs acc =>
233 r <- f fs; 233 r <- f fs;
234 return <xml>{acc}{r}</xml>) 234 return <xml>{acc}{r}</xml>)
235 <xml/> 235 <xml/>
236 236
237 fun hasRows [tables ::: {{Type}}] [exps ::: {Type}]
238 [tables ~ exps]
239 (q : sql_query tables exps) =
240 query q
241 (fn _ _ => return True)
242 False
243
237 fun oneOrNoRows [tables ::: {{Type}}] [exps ::: {Type}] 244 fun oneOrNoRows [tables ::: {{Type}}] [exps ::: {Type}]
238 [tables ~ exps] 245 [tables ~ exps]
239 (q : sql_query tables exps) = 246 (q : sql_query tables exps) =
240 query q 247 query q
241 (fn fs _ => return (Some fs)) 248 (fn fs _ => return (Some fs))