- Timestamp:
- 2018-11-07T18:39:13+13:00 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/plugouts/GreenstoneSQLPlugout.pm
r32578 r32580 42 42 # TODO Q: what about verbosity for debugging, instead of current situation of printing out upon debug set at the expense of writing to db 43 43 # TODO Q: introduced site_name param to plugins and plugouts. Did I do it right? And should they have hiddengli = "yes" 44 # Did I do the pass by ref in docprint's escape and unescape textref functions correctly, and how they're called here? 45 # Any more optimisation I can do around this? 44 46 45 47 # this plugout does not output the metadata and/or fulltxt xml to a file, … … 49 51 } 50 52 51 # NOTTODO: die() statements need to be replaced with premature_termination53 # + NOTTODO: die() statements need to be replaced with premature_termination 52 54 # which should ensure the GreenstoneXMLPlugin (group)'s stuff is closed and cleaned up SOMEHOW 53 55 # It's fine: the die() stmts all take place before setting up the super class' begin 54 56 55 # TODO Q: about build_mode: how to detect removeold. Now handled by57 # + TODO Q: about build_mode: how to detect removeold. Now handled by 56 58 # GreenstoneSQLPlugout::remove_all(), which is inherited from a base plugin. 57 # TODO: deal with -removeold and everything? Or type out instructions for user58 59 # TODO Q: what is "group" in GreenstoneXMLPlugout?59 # + TODO: deal with -removeold and everything? Or type out instructions for user 60 61 # + TODO Q: what is "group" in GreenstoneXMLPlugout? 60 62 61 63 my $process_mode_list = … … 127 129 128 130 my $self= shift (@_); 129 131 130 132 # The saveas.options 131 133 #print STDERR "@@@@ PLUGOUT db_pwd: " . $self->{'db_client_pwd'} . "\n"; … … 143 145 my $db_params = { 144 146 'collection_name' => $ENV{'GSDLCOLLECTION'}, 145 'verbosity' => 1147 'verbosity' => $self->{'verbosity'} || 0 146 148 }; 147 149 … … 226 228 } 227 229 228 # TODO: check arc-inf.db for whether each entry is to be deleted/indexed/reindexed/been indexed?230 # + X TODO: check arc-inf.db for whether each entry is to be deleted/indexed/reindexed/been indexed? 229 231 # That's only for indexing, not for this step which only generates the content in archives dir 230 232 sub saveas { … … 315 317 # from db (unlike for reading back in from doc.xml) 316 318 my $escaped_meta_value = &docprint::escape_text($data->[1]); 317 319 318 320 # Write out the current section's meta to collection db's METADATA table 319 321 … … 322 324 # filling in the values 323 325 # OR if debugging, then it will print the SQL insert statement but not execute it 324 325 $gs_sql->insert_row_into_metadata_table($doc_oid, $section_name, $meta_name, $escaped_meta_value, $self->{'debug'}, $debug_out); 326 327 } 326 327 $gs_sql->insert_row_into_metadata_table($doc_oid, $section_name, $meta_name, $escaped_meta_value, $self->{'debug'}); 328 } 328 329 } 329 330 … … 337 338 # The following will do the SQL insertion 338 339 # or if debug, the following will print the SQL insert stmt without executing it 339 $gs_sql->insert_row_into_fulltxt_table($doc_oid, $section_name, $section_textref, $self->{'debug'} , $debug_out);340 $gs_sql->insert_row_into_fulltxt_table($doc_oid, $section_name, $section_textref, $self->{'debug'}); 340 341 341 342 }
Note:
See TracChangeset
for help on using the changeset viewer.