On 10-09-18 17:00, Hugh Williams wrote:
> 
> Have you looked at the Virtuoso ODBC extensions for SPASQL,
> which enable applications to query meta information on SPASQL
> queries, as detailed at:

Hi Hugh, that's helpful, thank you. Unfortunately not
as straightforward as I would have liked - it looks
like it would require extending pyodbc since it doesn't
expose things like SQLGetDescField to python.

To complicate matters, when you have a row in Python
it won't have any reference to the cursor (or statement
handle), apparently this design decision was made so
that you could keep a row around while the cursor
was closed or reused for another query. So to do this,
one would have to (1) check that the database is Virtuoso,
(2) check that the query was SPASQL (3) pre-emptively
go and collect type information before returning each
row.

Is there a straightforward way to do (1) and (2) at all?

More C++ coding than I'd like (pyodbc is written in C++)
but not the end of the world...

Cheers,
-w
-- 
William Waites                       <[email protected]>
Mob: +44 789 798 9965
Fax: +44 131 464 4948
CD70 0498 8AE4 36EA 1CD7  281C 427A 3F36 2130 E9F5

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to