Class ::xo::db::sql::content_type

::xo::db::sql::content_type[i] create ...

Class Relations

  • class: ::xo::db::Class[i]
  • superclass: ::xotcl::Object[i]
::xo::db::Class create ::xo::db::sql::content_type \
     -superclass ::xotcl::Object

Methods (to be applied on the object)

  • create_attribute (scripted, public)

     xo::db::sql::content_type[i] create_attribute [ -dbn dbn ] \
        -content_type content_type  -attribute_name attribute_name  \
        -datatype datatype  -pretty_name pretty_name  \
        [ -pretty_plural pretty_plural ] [ -sort_order sort_order ] \
        [ -default_value default_value ] [ -column_spec column_spec ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -attribute_name
    (required)
    -datatype
    (required)
    -pretty_name
    (required)
    -pretty_plural
    (optional)
    -sort_order
    (optional)
    -default_value
    (optional)
    -column_spec
    (defaults to "text") (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc create_attribute xo::db::sql::content_type proc create_attribute xo::db::sql::content_type proc create_attribute->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {ATTRIBUTE_NAME {}} {DATATYPE {}} {PRETTY_NAME {}} {PRETTY_PLURAL null} {SORT_ORDER null} {DEFAULT_VALUE null} {COLUMN_SPEC text}
    foreach var [list CONTENT_TYPE ATTRIBUTE_NAME DATATYPE PRETTY_NAME PRETTY_PLURAL SORT_ORDER DEFAULT_VALUE COLUMN_SPEC]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__create_attribute($_CONTENT_TYPE$_ATTRIBUTE_NAME$_DATATYPE$_PRETTY_NAME$_PRETTY_PLURAL$_SORT_ORDER$_DEFAULT_VALUE$_COLUMN_SPEC) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • create_type (scripted, public)

     xo::db::sql::content_type[i] create_type [ -dbn dbn ] \
        -content_type content_type  [ -supertype supertype ] \
        -pretty_name pretty_name  -pretty_plural pretty_plural  \
        -table_name table_name  [ -id_column id_column ] \
        [ -name_method name_method ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -supertype
    (defaults to "content_revision") (optional)
    -pretty_name
    (required)
    -pretty_plural
    (required)
    -table_name
    (required)
    -id_column
    (defaults to "XXX") (optional)
    -name_method
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 test_xotcl_core_tutorial_4 xotcl_core_tutorial_4 (test xotcl-core) xo::db::sql::content_type proc create_type xo::db::sql::content_type proc create_type test_xotcl_core_tutorial_4->xo::db::sql::content_type proc create_type db_with_handle db_with_handle (public) xo::db::sql::content_type proc create_type->db_with_handle

    Testcases:
    xotcl_core_tutorial_4
    #function_args: {CONTENT_TYPE {}} {SUPERTYPE content_revision} {PRETTY_NAME {}} {PRETTY_PLURAL {}} {TABLE_NAME {}} {ID_COLUMN XXX} {NAME_METHOD null}
    foreach var [list CONTENT_TYPE SUPERTYPE PRETTY_NAME PRETTY_PLURAL TABLE_NAME ID_COLUMN NAME_METHOD]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__create_type($_CONTENT_TYPE$_SUPERTYPE$_PRETTY_NAME$_PRETTY_PLURAL$_TABLE_NAME$_ID_COLUMN$_NAME_METHOD) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • drop_attribute (scripted, public)

     xo::db::sql::content_type[i] drop_attribute [ -dbn dbn ] \
        -content_type content_type  -attribute_name attribute_name  \
        [ -drop_column drop_column ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -attribute_name
    (required)
    -drop_column
    (defaults to "f") (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc drop_attribute xo::db::sql::content_type proc drop_attribute xo::db::sql::content_type proc drop_attribute->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {ATTRIBUTE_NAME {}} {DROP_COLUMN f}
    foreach var [list CONTENT_TYPE ATTRIBUTE_NAME DROP_COLUMN]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__drop_attribute($_CONTENT_TYPE$_ATTRIBUTE_NAME$_DROP_COLUMN) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • drop_type (scripted, public)

     xo::db::sql::content_type[i] drop_type [ -dbn dbn ] \
        -content_type content_type  [ -drop_children_p drop_children_p ] \
        [ -drop_table_p drop_table_p ] [ -drop_objects_p drop_objects_p ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -drop_children_p
    (defaults to "f") (optional)
    -drop_table_p
    (defaults to "f") (optional)
    -drop_objects_p
    (defaults to "f") (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc drop_type xo::db::sql::content_type proc drop_type xo::db::sql::content_type proc drop_type->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {DROP_CHILDREN_P f} {DROP_TABLE_P f} {DROP_OBJECTS_P f}
    foreach var [list CONTENT_TYPE DROP_CHILDREN_P DROP_TABLE_P DROP_OBJECTS_P]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__drop_type($_CONTENT_TYPE$_DROP_CHILDREN_P$_DROP_TABLE_P$_DROP_OBJECTS_P) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • get_template (scripted, public)

     xo::db::sql::content_type[i] get_template [ -dbn dbn ] \
        -content_type content_type  -use_context use_context 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -use_context
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc get_template xo::db::sql::content_type proc get_template xo::db::sql::content_type proc get_template->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {USE_CONTEXT {}}
    foreach var [list CONTENT_TYPE USE_CONTEXT]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__get_template($_CONTENT_TYPE$_USE_CONTEXT) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • is_content_type (scripted, public)

     xo::db::sql::content_type[i] is_content_type [ -dbn dbn ] \
        -object_type object_type 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -object_type
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc is_content_type xo::db::sql::content_type proc is_content_type xo::db::sql::content_type proc is_content_type->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {OBJECT_TYPE {}}
    foreach var [list OBJECT_TYPE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__is_content_type($_OBJECT_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • refresh_trigger (scripted, public)

     xo::db::sql::content_type[i] refresh_trigger [ -dbn dbn ] \
        -content_type content_type 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc refresh_trigger xo::db::sql::content_type proc refresh_trigger xo::db::sql::content_type proc refresh_trigger->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}}
    foreach var [list CONTENT_TYPE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__refresh_trigger($_CONTENT_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • refresh_view (scripted, public)

     xo::db::sql::content_type[i] refresh_view [ -dbn dbn ] \
        -content_type content_type 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc refresh_view xo::db::sql::content_type proc refresh_view xo::db::sql::content_type proc refresh_view->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}}
    foreach var [list CONTENT_TYPE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__refresh_view($_CONTENT_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • register_child_type (scripted, public)

     xo::db::sql::content_type[i] register_child_type [ -dbn dbn ] \
        -parent_type parent_type  -child_type child_type  \
        [ -relation_tag relation_tag ] [ -min_n min_n ] [ -max_n max_n ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -parent_type
    (required)
    -child_type
    (required)
    -relation_tag
    (defaults to "generic") (optional)
    -min_n
    (defaults to "0") (optional)
    -max_n
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc register_child_type xo::db::sql::content_type proc register_child_type xo::db::sql::content_type proc register_child_type->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {PARENT_TYPE {}} {CHILD_TYPE {}} {RELATION_TAG generic} {MIN_N 0} {MAX_N null}
    foreach var [list PARENT_TYPE CHILD_TYPE RELATION_TAG MIN_N MAX_N]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__register_child_type($_PARENT_TYPE$_CHILD_TYPE$_RELATION_TAG$_MIN_N$_MAX_N) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • register_mime_type (scripted, public)

     xo::db::sql::content_type[i] register_mime_type [ -dbn dbn ] \
        -content_type content_type  -mime_type mime_type 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -mime_type
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc register_mime_type xo::db::sql::content_type proc register_mime_type xo::db::sql::content_type proc register_mime_type->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {MIME_TYPE {}}
    foreach var [list CONTENT_TYPE MIME_TYPE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__register_mime_type($_CONTENT_TYPE$_MIME_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • register_relation_type (scripted, public)

     xo::db::sql::content_type[i] register_relation_type [ -dbn dbn ] \
        -content_type content_type  -target_type target_type  \
        [ -relation_tag relation_tag ] [ -min_n min_n ] [ -max_n max_n ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -target_type
    (required)
    -relation_tag
    (defaults to "generic") (optional)
    -min_n
    (defaults to "0") (optional)
    -max_n
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc register_relation_type xo::db::sql::content_type proc register_relation_type xo::db::sql::content_type proc register_relation_type->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {TARGET_TYPE {}} {RELATION_TAG generic} {MIN_N 0} {MAX_N null}
    foreach var [list CONTENT_TYPE TARGET_TYPE RELATION_TAG MIN_N MAX_N]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__register_relation_type($_CONTENT_TYPE$_TARGET_TYPE$_RELATION_TAG$_MIN_N$_MAX_N) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • register_template (scripted, public)

     xo::db::sql::content_type[i] register_template [ -dbn dbn ] \
        -content_type content_type  -template_id template_id  \
        -use_context use_context  [ -is_default is_default ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -template_id
    (required)
    -use_context
    (required)
    -is_default
    (defaults to "f") (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc register_template xo::db::sql::content_type proc register_template xo::db::sql::content_type proc register_template->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {TEMPLATE_ID {}} {USE_CONTEXT {}} {IS_DEFAULT f}
    foreach var [list CONTENT_TYPE TEMPLATE_ID USE_CONTEXT IS_DEFAULT]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__register_template($_CONTENT_TYPE$_TEMPLATE_ID$_USE_CONTEXT$_IS_DEFAULT) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • rotate_template (scripted, public)

     xo::db::sql::content_type[i] rotate_template [ -dbn dbn ] \
        -template_id template_id  -v_content_type v_content_type  \
        -use_context use_context 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -template_id
    (required)
    -v_content_type
    (required)
    -use_context
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc rotate_template xo::db::sql::content_type proc rotate_template xo::db::sql::content_type proc rotate_template->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {TEMPLATE_ID {}} {V_CONTENT_TYPE {}} {USE_CONTEXT {}}
    foreach var [list TEMPLATE_ID V_CONTENT_TYPE USE_CONTEXT]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__rotate_template($_TEMPLATE_ID$_V_CONTENT_TYPE$_USE_CONTEXT) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • set_default_template (scripted, public)

     xo::db::sql::content_type[i] set_default_template [ -dbn dbn ] \
        -content_type content_type  -template_id template_id  \
        -use_context use_context 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -template_id
    (required)
    -use_context
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc set_default_template xo::db::sql::content_type proc set_default_template xo::db::sql::content_type proc set_default_template->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {TEMPLATE_ID {}} {USE_CONTEXT {}}
    foreach var [list CONTENT_TYPE TEMPLATE_ID USE_CONTEXT]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__set_default_template($_CONTENT_TYPE$_TEMPLATE_ID$_USE_CONTEXT) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • trigger_insert_statement (scripted, public)

     xo::db::sql::content_type[i] trigger_insert_statement [ -dbn dbn ] \
        -content_type content_type 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc trigger_insert_statement xo::db::sql::content_type proc trigger_insert_statement xo::db::sql::content_type proc trigger_insert_statement->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}}
    foreach var [list CONTENT_TYPE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__trigger_insert_statement($_CONTENT_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • unregister_child_type (scripted, public)

     xo::db::sql::content_type[i] unregister_child_type [ -dbn dbn ] \
        -parent_type parent_type  -child_type child_type  \
        -relation_tag relation_tag 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -parent_type
    (required)
    -child_type
    (required)
    -relation_tag
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc unregister_child_type xo::db::sql::content_type proc unregister_child_type xo::db::sql::content_type proc unregister_child_type->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {PARENT_TYPE {}} {CHILD_TYPE {}} {RELATION_TAG {}}
    foreach var [list PARENT_TYPE CHILD_TYPE RELATION_TAG]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__unregister_child_type($_PARENT_TYPE$_CHILD_TYPE$_RELATION_TAG) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • unregister_mime_type (scripted, public)

     xo::db::sql::content_type[i] unregister_mime_type [ -dbn dbn ] \
        -content_type content_type  -mime_type mime_type 

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -mime_type
    (required)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc unregister_mime_type xo::db::sql::content_type proc unregister_mime_type xo::db::sql::content_type proc unregister_mime_type->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {MIME_TYPE {}}
    foreach var [list CONTENT_TYPE MIME_TYPE]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__unregister_mime_type($_CONTENT_TYPE$_MIME_TYPE) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • unregister_relation_type (scripted, public)

     xo::db::sql::content_type[i] unregister_relation_type [ -dbn dbn ] \
        -content_type content_type  -target_type target_type  \
        [ -relation_tag relation_tag ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (required)
    -target_type
    (required)
    -relation_tag
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc unregister_relation_type xo::db::sql::content_type proc unregister_relation_type xo::db::sql::content_type proc unregister_relation_type->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE {}} {TARGET_TYPE {}} {RELATION_TAG null}
    foreach var [list CONTENT_TYPE TARGET_TYPE RELATION_TAG]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__unregister_relation_type($_CONTENT_TYPE$_TARGET_TYPE$_RELATION_TAG) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }
  • unregister_template (scripted, public)

     xo::db::sql::content_type[i] unregister_template [ -dbn dbn ] \
        [ -content_type content_type ] -template_id template_id  \
        [ -use_context use_context ]

    Automatically generated method

    Switches:
    -dbn
    (optional)
    -content_type
    (optional)
    -template_id
    (required)
    -use_context
    (optional)

    Partial Call Graph (max 5 caller/called nodes):
    %3 db_with_handle db_with_handle (public) xo::db::sql::content_type proc unregister_template xo::db::sql::content_type proc unregister_template xo::db::sql::content_type proc unregister_template->db_with_handle

    Testcases:
    No testcase defined.
    #function_args: {CONTENT_TYPE null} {TEMPLATE_ID {}} {USE_CONTEXT null}
    foreach var [list CONTENT_TYPE TEMPLATE_ID USE_CONTEXT]  {
      set varname [string tolower $var]
      if {[info exists $varname]} {
        set $var [set $varname]
        set _$var :$var
      } else {
        set _$var null
      }
    }
    set sql "
    select content_type__unregister_template($_CONTENT_TYPE$_TEMPLATE_ID$_USE_CONTEXT) 
        "
    db_with_handle -dbn $dbn db {
      #ns_log notice "--sql=$sql"
      return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ]
    }