create_engine and sqlite?

8 views
Skip to first unread message

Bruce D'Arcus

unread,
May 12, 2008, 5:30:26 PM5/12/08
to rdfalchemy-dev
I was just looking at the create_engine method and noticing it doesn't
accept an sqlite option. Shouldn't it?

Bruce

Philip Cooper

unread,
May 13, 2008, 1:34:30 AM5/13/08
to rdfalch...@googlegroups.com
Bruce D'Arcus at about 5/12/08 3:30 PM said:
> I was just looking at the create_engine method and noticing it doesn't
> accept an sqlite option. Shouldn't it?
>
Just put a quick fix for it in the trunk rev:129

The rdflib support for sqlite needs some attention. I beleive my first
cut here expects a dir type location (relative paths are OK) but still
puts a file named "hardcoded" there. That seems wrong. rdflib has the
same behavior but I think rdfalchemy should do something better. see:
http://rdflib.net/issues/2006/11/02/sqlite_open_argument_should_be_a_filename/issue

Anyway, if you want sqlite give the trunk a try and I'm open to any
suggestions.

--
Phil


philip_cooper.vcf

Bruce D'Arcus

unread,
May 13, 2008, 1:07:36 PM5/13/08
to rdfalchemy-dev


On May 13, 1:34 am, Philip Cooper <philip.coo...@openvest.com> wrote:
> Bruce D'Arcus at about 5/12/08 3:30 PM said:> I was just looking at the create_engine method and noticing it doesn't
> > accept an sqlite option. Shouldn't it?
>
> Just put a quick fix for it in the trunk rev:129  

Cool; thanks!

> The rdflib support for sqlite needs some attention.  I beleive my first
> cut here expects a dir type location (relative paths are OK) but still
> puts a file named "hardcoded" there.  That seems wrong.  rdflib has the
> same behavior but I think rdfalchemy should do something better.  see:http://rdflib.net/issues/2006/11/02/sqlite_open_argument_should_be_a_...

Ouch; yes, that's kind of ugly. While I suppose one could argue it's
the same approach as with the BDB option, the single sqlite file seems
a bit of a different case, and so should take the file name as
argument (as suggested in that link).

"Better" than what; the current behavior, or the fix suggested in that
link? Seems it ought to be fixed on the rdflib side.

Bruce

Bruce D'Arcus

unread,
May 13, 2008, 1:54:32 PM5/13/08
to rdfalchemy-dev
A quick followup:

Can you perhaps post a minimal example of what one might do after
using the create_engine method to open the graph? None of the examples
I'm seeing actually demonstrate this.

Say, for example, I want to create a Person object (er, rdfSubject)
and have it added to the newly created graph and saved.

Bruce
Reply all
Reply to author
Forward
0 new messages