Re: How to get the Object-ID from a DB-Object?

2014-01-27 Thread Thorsten Jolitz
Henrik Sarvell hsarv...@gmail.com writes: Hi Henrik, why do you want to do this explicitly since it's done for you implicitly in all the various type of reference relations you have (typically +Link)? I want to export the objects to a textual representation that might be edited and then

Re: How to get the Object-ID from a DB-Object?

2014-01-27 Thread Henrik Sarvell
That sounds like a solution I should copy. Just out of curiosity: in a distributed database, the object ids ({3}, {1-2} ...) are not unique but might be repeated on different machines? AFAIK yes. In any case the {x...} locations are changed by the remote functionality to avoid clashes with

Re: How to get the Object-ID from a DB-Object?

2014-01-27 Thread Alexander Burger
Hi Thorsten, I want to export the objects to a textual representation that might be edited and then committed again, so I must be able to find out which DB object is associated to the textual representation. Note that in general it is not recommended to access external objects by their name.

Re: How to get the Object-ID from a DB-Object?

2014-01-27 Thread Alexander Burger
On Mon, Jan 27, 2014 at 09:55:28AM +0100, Alexander Burger wrote: 'dump' also takes care of related data blobs. In the above example, all (the 'load'able file and the blobs) are all packed into a single TGZ file. Oops, slight error! Just for the records: The TGZ file holds only the blobs, the

Re: How to get the Object-ID from a DB-Object?

2014-01-27 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes: Hi Alex, I want to export the objects to a textual representation that might be edited and then committed again, so I must be able to find out which DB object is associated to the textual representation. Note that in general it is not

Re: How to get the Object-ID from a DB-Object?

2014-01-27 Thread Thorsten Jolitz
One more doubt: Without going into the details, assume there is a relation like this , | (rel elem-id (+Number)) ` and it is reused: 1. first, it holds an (arbitrary) number that is used during object creation to associate it with other

Re: How to get the Object-ID from a DB-Object?

2014-01-27 Thread Alexander Burger
Hi Thorsten, , | (rel elem-id (+Number)) ` and it is reused: 1. first, it holds an (arbitrary) number that is used during object creation to associate it with other objects that are created too in the same commit. 2. once the

Re: How to get the Object-ID from a DB-Object?

2014-01-27 Thread Thorsten Jolitz
Alexander Burger a...@software-lab.de writes: Hi Alex, i.e. can I first assign e.g. 37 to it during the object creation, and then let the 'id' function re-assign e.g. 9 to it when post-processing the newly created objects? Yes, sure. The object doesn't care about the meaning of that number.

How to get the Object-ID from a DB-Object?

2014-01-26 Thread Thorsten Jolitz
Hi List, say I want to use the internal Object ID of database object as a unique string identifier (useful e.g. for export in a textformat), i.e. something like: : (put '{33} 'ID {33}) -- cheers, Thorsten -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: How to get the Object-ID from a DB-Object?

2014-01-26 Thread Thorsten Jolitz
Thorsten Jolitz tjol...@gmail.com writes: ,- | Sorry, I sent this post accidentally before I was finished, so I have to | send it again. `- Hi List,

Re: How to get the Object-ID from a DB-Object?

2014-01-26 Thread Henrik Sarvell
Hi Thorsten, why do you want to do this explicitly since it's done for you implicitly in all the various type of reference relations you have (typically +Link)? In Macropis I simply use the convention of having a relation called id auto increment (by way of