Re: Evolving db schema?

2008-08-20 Thread Tomas Hlavaty
Hi Alex,

 Yes. In lib/too.l there is a function 'rebuild'. It takes a list of
 objects and a relation specification.

thank you for the examples.

 The function 'dbgc' does this (also in lib/too.l).

Also, thanks for the back.l file!

I have one more question: I started with one db file and now thinking
about spliting it into more files.  How can I move some
objects/relations to another db file?

Thank you,

Tomas
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]


Re: Evolving db schema?

2008-08-20 Thread Tomas Hlavaty
Hi Alex,

 - This should of course have been (rel nr (+Key +Number))
 - Somewhere here should be a line (load lib/too.l)

I also had to (allow '*PW) ;-)

Thanks for help,

Tomas
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]


Getl and maps behavior?

2008-08-20 Thread Henrik Sarvell
The JSON encoder/decoder is almost finished, there is only one problem left.
In the encoding I use getl to get all the properties of an object, however
when some of them contain T or NIL I run into problems.

Just running this code illustrates the problem:

(setq Tst (new))
(put Tst 'a hello)
(put Tst 'b T)
(put Tst 'c NIL)

(getl Tst)

The 'b property shows up but without a value. I suppose I could capture that
and act accordingly, but the c is not there at all. I tried maps too but I
get the same behavior.

The main problem is that I need to be able to handle an arbitrary object and
convert all Ts to true, and NILs to false in the JSON string.

Is there some other function/mechanism I could use instead?

/Henrik

--=_Part_29864_15871798.1219296826936
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

div dir=ltrThe JSON encoder/decoder is almost finished, there is only one 
problem left. In the encoding I use getl to get all the properties of an 
object, however when some of them contain T or NIL I run into problems.br
brJust running this code illustrates the problem:brbr(setq Tst 
(new))br(put Tst #39;a quot;helloquot;)br(put Tst #39;b T)br(put Tst 
#39;c NIL)brbr(getl Tst)brbrThe #39;b property shows up but without a 
value. I suppose I could capture that and act accordingly, but the c is not 
there at all. I tried maps too but I get the same behavior.br
brThe main problem is that I need to be able to handle an arbitrary object 
and convert all Ts to true, and NILs to false in the JSON string.brbrIs 
there some other function/mechanism I could use instead?brbr/Henrikbr
/div

--=_Part_29864_15871798.1219296826936--
-- 
UNSUBSCRIBE: mailto:[EMAIL PROTECTED]
---