コード例 #1
0
  void populatePartialMap()
  {
    OsmMapPtr map = ServicesDbTestUtils::createServiceTestMap();

    //It isn't the best thing in the world for this test to have a dependency on
    //OsmApiDbBulkInserter, but it will do for now.
    ApiDb::execSqlFile(
      ServicesDbTestUtils::getOsmApiDbUrl().toString(), "test-files/servicesdb/users.sql");
    OsmApiDbBulkInserter writer;
    writer.setChangesetUserId(1);
    writer.open(ServicesDbTestUtils::getOsmApiDbUrl().toString());
    writer.write(map);
    writer.close();
  }
コード例 #2
0
 void writeAdditionalNewRecords()
 {
   OsmApiDbBulkInserter writer;
   writer.setReserveRecordIdsBeforeWritingData(false);
   writer.setChangesetUserId(1);
   writer.setReserveRecordIdsBeforeWritingData(true);
   writer.setValidateData(true);
   writer.open(ServicesDbTestUtils::getOsmApiDbUrl().toString());
   writer.write(ServicesDbTestUtils::createTestMap1());
   writer.close();
 }