Inicio de la navegación principal
Methods: | Source: | Variables: |
---|---|---|
[All Methods | Documented Methods | Hide Methods] | [Display Source | Hide Source] | [Show Variables | Hide Variables] |
Class Hierarchy of ::xo::db::Class
::xo::db::Class is a meta class for interfacing with acs_object_types. acs_object_types are instances of this meta class. The meta class defines the behavior common to all acs_object_types. The behavior common to all acs_objects is defined by the class ::xo::db::Object.
- ::xotcl::Object
![]()
- Meta-class:
- ::xotcl::Class
- Methods for instances:
- __api_make_doc, __api_make_forward_doc, __nextC, __timediff, abstract, ad_doc, ad_forward, ad_proc, appendC, arrayC, asHTML, autonameC, checkC, classC, cleanupC, configureC, contains, copy, db_1rowC, debug, defaultmethod, destroyC, destroy_on_cleanup, evalC, existsC, extractConfigureArg, filterC, filterguardC, filtersearchC, forwardC, hasclass, incrC, infoC, init, instvarC, invarC, isclassC, ismetaclassC, ismixinC, isobjectC, istypeC, lappendC, log, method, mixinC, mixinguardC, move, msg, noinitC, parametercmdC, procC, procsearchC, qn, requireNamespaceC, self, serialize, setC, substC, traceC, unsetC, uplevelC, upvarC, volatileC, vwaitC
- Methods to be applied on the class (in addition to the methods provided by the meta-class):
- __exitHandler, getExitHandler, setExitHandler, unsetExitHandler
- ::xotcl::Class
![]()
- Meta-class:
- ::xotcl::Class
- Methods for instances:
- ad_instproc, allinstances, allocC, autonameC, createC, extend_slot, infoC, instdestroyC, instfilterC, instfilterguardC, instforwardC, instinvarC, instmixinC, instmixinguardC, instparametercmdC, instprocC, method, newC, parameter, parameterclassC, recreateC, slotsC, superclassC, unknownC, uses
- Methods to be applied on the class (in addition to the methods provided by the meta-class):
- __unknown
- ::xo::db::Class
![]()
- Meta-class:
- ::xotcl::Class
- Parameter for instances:
- abstract_p (default "f"), auto_save (default "false"), id_column, name_method (default ""), object_type (default "[self]"), pretty_name, pretty_plural, security_inherit_p (default "t"), sql_package_name, supertype (default "acs_object"), table_name, with_table (default "true")
- Methods for instances:
- check_default_values, check_table_atts, create_object_type, db_slots, dbproc_nonposargs, drop_object_type, fetch_query, fix_function_args, generate_proc_body, generate_psql, get_context, get_function_args, get_instances_from_db, init, init_type_hierarchy, initialize_acs_object, instance_select_query, instantiate_objects, mk_insert_method, mk_save_method, new_acs_object, new_persistent_object, object_types, object_types_query, sql-arguments, table_definition, unknown
- Methods to be applied on the class (in addition to the methods provided by the meta-class):
- class_to_object_type, create_all_functions, delete, delete_all_acs_objects, drop_type, exists_in_db, get_all_package_functions, get_class_from_db, get_instance_from_db, get_object_type, get_table_name, object_type_exists_in_db, object_type_to_class
Defined in packages/xotcl-core/tcl/05-db-procs.tcl
Class Relations
::xo::db::Classdelete -id id
Delete the object from the database
- Switches:
- -id (required)
::xo::db::Classdelete_all_acs_objects -object_type object_type
Delete all acs_objects of the object_type from the database.
- Switches:
- -object_type (required)
::xo::db::Classdrop_type -object_type object_type \ [ -drop_table drop_table ] [ -cascade_p cascade_p ]
Drop the object_type from the database and drop optionally the table. This method deletes as well all acs_objects of the object_type from the database.
- Switches:
- -object_type (required)
- -drop_table (defaults to
"f"
) (optional)- -cascade_p (defaults to
"t"
) (optional)
::xo::db::Classexists_in_db -id id
Check, if an acs_object exists in the database.
- Switches:
- -id (required)
- Returns:
- 0 or 1
::xo::db::Classget_class_from_db [ -object_type object_type ]
Fetch an acs_object_type from the database and create an XOTcl class from this information.
- Switches:
- -object_type (optional)
- Returns:
- class name of the created XOTcl class
::xo::db::Classget_instance_from_db -id id
Create an XOTcl object from an acs_object_id. This method determines the type and initializes the object from the information stored in the database. The XOTcl object is destroyed automatically on cleanup (end of a connection request).
- Switches:
- -id (required)
- Returns:
- fully qualified object
::xo::db::Classget_object_type -id id
Return the object type for the give id.
- Switches:
- -id (required)
- Returns:
- object_type, typically an XOTcl class
::xo::db::Classget_table_name -object_type object_type
Get the table_name of an object_type from the database. If the object_type does not exist, the return value is empty.
- Switches:
- -object_type (required)
- Returns:
- table_name
::xo::db::Classobject_type_exists_in_db [ -object_type object_type ]
Check, if an object_type exists in the database.
- Switches:
- -object_type (optional)
- Returns:
- 0 or 1
<instance of ::xo::db::Class> check_table_atts
Check table_name and id_column and set meaningful defaults, if these attributes are not provided.
<instance of ::xo::db::Class> create_object_type
Create an acs object_type for the current XOTcl class
<instance of ::xo::db::Class> drop_object_type \ [ -cascade cascade ]
Drop an acs object_type; cascde true means that the attributes are droped as well.
- Switches:
- -cascade (defaults to
"true"
) (optional)
<instance of ::xo::db::Class> get_instances_from_db \ [ -select_attributes select_attributes ] \ [ -from_clause from_clause ] [ -where_clause where_clause ] \ [ -orderby orderby ] [ -page_size page_size ] \ [ -page_number page_number ]
Returns a set (ordered composite) of the answer tuples of an 'instance_select_query' with the same attributes. Note, that the returned objects might by partially instantiated.
- Switches:
- -select_attributes (optional)
- -from_clause (optional)
- -where_clause (optional)
- -orderby (optional)
- -page_size (defaults to
"20"
) (optional)- -page_number (optional)
- Returns:
- ordered composite
<instance of ::xo::db::Class> instance_select_query \ [ -select_attributes select_attributes ] [ -orderby orderby ] \ [ -where_clause where_clause ] [ -from_clause from_clause ] \ [ -count on|off ] [ -page_size page_size ] \ [ -page_number page_number ]
Returns the SQL-query to select ACS Objects of the object_type of the class.
- Switches:
- -select_attributes (optional)
- -orderby (optional)
- for ordering the solution set
- -where_clause (optional)
- clause for restricting the answer set
- -from_clause (optional)
- -count (boolean) (defaults to
"false"
) (optional)- return the query for counting the solutions
- -page_size (defaults to
"20"
) (optional)- -page_number (optional)
- Returns:
- SQL query
<instance of ::xo::db::Class> instantiate_objects [ -dbn dbn ] \ [ -sql sql ] [ -full_statement_name full_statement_name ] \ [ -as_ordered_composite on|off ] [ -object_class object_class ] \ [ -named_objects on|off ] [ -destroy_on_cleanup on|off ]
Retrieve multiple objects from the database using the given SQL query and create XOTcl objects from the tuples.
- Switches:
- -dbn (optional)
- -sql (optional)
- The SQL query to retrieve tuples. Note that if the SQL query only returns a restricted set of attributes, the objects will be only partially instantiated.
- -full_statement_name (optional)
- -as_ordered_composite (boolean) (defaults to
"true"
) (optional)- return an ordered composite object preserving the order. If the flag is false, one has to use "info instances" to access the resulted objects.
- -object_class (defaults to
"::xotcl::Object"
) (optional)- specifies the XOTcl class, for which instances are created.
- -named_objects (boolean) (defaults to
"false"
) (optional)- -destroy_on_cleanup (boolean) (defaults to
"true"
) (optional)
<instance of ::xo::db::Class> new_persistent_object \ [ -package_id package_id ] [ -creation_user creation_user ] \ [ -creation_ip creation_ip ] args [ args... ]
Create a new instance of the given class, configure it with the given arguments and insert it into the database. The XOTcl object is destroyed automatically on cleanup (end of a connection request).
- Switches:
- -package_id (optional)
- -creation_user (optional)
- -creation_ip (optional)
- Parameters:
- args
- Returns:
- fully qualified object
<instance of ::xo::db::Class> object_types \ [ -subtypes_first on|off ]
Return the type and subtypes of the class, on which the method is called. If subtypes_first is specified, the subtypes are returned first.
- Switches:
- -subtypes_first (boolean) (defaults to
"false"
) (optional)- Returns:
- list of object_types
::xo::db::Object, ::xo::db::apm_parameter
, ::xo::db::sql::acs
, ::xo::db::sql::acs_activity
, ::xo::db::sql::acs_attribute
, ::xo::db::sql::acs_event
, ::xo::db::sql::acs_group
, ::xo::db::sql::acs_log
, ::xo::db::sql::acs_mail_body
, ::xo::db::sql::acs_mail_gc_object
, ::xo::db::sql::acs_mail_link
, ::xo::db::sql::acs_mail_multipart
, ::xo::db::sql::acs_mail_nt
, ::xo::db::sql::acs_mail_queue_message
, ::xo::db::sql::acs_message
, ::xo::db::sql::acs_object
, ::xo::db::sql::acs_object_type
, ::xo::db::sql::acs_object_util
, ::xo::db::sql::acs_permission
, ::xo::db::sql::acs_privilege
, ::xo::db::sql::acs_reference
, ::xo::db::sql::acs_rel
, ::xo::db::sql::acs_rel_type
, ::xo::db::sql::acs_sc_binding
, ::xo::db::sql::acs_sc_contract
, ::xo::db::sql::acs_sc_impl
, ::xo::db::sql::acs_sc_impl_alias
, ::xo::db::sql::acs_sc_msg_type
, ::xo::db::sql::acs_sc_operation
, ::xo::db::sql::acs_user
, ::xo::db::sql::admin_rel
, ::xo::db::sql::alf_admission
, ::xo::db::sql::alf_bounce_emails
, ::xo::db::sql::alf_cluster_message
, ::xo::db::sql::alf_cluster_node
, ::xo::db::sql::alf_dotlrn_department
, ::xo::db::sql::alf_dotlrn_faculty
, ::xo::db::sql::alf_edu_audit
, ::xo::db::sql::alf_process_manager
, ::xo::db::sql::alf_study
, ::xo::db::sql::alf_study_community
, ::xo::db::sql::alf_undergraduate
, ::xo::db::sql::apm
, ::xo::db::sql::apm_application
, ::xo::db::sql::apm_package
, ::xo::db::sql::apm_package_type
, ::xo::db::sql::apm_package_version
, ::xo::db::sql::apm_parameter_value
, ::xo::db::sql::apm_service
, ::xo::db::sql::application_group
, ::xo::db::sql::as_action
, ::xo::db::sql::as_backup
, ::xo::db::sql::as_inter_item_check
, ::xo::db::sql::assignation_rel
, ::xo::db::sql::authority
, ::xo::db::sql::bulk_mail
, ::xo::db::sql::cal_item
, ::xo::db::sql::calendar
, ::xo::db::sql::category
, ::xo::db::sql::category_link
, ::xo::db::sql::category_synonym
, ::xo::db::sql::category_tree
, ::xo::db::sql::chat_room
, ::xo::db::sql::chat_transcript
, ::xo::db::sql::composition_rel
, ::xo::db::sql::content_extlink
, ::xo::db::sql::content_folder
, ::xo::db::sql::content_item
, ::xo::db::sql::content_keyword
, ::xo::db::sql::content_permission
, ::xo::db::sql::content_revision
, ::xo::db::sql::content_symlink
, ::xo::db::sql::content_template
, ::xo::db::sql::content_type
, ::xo::db::sql::develop_audit
, ::xo::db::sql::doc
, ::xo::db::sql::dotlrn_admin_profile_rel
, ::xo::db::sql::dotlrn_admin_rel
, ::xo::db::sql::dotlrn_ca_rel
, ::xo::db::sql::dotlrn_cadmin_rel
, ::xo::db::sql::dotlrn_class
, ::xo::db::sql::dotlrn_class_instance
, ::xo::db::sql::dotlrn_club
, ::xo::db::sql::dotlrn_community
, ::xo::db::sql::dotlrn_community_type
, ::xo::db::sql::dotlrn_department
, ::xo::db::sql::dotlrn_external_profile_rel
, ::xo::db::sql::dotlrn_instructor_rel
, ::xo::db::sql::dotlrn_member_rel
, ::xo::db::sql::dotlrn_privacy
, ::xo::db::sql::dotlrn_professor_profile_rel
, ::xo::db::sql::dotlrn_student_profile_rel
, ::xo::db::sql::dotlrn_student_rel
, ::xo::db::sql::dotlrn_ta_rel
, ::xo::db::sql::dotlrn_user_profile_rel
, ::xo::db::sql::evaluation
, ::xo::db::sql::evaluation_stats
, ::xo::db::sql::faq
, ::xo::db::sql::file_storage
, ::xo::db::sql::forums_forum
, ::xo::db::sql::forums_message
, ::xo::db::sql::forums_tag
, ::xo::db::sql::forums_view
, ::xo::db::sql::gm_enlaces
, ::xo::db::sql::homepage
, ::xo::db::sql::image
, ::xo::db::sql::journal_entry
, ::xo::db::sql::membership_rel
, ::xo::db::sql::new_stuff_portlet
, ::xo::db::sql::news
, ::xo::db::sql::notification
, ::xo::db::sql::notification_delivery_method
, ::xo::db::sql::notification_interval
, ::xo::db::sql::notification_reply
, ::xo::db::sql::notification_request
, ::xo::db::sql::notification_type
, ::xo::db::sql::party
, ::xo::db::sql::party_approved_member
, ::xo::db::sql::person
, ::xo::db::sql::pinds_blog_category
, ::xo::db::sql::pinds_blog_entry
, ::xo::db::sql::portal
, ::xo::db::sql::portal_datasource
, ::xo::db::sql::portal_element_theme
, ::xo::db::sql::portal_layout
, ::xo::db::sql::portal_page
, ::xo::db::sql::profiled_group
, ::xo::db::sql::quiz
, ::xo::db::sql::quiz_session
, ::xo::db::sql::recurrence
, ::xo::db::sql::rel_constraint
, ::xo::db::sql::rel_segment
, ::xo::db::sql::research_rel
, ::xo::db::sql::rss_gen_subscr
, ::xo::db::sql::search_observer
, ::xo::db::sql::site_node
, ::xo::db::sql::site_node_object_map
, ::xo::db::sql::static_portal_content_item
, ::xo::db::sql::subsite_callback
, ::xo::db::sql::survey
, ::xo::db::sql::survey_predefined_question
, ::xo::db::sql::survey_question
, ::xo::db::sql::survey_response
, ::xo::db::sql::survey_section
, ::xo::db::sql::teaching_rel
, ::xo::db::sql::template_demo_note
, ::xo::db::sql::time_interval
, ::xo::db::sql::timespan
, ::xo::db::sql::timezone
, ::xo::db::sql::tree
, ::xo::db::sql::uforums
, ::xo::db::sql::user_pref_type
, ::xo::db::sql::user_profile_rel
, ::xo::db::sql::util
, ::xo::db::sql::views_view
, ::xo::db::sql::weblogger_blogroll_entry
, ::xo::db::sql::weblogger_channel
Methods: | Source: | Variables: |
---|---|---|
[All Methods | Documented Methods | Hide Methods] | [Display Source | Hide Source] | [Show Variables | Hide Variables] |