data.world-py
data.world-py copied to clipboard
Support date/datetime and RDF types generally as query parameters
Support for more possible types as query parameters should be added.
date
and datetime
should map naturally to their XSD counterparts:
https://docs.python.org/3/library/datetime.html
To give the developer complete capability to express values, add RdfLiteralParam
which will have two parts value
and type
where value
is a string and type
is a URI - and which will render into "{value}"^^<{type}>
. Existing code in the datadotworld.convert_to_sparql_literal
should be refactored to use this class.
For completeness it should support language as well, eg. "{value}"@{lang}
.
Also, it looks to me like the current code doesn't escape special characters? https://github.com/datadotworld/dw-jdbc/blob/master/src/main/java/world/data/jdbc/internal/types/NTriplesFormat.java#L74-L109