[elephant-devel] using elephant:open-store with relative paths

Lukas Georgieff lukas.georgieff at hotmail.com
Wed Oct 20 19:52:05 UTC 2010


Hi Leslie,

thanks for you answer - that was a helpful explanation.


Best regards

Lukas



--------------------------------------------------
From: "Leslie P. Polzer" <sky at viridian-project.de>
Sent: Wednesday, October 20, 2010 4:00 PM
To: "Elephant bugs and development" <elephant-devel at common-lisp.net>
Subject: Re: [elephant-devel] using elephant:open-store with relative paths

>
> Hi Lukas,
>
>> Here is a little example:
>> (asdf:operate 'asdf:load-op :elephant)
>> (elephant:defpclass TopicC ()  ((value :initarg :value   :accessor value 
>> :type
>> string))  (:index t))
>> (elephant:open-store '(:BDB
>> "/home/lukas/.sbcl/site/isidorus/trunk/src/data_base"))(make-instance 
>> 'TopicC :value
>> "t-1")(make-instance 'TopicC :value 
>> "t-2")(elephant:get-instances-by-class 'TopicC);
>> absolute db path => (#<TOPICC oid:2> #<TOPICC oid:3>); relative db path 
>> => (#<TOPICC
>> oid:2> #<TOPICC oid:3>)
>> (elephant:close-store)
>> (elephant:open-store '(:BDB
>> "/home/lukas/.sbcl/site/isidorus/trunk/src/data_base"))(elephant:get-instances-by-class
>> 'TopicC); absolute db path => (#<TOPICC oid:2> #<TOPICC oid:3>); relative 
>> db path => NIL
>>
>> Is this a bug or must I use absolute paths for opening a store?
>
> You don't need to use absolute paths, but you must take care that
> your relative paths are converted correctly to absolute paths.
> Your Lisp's CL:*DEFAULT-PATHNAME-DEFAULTS* influences this
> conversion.
>
> In your relative path example you're probably just seeing an
> empty database, i.e. not the same database as the one you have
> worked with before to create the instances.
>
> If you still need help then please give a full example that
> we can reproduce.
>
>  Leslie
>
>
>
> _______________________________________________
> elephant-devel site list
> elephant-devel at common-lisp.net
> http://common-lisp.net/mailman/listinfo/elephant-devel
> 




More information about the elephant-devel mailing list