durusmail: durus-users: Pickling/exporting objects
Pickling/exporting objects
2005-03-02
2005-03-02
2005-03-02
2005-03-02
2005-03-02
2005-03-02
2005-03-02
2005-03-03
2005-03-03
2005-03-03
2005-03-03
2005-03-03
2005-03-04
2005-03-04
2005-03-04
2005-03-04
2005-03-04
2005-03-04
2005-03-05
Pickling/exporting objects
Patrick K. O'Brien
2005-03-02
A.M. Kuchling wrote:
> On Wed, Mar 02, 2005 at 12:05:32PM -0500, A.M. Kuchling wrote:
>
>>the export may collide with OIDs used by the current database.  It
>>seems to me that a function similar to copy_object() would still be
>>required.
>
>
> Iteration 2: copy_obj() takes an object and cleans off the
> .._p_connection and ._p_oid attributes.  The resulting object, untied
> to any particular connection, can be placed in a different Durus
> database.  export_object(obj, filename, key) opens the storage
> 'filename' and records a copy of the object in the root object using
> 'key'.  import_object(filename, key) opens the storage and returns a
> cleaned copy of the object stored under 'key'.  This interface lets
> you export multiple objects into a single storage.
>
> (The 'cleaned' terminology isn't particularly descriptive of breaking
> the link between an object and its storage; any better suggestions?
> "Checked out"?  "Divorced"?)

"Unhitched"?  "Newly Separated"?  "Single Again"?  ;-)

--
Patrick K. O'Brien
Orbtech    http://www.orbtech.com
Schevo     http://www.schevo.org
Pypersyst  http://www.pypersyst.org


reply