rel_segment::new (public)

 rel_segment::new [ -context_id context_id ] \
    [ -creation_user creation_user ] [ -creation_ip creation_ip ] \
    group_id rel_type segment_name

Defined in packages/acs-subsite/tcl/rel-segments-procs.tcl

Creates a new relational segment

Switches:
-context_id (optional)
-creation_user (optional)
-creation_ip (optional)
Parameters:
group_id (required)
rel_type (required)
segment_name (required)
Returns:
The segment_id of the new segment
Author:
Michael Bryzek <mbryzek@arsdigita.com>
Created:
12/2000

Partial Call Graph (max 5 caller/called nodes):
%3 test_acs_subsite_expose_bug_775 acs_subsite_expose_bug_775 (test acs-subsite) rel_segment::new rel_segment::new test_acs_subsite_expose_bug_775->rel_segment::new test_acs_subsite_rel_segment_new acs_subsite_rel_segment_new (test acs-subsite) test_acs_subsite_rel_segment_new->rel_segment::new ad_conn ad_conn (public) rel_segment::new->ad_conn db_exec_plsql db_exec_plsql (public) rel_segment::new->db_exec_plsql packages/acs-subsite/www/admin/rel-segments/new-3.tcl packages/acs-subsite/ www/admin/rel-segments/new-3.tcl packages/acs-subsite/www/admin/rel-segments/new-3.tcl->rel_segment::new rel_segments_new rel_segments_new (public, deprecated) rel_segments_new->rel_segment::new subsite::default::create_app_group subsite::default::create_app_group (public) subsite::default::create_app_group->rel_segment::new

Testcases:
acs_subsite_expose_bug_775, acs_subsite_rel_segment_new
Source code:
    if { [ns_conn isconnected] } {
        if { $creation_user eq "" } {
            set creation_user [ad_conn user_id]
        }
        if { $creation_ip eq "" } {
            set creation_ip [ad_conn peeraddr]
        }
    }
    return [db_exec_plsql create_rel_segment {}]
Generic XQL file:
packages/acs-subsite/tcl/rel-segments-procs.xql

PostgreSQL XQL file:
<fullquery name="rel_segment::new.create_rel_segment">
    <querytext>

	select rel_segment__new(
		null,
		'rel_segment',
		now(),
		:creation_user,
		:creation_ip,
		null,
		null,
		:segment_name,
		:group_id,
		:rel_type,
		:context_id
)

      </querytext>
</fullquery>
packages/acs-subsite/tcl/rel-segments-procs-postgresql.xql

Oracle XQL file:
<fullquery name="rel_segment::new.create_rel_segment">
    <querytext>

      declare
      begin
	:1 := rel_segment.new(segment_name => :segment_name,
                                  group_id => :group_id,
                                  context_id => :context_id,
                                  rel_type => :rel_type,
                                  creation_user => :creation_user,
                                  creation_ip => :creation_ip
                                 );
      end;

      </querytext>
</fullquery>
packages/acs-subsite/tcl/rel-segments-procs-oracle.xql

[ hide source ] | [ make this the default ]
Show another procedure: