Changeset 15800

Show
Ignore:
Timestamp:
29.05.2008 15:42:27 (11 years ago)
Author:
mdewsnip
Message:

(Adding dynamic classifiers) Added check for empty metadata_element_name in get_metadata_values().

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/lib/sqlitedbclass.cpp

    r15798 r15800  
    151151  text_tarray metadata_values; 
    152152 
    153   // Get all the entries in the "value" column of the "document_metadata" table 
     153  // Check a metadata element has been specified 
     154  if (metadata_element_name == "") 
     155  { 
     156    return metadata_values; 
     157  } 
     158 
     159  // Get the entries in the "value" column of the "document_metadata" table where the element matches 
    154160  text_t sql_cmd = "SELECT value FROM document_metadata WHERE element='" + metadata_element_name + "'"; 
    155161  vector<text_tmap> sql_results;