Merged
Conversation
Automatic iri expansion is bad behavior for an internal api, and this functionality will soon be removed.
We will have to re-think some part of iri -> sid conversion given that compact iris should be treated as strings. Maybe we should disallow this?
this is a hack to get rdf:type to map to :type or @type in query results. we need to rethink what we allow here and how we handle it.
These legacy keys are no longer referenced and their functionality will be replaced by branches
Our code for reading index files automatically converts the json map keys to keywords, but neither namespace codes nor namespaces should be converted. namespace codes should be integers, and namespaces should be strings. Instead of changing our index reading code not to do the conversion, I opted to convert then convert back for ns codes because it (should be) more efficient to convert to keywords while parsing JSON instead of after the fact, and there will be much more data that needs the conversion than will not. I'm not ecstatic about converting integers to keywords and back to integers, but I think this is the best approach given the fact that more data will need to be converted to keywords than not, but we may want to revisit this later.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch removes the sequential integer-based subject ids in favor of a java class for use in Clojure code along with an SID record for use in Clojurescript. Both define sids from iris by splitting sids into a namespace part and a name part. We maintain a map of namespaces to integers on db records and serialized in db root maps, and the names are serialized as strings. The name parts are also converted into vectors of longs when deserialized in clojure to optimize comparisons in sorted sets.