This is actually not a new problem in Sesame 2.4, but has always been implemented (or rather, not implemented) this way.
prepareQuery is listed as an optional operation in the API, and in the HTTPRepository it's not implemented for performance-reasons: supporting this method requires determining the query type on the client side, which implies a parsing step. Not only is that expensive, but HTTPRepository currently has no dependency on the SPARQL parser.
I guess we might be able to implement this using a regular expression though. Need to have a think about it.
|
Change by Jeen Broekstra [21/Jul/11 12:00 AM]
|
| Field |
Original Value |
New Value |
|
Assignee
|
Arjohn Kampman
[ arjohn
]
|
Jeen Broekstra
[ jeen
]
|
I have checked in an implementation for this method in HTTPRepositoryConnection, using regular expressions and some other string manipulation tricks, but I am not convinced it's foolproof (even though it passes a few unit tests I came up with), and it's probably not very efficient. I have updated the javadoc to stress that the preferred way of preparing queries is still to use the more specific prepareTuple/Boolean/GraphQuery methods.
|
Change by Jeen Broekstra [21/Jul/11 12:36 AM]
|
| Field |
Original Value |
New Value |
|
Fix Version/s
|
|
2.4.3
[ 10580
]
|
|
Change by Jeen Broekstra [21/Jul/11 12:36 AM]
|
| Field |
Original Value |
New Value |
|
Status
|
Open
[ 1
]
|
In Progress
[ 3
]
|
I would like some feedback from people on this fix before I mark it resolved.
|
Change by Jeen Broekstra [03/Aug/11 11:58 PM]
|
| Field |
Original Value |
New Value |
|
Status
|
In Progress
[ 3
]
|
Resolved
[ 5
]
|
|
Resolution
|
|
Fixed
[ 1
]
|
|
Change by Arjohn Kampman [24/Aug/11 09:07 AM]
|
| Field |
Original Value |
New Value |
|
Fix Version/s
|
|
2.5.0
[ 10550
]
|
|
Fix Version/s
|
2.4.3
[ 10580
]
|
|