-#include "modules/lmdbbackend/lmdbbackend.hh"
#ifdef HAVE_CONFIG_H
#include "config.h"
#endif
return EXIT_FAILURE;
}
- cerr<<"di.id="<<di.id<<endl;
rr.domain_id = di.id;
di.backend->startTransaction(zone, di.id);
di.backend->feedRecord(rr, DNSName());
cout << "test-schema ZONE Test DB schema - will create ZONE" << endl;
cout << "raw-lua-from-content TYPE CONTENT Display record contents in a form suitable for dnsdist's `SpoofRawAction`" << endl;
cout << "zonemd-verify-file ZONE FILE Validate ZONEMD for ZONE" << endl;
+ cout << "lmdb-get-backend-version Get schema version supported by backend" << endl;
cout << desc << endl;
return 0;
loadMainConfig(g_vm["config-dir"].as<string>());
- if (cmds.at(0) == "lmdb-get-schema-version") {
- // FIXME: add command to help
- if(cmds.size() != 2) {
- cerr << "Syntax: pdnsutil lmdb-get-schema-version /path/to/pdns.lmdb"<<endl;
- return 0;
- }
-
- auto res = LMDBBackend::getSchemaVersionAndShards(cmds.at(1));
- cerr << "schemaversion: "<<res.first<<endl;
- cerr << "shards: "<<res.second<<endl;
- cout << res.first <<endl;
-
+ if (cmds.at(0) == "lmdb-get-backend-version") {
+ cout << "5" << endl; // FIXME this should reuse the constant from lmdbbackend but that is currently a #define in a .cc
return 0;
}
if (cmds.at(0) == "test-algorithm") {