本文整理汇总了C++中ArangoClient::parse方法的典型用法代码示例。如果您正苦于以下问题:C++ ArangoClient::parse方法的具体用法?C++ ArangoClient::parse怎么用?C++ ArangoClient::parse使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArangoClient
的用法示例。
在下文中一共展示了ArangoClient::parse方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: ParseProgramOptions
static void ParseProgramOptions (int argc, char* argv[]) {
ProgramOptionsDescription description("STANDARD options");
description
("collection", &Collections, "restrict to collection name (can be specified multiple times)")
("batch-size", &ChunkSize, "maximum size for individual data batches (in bytes)")
("dump-data", &DumpData, "dump collection data")
("include-system-collections", &IncludeSystemCollections, "include system collections")
("output-directory", &OutputDirectory, "output directory")
("overwrite", &Overwrite, "overwrite data in output directory")
("progress", &Progress, "show progress")
("tick-start", &TickStart, "only include data after this tick")
("tick-end", &TickEnd, "last tick to be included in data dump")
;
BaseClient.setupGeneral(description);
BaseClient.setupServer(description);
vector<string> arguments;
description.arguments(&arguments);
ProgramOptions options;
BaseClient.parse(options, description, argc, argv, "arangodump.conf");
if (1 == arguments.size()) {
OutputDirectory = arguments[0];
}
}
示例2: ParseProgramOptions
static void ParseProgramOptions (int argc, char* argv[]) {
ProgramOptionsDescription description("STANDARD options");
description
("collection", &Collections, "restrict to collection name (can be specified multiple times)")
("create-database", &CreateDatabase, "create the target database if it does not exist")
("batch-size", &ChunkSize, "maximum size for individual data batches (in bytes)")
("import-data", &ImportData, "import data into collection")
("recycle-ids", &RecycleIds, "recycle collection and revision ids from dump")
("force", &Force, "continue restore even in the face of some server-side errors")
("create-collection", &ImportStructure, "create collection structure")
("include-system-collections", &IncludeSystemCollections, "include system collections")
("input-directory", &InputDirectory, "input directory")
("overwrite", &Overwrite, "overwrite collections if they exist")
("progress", &Progress, "show progress")
;
BaseClient.setupGeneral(description);
BaseClient.setupServer(description);
vector<string> arguments;
description.arguments(&arguments);
ProgramOptions options;
BaseClient.parse(options, description, "", argc, argv, "arangorestore.conf");
if (1 == arguments.size()) {
InputDirectory = arguments[0];
}
}
示例3: ParseProgramOptions
static void ParseProgramOptions (int argc, char* argv[]) {
ProgramOptionsDescription description("STANDARD options");
description
("async", &Async, "send asynchronous requests")
("concurrency", &ThreadConcurrency, "number of parallel connections")
("requests", &Operations, "total number of operations")
("batch-size", &BatchSize, "number of operations in one batch (0 disables batching)")
("keep-alive", &KeepAlive, "use HTTP keep-alive")
("collection", &Collection, "collection name to use in tests")
("test-case", &TestCase, "test case to use (possible values: version, document, collection, import-document, hash, skiplist, edge, shapes, shapes-append, random-shapes, crud, crud-append, crud-write-read, aqltrx, counttrx, multitrx, multi-collection, aqlinsert, aqlv8)")
("complexity", &Complexity, "complexity parameter for the test")
("delay", &Delay, "use a startup delay (necessary only when run in series)")
("progress", &Progress, "show progress")
("verbose", &verbose, "print out replies if the http-header indicates db-errors")
;
BaseClient.setupGeneral(description);
BaseClient.setupServer(description);
vector<string> arguments;
description.arguments(&arguments);
ProgramOptions options;
BaseClient.parse(options, description, "--concurrency <concurrency> --requests <request> --test-case <case> ...", argc, argv, "arangob.conf");
}
示例4: ParseProgramOptions
static void ParseProgramOptions (int argc, char* argv[]) {
ProgramOptionsDescription description("STANDARD options");
ProgramOptionsDescription ruby("RUBY options");
ruby
("ruby.directory", &StartupPath, "startup paths containing the Ruby files; multiple directories can be separated by cola")
("ruby.modules-path", &StartupModules, "one or more directories separated by cola")
;
description
(ruby, false)
;
// fill in used options
BaseClient.setupGeneral(description);
BaseClient.setupServer(description);
// and parse the command line and config file
ProgramOptions options;
BaseClient.parse(options, description, argc, argv, "arangoirb.conf");
// check module path
if (StartupModules.empty()) {
LOGGER_FATAL_AND_EXIT("module path not known, please use '--ruby.modules-path'");
}
}
示例5: ParseProgramOptions
static void ParseProgramOptions (int argc, char* argv[]) {
ProgramOptionsDescription deprecatedOptions("DEPRECATED options");
deprecatedOptions
("max-upload-size", &ChunkSize, "size for individual data batches (in bytes)")
;
ProgramOptionsDescription description("STANDARD options");
description
("file", &FileName, "file name (\"-\" for STDIN)")
("batch-size", &ChunkSize, "size for individual data batches (in bytes)")
("collection", &CollectionName, "collection name")
("create-collection", &CreateCollection, "create collection if it does not yet exist")
("type", &TypeImport, "type of file (\"csv\", \"tsv\", or \"json\")")
("quote", &Quote, "quote character(s)")
("separator", &Separator, "separator")
("progress", &Progress, "show progress")
(deprecatedOptions, true)
;
BaseClient.setupGeneral(description);
BaseClient.setupServer(description);
vector<string> arguments;
description.arguments(&arguments);
ProgramOptions options;
BaseClient.parse(options, description, "--file <file> --type <type> --collection <collection>", argc, argv, "arangoimp.conf");
if (FileName == "" && arguments.size() > 0) {
FileName = arguments[0];
}
}
示例6: ParseProgramOptions
static void ParseProgramOptions (int argc, char* argv[]) {
ProgramOptionsDescription description("STANDARD options");
description
("async", &Async, "send asychronous requests")
("concurrency", &Concurrency, "number of parallel connections")
("requests", &Operations, "total number of operations")
("batch-size", &BatchSize, "number of operations in one batch (0 disables batching)")
("keep-alive", &KeepAlive, "use HTTP keep-alive")
("collection", &Collection, "collection name to use in tests")
("test-case", &TestCase, "test case to use")
("complexity", &Complexity, "complexity parameter for the test")
("delay", &Delay, "use a startup delay (necessary only when run in series)")
("progress", &Progress, "show progress")
;
BaseClient.setupGeneral(description);
BaseClient.setupServer(description);
vector<string> arguments;
description.arguments(&arguments);
ProgramOptions options;
BaseClient.parse(options, description, "--concurrency <concurrency> --requests <request> --test-case <case> ...", argc, argv, "arangob.conf");
}