Previous: Setting up PostGres, Up: SQL back-end
This version of Elephant supports migration betwen store controllers, whether of the same implementation strategy or not.
The tests migrate1
- migrate5
are demonstrations of this techinque.
The functions for performing these migrations are:
migraten-pobj
The name of this function is meant to imply that it is destructive of the object in question, mutating it to point at the new repository.
Which requies that you provide a copy-function to copy whatever slots you want from the persistent object as deeply or as shallowly as you desire.
Data collections (btree's) can be move with the function:
migrate
A simple object that does not inherit from “persistent” but is attached to a key (on the root) can be copied with the routine
copy-from-key
It is hoped that these routines would allow, with some labor, a user to use one repository, and later decide to start using a different implementation strategy, and easily migrate the objects to the the new repository. The old repository could then be abandoned, or multiple repositories could be used at the same time.