Skip to content

Commit

Permalink
Merge branch 'master' of git@github.com:mongodb/mongo
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Sep 10, 2009
2 parents 7910e29 + 64a1af2 commit f496a2e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tools/export.cpp
Expand Up @@ -37,7 +37,7 @@ class Export : public Tool {
Export() : Tool( "export" ){
add_options()
("query,q" , po::value<string>() , "query filter, as a JSON string" )
("fields,f" , po::value<string>() , "comma seperated list of field names e.g. -f=name,age " )
("fields,f" , po::value<string>() , "comma seperated list of field names e.g. -f name,age" )
("csv","export to csv instead of json")
("out,o", po::value<string>(), "output file; if not specified, stdout is used")
;
Expand All @@ -63,14 +63,15 @@ class Export : public Tool {
printHelp(cerr);
return 1;
}

auth();

if ( hasParam( "fields" ) ){

BSONObjBuilder b;

pcrecpp::StringPiece input( getParam( "fields" ) );
string fields_arg = getParam("fields");
pcrecpp::StringPiece input(fields_arg);

string f;
pcrecpp::RE re("(\\w+),?" );
Expand Down

0 comments on commit f496a2e

Please sign in to comment.