Commit 4a3362d4 authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2004-01-21 16:52:38 by cmiachon] Empty log message

Original author: cmiachon
Date: 2004-01-21 16:52:38+00:00
parent a24afdb2
......@@ -542,11 +542,11 @@ let selectOpt(loc,e,l,condi) =
var_of_ppat pp)
in (i,pp,xx,env2,True)::tableau(r,env2,i+1)
in let tableau=(tableau(l,[],1))
(*in let pp3=pp(tableau)*)
in let pp3=pp(tableau)
in let t=place(tableau,sortir_clauses(fnc(condi)))
(*in let pp5=pp(t)*)
in let pp5=pp(t)
in let s=select2(loc,e,t)
in (*print_string(string_of_pexpr(s));*)s
in print_string(string_of_pexpr(s));s
let select(loc,e,l) =
let rec saux loc l =
......
(* List item numbers and descriptions of items that have no bids. *)
(* In CQLx *)
select <no_bid_item>[ !([i]/Itemno) !([i]/Description)]
from i in [items]/Item_tuple
where let s =(select b
from b in [bids]//Itemno
where (b = [i]/Itemno) )
in s= []
;;
(* In CQLp *)
(*
select ino
from <items>[i::Item_tuple*] in [items],
<item_tuple>[<itemno>ino ;_] in i
where (select bno
from <bids>[b::Bid_tuple*] in [bids],
<bid_tuple>[_ <itemno>bno ;_] in b
where bno = ino) = ""
;; *)
(* There is a parenthesis grammar problem *)
<result>
select <no_bid_item>[<itemno>ino des]
from <items>[i::Item_tuple*] in [items],
<item_tuple>[<itemno>ino des&Description;_] in i
where let s = (select bno
from <bids>[b::Bid_tuple*] in [bids],
<bid_tuple>[_ <itemno>bno ;_] in b
where (bno = ino))
in s = "" ;;
(* In XQUERY
<result>
{
for $i in doc("items.xml")//item_tuple
where empty(doc("bids.xml")//bid_tuple[itemno = $i/itemno])
return
<no_bid_item>
{ $i/itemno }
{ $i/description }
</no_bid_item>
}
</result>
*)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment