_tsearch2-driver__index_unindex (private)

 _tsearch2-driver__index_unindex

Defined in packages/tsearch2-driver/tcl/test/tsearch2-driver-procs.tcl

Partial Call Graph (max 5 caller/called nodes):
%3 aa_false aa_false (public) aa_log aa_log (public) aa_log_result aa_log_result (public) aa_run_with_teardown aa_run_with_teardown (public) aa_true aa_true (public) _tsearch2-driver__index_unindex _tsearch2-driver__index_unindex _tsearch2-driver__index_unindex->aa_false _tsearch2-driver__index_unindex->aa_log _tsearch2-driver__index_unindex->aa_log_result _tsearch2-driver__index_unindex->aa_run_with_teardown _tsearch2-driver__index_unindex->aa_true

Testcases:
No testcase defined.
Source code:
        
        set _aa_export {}
        set body_count 1
        foreach testcase_body {{
    aa_run_with_teardown -rollback -test_code {
        #
        # Create test object
        #
        set object_id [package_instantiate_object acs_object]
        #
        # Check that index does not exist yet
        #
        aa_false "Index does not exist yet"  [tsearch2::index_exists_p $object_id]
        #
        # Index the object
        #
        set txt "This is just a test object"
        set title "Test object"
        set keywords "test foo bar"
        aa_log "Indexing object_id $object_id"
        tsearch2::index $object_id $txt $title $keywords
        #
        # Check if exists and looks ok
        #
        aa_true "Index exists"      [tsearch2::index_exists_p $object_id]
        aa_true "Index is correct"  [tsearch2::indexed_keywords_p  -object_id $object_id -keywords $keywords]
        #
        # Update object
        #
        set txt "This is just a test object with edited text"
        set title "Test object updated"
        set keywords "test foo bar monger"
        tsearch2::index $object_id $txt $title $keywords
        #
        # Check if the keywords have been updated in the index
        #
        aa_true "Index is correct"  [tsearch2::indexed_keywords_p  -object_id $object_id -keywords $keywords]
        #
        # Unindex object
        #
        aa_log "Unindexing object_id $object_id"
        tsearch2::unindex $object_id
        aa_false "Index does not exist anymore"  [tsearch2::index_exists_p $object_id]
    }
}} {
          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" "index_unindex (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: