Index: openacs-4/packages/acs-subsite/tcl/relation-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/acs-subsite/tcl/relation-procs.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/acs-subsite/tcl/relation-procs.xql 6 May 2001 21:40:21 -0000 1.1
+++ openacs-4/packages/acs-subsite/tcl/relation-procs.xql 15 May 2001 16:59:00 -0000 1.2
@@ -3,99 +3,44 @@
- FIX ME OUTER JOIN
+
select s.segment_id, r.object_id_two as party_id, t.package_name
- from rel_segments s, acs_rels r, acs_object_types t
- where r.object_id_one = s.group_id(+)
- and r.rel_type = s.rel_type(+)
- and r.rel_type = t.object_type
+ from acs_rels r
+ left outer join rel_segments s
+ on (r.object_id_one = s.group_id and r.rel_type = s.rel_type),
+ acs_object_types t
+ where r.rel_type = t.object_type
and r.rel_id = :rel_id
-
+
--- FIX ME
- select ${package_name}__delete(:rel_id);
-
-
-
-
-
- FIX ME OUTER JOIN
- select s.segment_id, r.object_id_two as party_id, t.package_name
- from rel_segments s, acs_rels r, acs_object_types t
- where r.object_id_one = s.group_id(+)
- and r.rel_type = s.rel_type(+)
- and r.rel_type = t.object_type
- and r.rel_id = :rel_id
-
-
-
-
-
-
-
--- FIX ME DECODE (USE SQL92 CASE)
- select
- pretty_name, object_type, level, indent,
- decode(valid_types.rel_type, null, 0, 1) as valid_p
- from
- (select
- t.pretty_name, t.object_type, level,
- replace(lpad(' ', (level - 1) * 4),
- ' ', ' ') as indent,
- rownum as tree_rownum
- from
- acs_object_types t
- connect by
- prior t.object_type = t.supertype
- start with
- t.object_type = :start_with ) types,
- (select
- rel_type
- from
- rc_valid_rel_types
- where
- group_id = :group_id ) valid_types
- where
- types.object_type = valid_types.rel_type(+)
- order by tree_rownum
-
-
-
-
-
-
-
- FIX ME OUTER JOIN
select distinct s.segment_id, s.group_id, s.rel_type,
g.group_name, g.join_policy, t.pretty_name as rel_type_pretty_name,
coalesce(dl.dependency_level, 0)
- from rc_all_constraints c,
+ from rc_all_constraints c,
(select rel_segment, required_rel_segment
from rc_segment_required_seg_map
where rel_side = 'two'
UNION ALL
select segment_id, segment_id
from rel_segments) map,
- rel_segments s,
- rc_segment_dependency_levels dl,
+ rel_segments s left outer join rc_segment_dependency_levels dl using (segment_id),
groups g, acs_object_types t
where c.group_id = :group_id
and c.rel_type = :rel_type
and c.required_rel_segment = map.rel_segment
and map.required_rel_segment = s.segment_id
- and s.segment_id = dl.segment_id(+)
and g.group_id = s.group_id
and t.object_type = s.rel_type
order by coalesce(dl.dependency_level, 0)
-
+
-
+