diff options
author | Adam Chlipala <adamc@hcoop.net> | 2009-12-13 14:34:18 -0500 |
---|---|---|
committer | Adam Chlipala <adamc@hcoop.net> | 2009-12-13 14:34:18 -0500 |
commit | ffb02010f3f25bcdecab88b8f6cab635b649f56e (patch) | |
tree | d0e80d87e37b478abae9baf9012b125900f0557f /lib/ur/top.ur | |
parent | f5449b93792afc81e4da70d2a790ef7a2d2b49d5 (diff) |
Fixing a bug in DInitializer elaboration
Diffstat (limited to 'lib/ur/top.ur')
-rw-r--r-- | lib/ur/top.ur | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/ur/top.ur b/lib/ur/top.ur index 8b737179..78a799b1 100644 --- a/lib/ur/top.ur +++ b/lib/ur/top.ur @@ -271,6 +271,9 @@ fun oneRowE1 [tabs ::: {Unit}] [nm ::: Name] [t ::: Type] [tabs ~ [nm]] (q : sql None => error <xml>Query returned no rows</xml> | Some r => r.nm) +fun nonempty [fs] [us] (t : sql_table fs us) = + oneRowE1 (SELECT COUNT( * ) > 0 AS B FROM t) + fun eqNullable [tables ::: {{Type}}] [agg ::: {{Type}}] [exps ::: {Type}] [t ::: Type] (_ : sql_injectable (option t)) (e1 : sql_exp tables agg exps (option t)) |