Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Introduce a Strong Type for Sparql Variables #400

Closed
wants to merge 7 commits into from

Conversation

joka921
Copy link
Member

@joka921 joka921 commented May 11, 2021

Previously, all variables were plain std::strings which made them hard to reason about ("does this store a variable, a variable or iri/literal, or does this store an arbitrary string)
and easy to make mistakes.

This PR goes one big step in the direction of fixing this, by introducing a SparqlVariable type which cannot be implicitly
converted to and from String.

The next step would be to introduce more of those types, e.g.a TripleElement (variable, literal/iri or property path).

This seems to work,
Next step: Find out about TEXT() and SCORE() and also add it to the variableColumns (great restructuring).
…e type

- TODO (before reviewing):
  - Remove the SCORE(...) variables, simple parse them to ?:qlever-text-score-?t
  - change some places from SparqlVariable to optional<SparqlVariable> for the empty checks.
@joka921 joka921 requested a review from hannahbast May 11, 2021 16:10
@joka921 joka921 closed this Sep 13, 2022
@joka921 joka921 deleted the f.typedVariables branch September 13, 2022 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant