- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables
Class ::xo::db::chat_transcript
::xo::db::chat_transcriptcreate ...
Defined in
Class Relations
::xo::db::Class create ::xo::db::chat_transcript \ -superclass ::xo::db::ObjectMethods (to be applied on instances)
contents (setter)
description (setter)
insert (scripted)
set __table_name [[self class] table_name] set __id [[self class] id_column] set :$__id ${:object_id} :log "ID insert in $__table_name, id = $__id = [set :$__id]" next foreach {__slot_name __slot} [[self class] array get db_slot] { if {[info exists :$__slot_name]} { set $__slot_name [set :$__slot_name] lappend __vars $__slot_name lappend __atts [$__slot column_name] } } ::xo::dc dml insert_$__table_name "insert into $__table_name ([join $__atts ,]) values (:[join $__vars ,:])"pretty_name (setter)
room_id (setter)
save_new (scripted, public)
<instance of xo::db::chat_transcript> save_new args [ args... ]
Save a new transcript, making sure its creator is granted the necessary operative privileges.
- Parameters:
- args (required)
- Returns:
- new transcript id
- Testcases:
- No testcase defined.
if {![info exists :context_id]} { set :context_id ${:package_id} } ::xo::dc transaction { set transcript_id [next] foreach privilege {edit view delete} { permission::grant -party_id ${:creation_user} -object_id ${:transcript_id} -privilege chat_transcript_${privilege} } } return $transcript_idtranscript_id (setter)
update (scripted)
::xo::dc transaction { next :instvar object_id pretty_name description room_id contents ::xo::dc dml update_chat_transcripts {update chat_transcripts set pretty_name = :pretty_name,description = :description,room_id = :room_id,contents = :contents where transcript_id = :object_id } }
- Methods: All Methods Documented Methods Hide Methods
- Source: Display Source Hide Source
- Variables: Show Variables Hide Variables