nntp::Session method group (public)
<instance of nntp::Session> group name
Defined in packages/xowiki/tcl/nntp-procs.tcl
update all entries from the specified group
- Parameters:
- name (required)
- Testcases:
- No testcase defined.
Source code: :writeLine "GROUP $name" lassign [:readLine] status nr available_from available_to groupname ns_log notice "FROM $available_from TO $available_to" if {$available_from eq ""} { error "nntp group '$name': status '$status' available_from must not be empty" } lassign [lindex [acs::dc list_of_lists -prepare text dbqd..get_group_info { select nntp_id, last_id from nntp_groups where name = :name }] 0] nntp_id last_id set count 1000 set fetched_articles [::acs::dc list -prepare integer dbqd..fetch_article_ids { select article_id from nntp_articles where nntp_id = :nntp_id }] ns_log notice "LAST_ID $last_id available_from $available_from, we have [llength $fetched_articles] articles loaded" for {set article_id $available_from} {$article_id <= $available_to} {incr article_id} { if {0 && $last_id > $article_id} { # # Optimization, don't use it, if we want to refetch some articles # continue } if {[incr count -1] < 0} break if {$article_id in $fetched_articles} { continue } ns_log notice FETCH ARTICLE $article_id set d [:readArticle $article_id] ns_log notice INSERT ARTICLE $article_id: $d ::xo::dc transaction { xo::dc dml insert_article { insert into nntp_articles (article_id, nntp_id, dict) values (:article_id, :nntp_id, :d) } xo::dc dml update_last_id { update nntp_groups set last_id = :article_id } } }XQL Not present: Generic, PostgreSQL, Oracle