Class ::xo::db::chat_transcript (public)
::xo::db::Class ::xo::db::chat_transcript
Defined in
- Testcases:
-
No testcase defined.
Source code:
namespace eval ::xo::db {}
::nsf::object::alloc ::xo::db::Class ::xo::db::chat_transcript {set :__default_metaclass ::xotcl::Class
set :__default_superclass ::xotcl::Object
set :abstract_p f
set :auto_save false
array set :db_constraints {pretty_name not_null room_id {{references {chat_rooms(room_id) on delete cascade}}} contents not_null}
array set :db_slot {description ::xo::db::chat_transcript::slot::description pretty_name ::xo::db::chat_transcript::slot::pretty_name room_id ::xo::db::chat_transcript::slot::room_id contents ::xo::db::chat_transcript::slot::contents transcript_id ::xo::db::chat_transcript::slot::transcript_id}
set :id_column transcript_id
set :name_method {}
set :object_type chat_transcript
set :object_type_key 0000000000110110
set :pretty_name #chat.Transcript#
set :pretty_plural #chat.Transcripts#
set :security_inherit_p t
set :sql_package_name ::xo::db::chat_transcript
set :supertype acs_object
set :table_name chat_transcripts
set :with_table true}
::xo::db::chat_transcript instproc save_new args {
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_id
}
::xo::db::chat_transcript instproc insert {} {
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 ,:])"
}
::xo::db::chat_transcript instproc update {} {
::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
}
}
}
::xo::db::chat_transcript instparametercmd pretty_name
::xo::db::chat_transcript instparametercmd description
::xo::db::chat_transcript instparametercmd room_id
::xo::db::chat_transcript instparametercmd transcript_id
::xo::db::chat_transcript instparametercmd contents
::nsf::relation::set ::xo::db::chat_transcript superclass ::xo::db::Object
::nx::slotObj -container slot ::xo::db::chat_transcript
::nsf::object::alloc ::xo::db::Attribute ::xo::db::chat_transcript::slot::description {set :accessor public
set :column_name description
set :configurable true
set :convert false
set :create_acs_attribute true
set :create_table_attribute true
set :datatype text
set :defaultmethods {}
set :disposition alias
set :domain ::xo::db::chat_transcript
set :incremental false
set :manager ::xo::db::chat_transcript::slot::description
set :max_n_values 1
set :methodname description
set :min_n_values 1
set :multiplicity 1..1
set :name description
set :per-object false
set :position 0
set :pretty_name #xo.chat_transcript-description#
set :pretty_plural {}
set :references {}
set :required false
set :sqltype varchar(2000)
set :trace none
: init}
::nsf::object::alloc ::xo::db::Attribute ::xo::db::chat_transcript::slot::pretty_name {set :accessor public
set :column_name pretty_name
set :configurable true
set :convert false
set :create_acs_attribute true
set :create_table_attribute true
set :datatype text
set :defaultmethods {}
set :disposition alias
set :domain ::xo::db::chat_transcript
set :incremental false
set :manager ::xo::db::chat_transcript::slot::pretty_name
set :max_n_values 1
set :methodname pretty_name
set :min_n_values 1
set :multiplicity 1..1
set :name pretty_name
set :not_null true
set :per-object false
set :position 0
set :pretty_name #xo.chat_transcript-pretty_name#
set :pretty_plural {}
set :references {}
set :required false
set :sqltype varchar(100)
set :trace none
: init}
::nsf::object::alloc ::xo::db::Attribute ::xo::db::chat_transcript::slot::room_id {set :accessor public
set :column_name room_id
set :configurable true
set :convert false
set :create_acs_attribute true
set :create_table_attribute true
set :datatype integer
set :defaultmethods {}
set :disposition alias
set :domain ::xo::db::chat_transcript
set :incremental false
set :manager ::xo::db::chat_transcript::slot::room_id
set :max_n_values 1
set :methodname room_id
set :min_n_values 1
set :multiplicity 1..1
set :name room_id
set :per-object false
set :position 0
set :pretty_name #xo.chat_transcript-room_id#
set :pretty_plural {}
set :references {chat_rooms(room_id) on delete cascade}
set :required false
set :sqltype integer
set :trace none
: init}
::nsf::object::alloc ::xo::db::Attribute ::xo::db::chat_transcript::slot::contents {set :accessor public
set :column_name contents
set :configurable true
set :convert false
set :create_acs_attribute true
set :create_table_attribute true
set :datatype text
set :defaultmethods {}
set :disposition alias
set :domain ::xo::db::chat_transcript
set :incremental false
set :manager ::xo::db::chat_transcript::slot::contents
set :max_n_values 1
set :methodname contents
set :min_n_values 1
set :multiplicity 1..1
set :name contents
set :not_null true
set :per-object false
set :position 0
set :pretty_name #xo.chat_transcript-contents#
set :pretty_plural {}
set :references {}
set :required false
set :sqltype varchar(32000)
set :trace none
: init}
::nsf::object::alloc ::xo::db::Attribute ::xo::db::chat_transcript::slot::transcript_id {set :accessor public
set :column_name transcript_id
set :configurable true
set :convert false
set :create_acs_attribute false
set :create_table_attribute true
set :datatype integer
set :defaultmethods {}
set :disposition alias
set :domain ::xo::db::chat_transcript
set :incremental false
set :manager ::xo::db::chat_transcript::slot::transcript_id
set :max_n_values 1
set :methodname transcript_id
set :min_n_values 1
set :multiplicity 1..1
set :name transcript_id
set :per-object false
set :position 0
set :pretty_name ID
set :pretty_plural {}
set :references {}
set :required false
set :sqltype integer
set :trace none
: init}
XQL Not present:Generic, PostgreSQL, Oracle
[
hide source ]
| [
make this the default ]