[Cl-perec-devel] Copying instances across databases
levente.meszaros at gmail.com
Wed Aug 27 15:15:03 UTC 2008
On Tue, Aug 26, 2008 at 4:37 PM, Leslie P. Polzer <leslie.polzer at gmx.net> wrote:
> I have been somewhat unsuccessful at coercing perec's metacopy
> protocol to copy my objects across databases.
> How do I copy a persistent object from db A into db B?
This is something we did not do in the past.
a. You can use the export/import interface which can serialize (using
cl-serializer) an object graph into a binary file and read it back in
the other database.
b. If the data to be copied fits into memory you can read it in, swith
to the other database and write it out by using the metacopy protocol.
b2. After read you can set the persistent flag to #f in all instances
and make them persistent in the other database using make-persistent.
c. You can also cusomize the metacopy protocol to switch back and
forth (I don't exactly know how at the moment, no repl at hand)
d. Using direct SQL
I can't decide which one is best for you. It strongly depends on the details.
There's no perfectoin
More information about the cl-perec-devel