_xotcl-core__xotcl_core_tutorial_3 (private)

 _xotcl-core__xotcl_core_tutorial_3

Defined in packages/xotcl-core/tcl/test/xotcl-core-db-tutorial-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_equals aa_equals (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) _xotcl-core__xotcl_core_tutorial_3 _xotcl-core__xotcl_core_tutorial_3 _xotcl-core__xotcl_core_tutorial_3->aa_equals _xotcl-core__xotcl_core_tutorial_3->aa_log _xotcl-core__xotcl_core_tutorial_3->aa_log_result _xotcl-core__xotcl_core_tutorial_3->aa_run_with_teardown

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{

  aa_run_with_teardown -rollback -test_code {

    ############################################################
    # 3) Create XOTcl classes from existing ACS Object Types
    #    and ACS Attributes based on the definitions in the
    #    database

    set cl [::xo::db::Class get_class_from_db -object_type party]
    aa_equals "fetched class is named ::xo::db::party" "::xo::db::party" $cl

    # XOTcl class ::xo::db::party created (superclass ::xo::db::Object)
    # SQL attributes:
    aa_equals "the SQL attributes are slot names"  [lsort [$cl array names db_slot]]  {email party_id url}


    set cl [::xo::db::Class get_class_from_db -object_type person]
    aa_equals "fetched class is named ::xo::db::person" "::xo::db::person" $cl

    set attributes [lsort [$cl array names db_slot]]
    aa_equals "the SQL attributes $attributes are in slot names"  {1 1 1}  [lmap a {first_names last_name person_id} {
          expr {$a in $attributes}
        }]
  }
}} {
          aa_log "Running testcase body $body_count"
          set ::__aa_test_indent [info level]
          set catch_val [catch $testcase_body msg]
          if {$catch_val != 0 && $catch_val != 2} {
              aa_log_result "fail" "xotcl_core_tutorial_3 (body $body_count): Error during execution: $msg, stack trace: \n$::errorInfo"
          }
          incr body_count
        }
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: