[storm] Querying using a 'where' condition that referes to a Reference. How to?

Mac Ryan quasipedia at gmail.com
Tue Sep 1 18:58:00 BST 2009


On Tue, 2009-09-01 at 19:45 +0200, Mac Ryan wrote:
> Hello everybody,
> 
> 	sorry to ask something that maybe has been asked already, but I am
> struggling a bit to find my way alone with the limited documentation
> available.
> 
> SAMPLE SITUATION (pseudocode):
> 
>         table "authors"
>           name = ...
>           country = ...
>         
>         table "books"
>           title = ...
>           author = Reference("authors")
> 
> DESIDERATA:
> 
> I would like to select all the books written by authors from a given
> country. I believed it would be possible to do:
> 
> store.find(Books, Books.author.country == 'mycountry')
> 
> but this doesn't work. Which is the "storm-correct" way of doing this?
> [I thought about the join syntax and I found this:
> http://twistedmatrix.com/users/radix/storm-api/storm.expr.Join.html 
> but unluckily that is undocumented]
> 
> Any advice?
> Thank you in advance for your time,
> Mac.

Sorry, disregard my previous message. I found what I was looking for in
the tutorial. My fault not having checked that better.

Mac.




More information about the storm mailing list