RDFLib/rdfextras — Issue #33: Datatype of literal gets lost when stored in SQL Store and reappears as language attribute
Author: gjhiggins
Created: 2012-02-20 07:57:34+00:00
State: open

marian.k...@gmail.com, 2011-11-11T09:46:33.000Z

When a typed literal is stored in a SQL store, the datatype gets lost.
The Literal.toPython() memberfunction is not able to reproduce the original datatype.

To reproduce the problem execute the attached script (reproduce.py).

The problem seems to arise from a wrong call to the Literal constructor in AbstractSQLStore.createTerm where the parameters for language and datatype should be given as named parameters instead of positional.

The attached patch seems to resolve the problem.