xo::db::sql::content_template proc new (public)
xo::db::sql::content_template new [ -dbn dbn ] -name name \ [ -parent_id parent_id ] [ -template_id template_id ] \ [ -creation_date creation_date ] [ -creation_user creation_user ] \ [ -creation_ip creation_ip ] [ -text text ] [ -is_live is_live ] \ [ -childof childof ]
Defined in /var/www/openacs.org/packages/xotcl-core/tcl/05-db-procs.tcl
Automatically generated method
- Switches:
- -dbn (optional)
- -name (required)
- -parent_id (optional)
- -template_id (optional)
- -creation_date (optional, defaults to
"now"
)- -creation_user (optional)
- -creation_ip (optional)
- -text (optional)
- -is_live (optional, defaults to
"f"
)- -childof (optional)
- Testcases:
- No testcase defined.
Source code: #function_args: {NAME {}} {PARENT_ID null} {TEMPLATE_ID null} {CREATION_DATE now} {CREATION_USER null} {CREATION_IP null} {TEXT null} {IS_LIVE f} foreach var [list NAME PARENT_ID TEMPLATE_ID CREATION_DATE CREATION_USER CREATION_IP TEXT IS_LIVE] { set varname [string tolower $var] if {[info exists $varname]} { set $var [set $varname] set _$var :$var } else { set _$var null } } set sql " select content_template__new($_NAME, $_PARENT_ID, $_TEMPLATE_ID, $_CREATION_DATE, $_CREATION_USER, $_CREATION_IP, $_TEXT, $_IS_LIVE) " db_with_handle -dbn $dbn db { #ns_log notice "--sql=$sql" return [ ns_set value [ns_pg_bind 0or1row $db $sql] 0 ] }XQL Not present: Generic, PostgreSQL, Oracle