@@ -131,9 +131,8 @@ void print_version()
131131
132132static void check_options_non_slim (CLI::App const &app)
133133{
134- std::array<std::string, 7 > const slim_options = {
134+ std::array<std::string, 6 > const slim_options = {
135135 " --flat-nodes" ,
136- " --middle-database-format" ,
137136 " --middle-schema" ,
138137 " --middle-with-nodes" ,
139138 " --middle-way-node-index-id-shift" ,
@@ -525,13 +524,6 @@ options_t parse_command_line(int argc, char *argv[])
525524 ->type_name (" SCHEMA" )
526525 ->group (" Middle options" );
527526
528- std::string middle_database_format_raw;
529- // --middle-database-format
530- app.add_option (" --middle-database-format" , middle_database_format_raw)
531- ->description (" Set middle db format ('legacy', 'new' (default))." )
532- ->type_name (" FORMAT" )
533- ->group (" Middle options" );
534-
535527 // --middle-with-nodes
536528 app.add_flag (" --middle-with-nodes" , options.middle_with_nodes )
537529 ->description (" Store tagged nodes in db (new middle db format only)." )
@@ -651,28 +643,7 @@ options_t parse_command_line(int argc, char *argv[])
651643 check_options (&options);
652644
653645 if (options.slim ) { // slim mode, use database middle
654- if (middle_database_format_raw.empty ()) {
655- // Database format not set on the command line, use defaults. For
656- // append mode we keep old default for backwards compatibility, for
657- // create mode the new format is the default. (These will possibly
658- // be overwritten later by properties setting if it exists.)
659- options.middle_database_format = options.append ? 1 : 2 ;
660- } else if (options.append ) {
661- // Database format set on command line in append mode.
662- throw std::runtime_error{
663- " Do not use --middle-database-format with --append." };
664- } else {
665- // Database format set on the command line in create mode.
666- if (middle_database_format_raw == " legacy" ) {
667- options.middle_database_format = 1 ;
668- } else if (middle_database_format_raw == " new" ) {
669- options.middle_database_format = 2 ;
670- } else {
671- throw std::runtime_error{
672- " Unknown value for --middle-database-format"
673- " (Use 'legacy' or 'new')." };
674- }
675- }
646+ options.middle_database_format = 2 ;
676647 } else { // non-slim mode, use ram middle
677648 check_options_non_slim (app);
678649 }
0 commit comments