category_synonym::add (public)

 category_synonym::add -name name [ -locale locale ] \
    -category_id category_id [ -synonym_id synonym_id ]

Defined in packages/categories/tcl/category-synonyms-procs.tcl

Inserts a new synonym.

Switches:
-name (required)
-locale (optional)
-category_id (required)
-synonym_id (optional)
Options:
-name
synonym name.
-locale
locale of the language. [ad_conn locale] used by default.
-category_id
id of the category of the synonym to be inserted.
-synonym_id
synonym_id of the synonym to be inserted.
Authors:
Bernd Schmeil <bernd@thebernd.de>
Timo Hentschel <timo@timohentschel.de>

Testcases:
category_synonyms
Source code:
    if {$locale eq ""} {
    set locale [ad_conn locale]
    }

    db_transaction {
    set synonym_id [db_exec_plsql insert_synonym ""]
    }
    
    return $synonym_id
Generic XQL file:
packages/categories/tcl/category-synonyms-procs.xql

PostgreSQL XQL file:
<fullquery name="category_synonym::add.insert_synonym">
    <querytext>
		select category_synonym__new (
				    :name,
				    :locale,
				    :category_id,
				    :synonym_id
				    )
      </querytext>
</fullquery>
packages/categories/tcl/category-synonyms-procs-postgresql.xql

Oracle XQL file:
<fullquery name="category_synonym::add.insert_synonym">
    <querytext>
		begin
		:1 := category_synonym.new (
					    synonym_id   => :synonym_id,
					    name         => :name,
					    locale       => :locale,
					    category_id  => :category_id
					   );
		end;
      </querytext>
</fullquery>
packages/categories/tcl/category-synonyms-procs-oracle.xql

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