Hello Henrik,
Henrik Sarvell wrote:
>
> I don't know exactly the circumstances of what you're trying to
> achieve,
ok, I will try to answer this in the next mail to Alex ...
> but if I were you and needed to access by unique id I would
> first use +Key in the relations:
>
> (rel id (+Key +Strin
Sure, Pilog works fine if you have something more complex, but you get
quite far with (db), (aux) and (collect). As far as src and tgt goes
if they are not unique you can do for instance:
(collect 'src '+Test "D" "D")
Then you get all objects with D as src, I think you need to come up
with someth
Alexander Burger wrote:
>
> Hi Cle,
Hi Alex,
> let me first correct some errors:
>
>> (pool test)
>
> This is a funny one. As the value of 'test' is a function
> definition, you get a rather strange database file ;-)
Ahhh ... this was a copy/paste error from the console into the mail. My
DB fi
Hi Cle,
> > but if I were you and needed to access by unique id I would
> > first use +Key in the relations:
> >
> > (rel id (+Key +String))
>
> Ah, that makes sense! But it will only work for my id relation ... but I
> will also access them by 'src' and 'tgt'.
Please note that '+Key' will not c
Hi Henrik,
> Sure, Pilog works fine if you have something more complex, but you get
> quite far with (db), (aux) and (collect). As far as src and tgt goes
> if they are not unique you can do for instance:
>
> (collect 'src '+Test "D" "D")
>
> Then you get all objects with D as src, I think you ne
Hi Cle,
> Ahhh ... this was a copy/paste error from the console into the mail. My
> DB file was named "test" :-)
> ...
> Ahhh not for me ... as I am working within another directory parallel to
> picoLisp ;-)
I see. This explains it ;-)
> > If 'new' is called this way, it will not create databa
Henrik Sarvell wrote:
>
> Sure, Pilog works fine if you have something more complex, but you
> get quite far with (db), (aux) and (collect).
(...)
> Then you get all objects with D as src, I think you need to come up
> with something more complex in order to actually get to a reasonable
> real-
Alexander Burger wrote:
>
> Hi Cle,
Hi Alex,
(...)
>>> If 'new' is called this way, it will not create database objects
>>> but
>>
>> ... :-O But ... but ... but ... URGHS! :-( I had looked especially
>> into the "x.db" file and found my keys "1", "11" and "111" there.
>> So I thought
>
> Righ
Hi Cle,
> Ok, here comes my story! Currently there is an application/tool written
> ...
># (Edge id fromNode toNode)
>(be edge ("ts1" "end#1" "points#1"))
>(be edge ("ts2" "points#1" "points#2"))
>(be edge ("ts3" "points#1" "points#2"))
>(be edge ("ts4" "points#2" "end#2"))
>
Hi Cle,
> Nice idea! Now I reformulated my Pilog rules for usage with database
> like this:
>
>(be graph:walk (@Begin @Way)
> (@E db 'id '+DB:Edge (-> @Begin))
> (@To get (-> @E) 'tgt)
> (graph:walk @To (@Begin) @Way)
>)
>
>(be graph:walk (@Node @Way @Way))
>
>(be
Alexander Burger wrote:
> Hi Cle,
>
>
>> Nice idea! Now I reformulated my Pilog rules for usage with database
>> like this:
>>
>>(be graph:walk (@Begin @Way)
>> (@E db 'id '+DB:Edge (-> @Begin))
>> (@To get (-> @E) 'tgt)
>> (graph:walk @To (@Begin) @Way)
>>)
>>
>>(be
Hi Cle,
> To rephrase the chinese sentence once more: your solution was exactly
> the same as I came up with my first attempt. But due to the fact, I use
> '+String' for all fields, the Pilog 'db' clause did find the wrong
> solutions. To handle that, I did introduce a 'equal' check then. But
Rig
12 matches
Mail list logo