Skip to content

Commit

Permalink
sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
ullingerc committed Nov 15, 2024
1 parent 93e352e commit a41644f
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/engine/SpatialJoin.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ struct MaxDistanceConfig {
};

// Selection of a SpatialJoin algorithm
enum SpatialJoinAlgorithm {
enum class SpatialJoinAlgorithm {
BASELINE,
S2_GEOMETRY
// BOUNDING_BOX
Expand Down
3 changes: 3 additions & 0 deletions src/engine/SpatialJoinAlgorithms.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@
#include "engine/SpatialJoin.h"
#include "util/GeoSparqlHelpers.h"

// TODO<ullingerc> dist (for binddist) should not be floored to whole meters in
// int and should be in km

// ____________________________________________________________________________
SpatialJoinAlgorithms::SpatialJoinAlgorithms(
QueryExecutionContext* qec, PreparedSpatialJoinParams params,
Expand Down
2 changes: 1 addition & 1 deletion src/parser/GraphPatternOperation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ PathSearchConfiguration PathQuery::toPathSearchConfiguration(

// ____________________________________________________________________________
Variable MagicServiceQuery::getVariable(std::string_view parameter,
const TripleComponent& object) {
const TripleComponent& object) const {
if (!object.isVariable()) {
throw MagicServiceException(absl::StrCat("The value ", object.toString(),
" for parameter '", parameter,
Expand Down
23 changes: 22 additions & 1 deletion src/parser/GraphPatternOperation.h
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,13 @@ struct MagicServiceQuery {
// The graph pattern inside the SERVICE
GraphPattern childGraphPattern_;

MagicServiceQuery() = default;
MagicServiceQuery(MagicServiceQuery&& other) = default;
MagicServiceQuery(const MagicServiceQuery& other) = default;
MagicServiceQuery& operator=(const MagicServiceQuery& other) = default;
MagicServiceQuery& operator=(MagicServiceQuery&& a) noexcept = default;
virtual ~MagicServiceQuery() = default;

/**
* @brief Add a parameter to the query from the given triple.
* The predicate of the triple determines the parameter name and the object
Expand Down Expand Up @@ -187,7 +194,7 @@ struct MagicServiceQuery {

// Utility functions
Variable getVariable(std::string_view parameter,
const TripleComponent& object);
const TripleComponent& object) const;

void setVariable(std::string_view parameter, const TripleComponent& object,
std::optional<Variable>& existingValue);
Expand Down Expand Up @@ -224,6 +231,13 @@ struct PathQuery : MagicServiceQuery {
bool cartesian_ = true;
std::optional<uint64_t> numPathsPerTarget_ = std::nullopt;

PathQuery() = default;
PathQuery(PathQuery&& other) = default;
PathQuery(const PathQuery& other) = default;
PathQuery& operator=(const PathQuery& other) = default;
PathQuery& operator=(PathQuery&& a) noexcept = default;
virtual ~PathQuery() = default;

// See MagicServiceQuery
void addParameter(const SparqlTriple& triple) override;

Expand Down Expand Up @@ -281,6 +295,13 @@ struct SpatialQuery : MagicServiceQuery {
std::optional<Variable> bindDist_;
std::optional<SpatialJoinAlgorithm> algo_;

SpatialQuery() = default;
SpatialQuery(SpatialQuery&& other) = default;
SpatialQuery(const SpatialQuery& other) = default;
SpatialQuery& operator=(const SpatialQuery& other) = default;
SpatialQuery& operator=(SpatialQuery&& a) noexcept = default;
virtual ~SpatialQuery() = default;

// See MagicServiceQuery
void addParameter(const SparqlTriple& triple) override;

Expand Down

0 comments on commit a41644f

Please sign in to comment.