00:00.18 | *** join/#storm wallflower (n=wallflow@ip-205-246-113-216.pool.grokthis.net) |
00:34.39 | *** join/#storm jon`` (n=jon@fof.durge.org) |
00:34.50 | *** part/#storm jon`` (n=jon@fof.durge.org) |
01:45.55 | *** join/#storm therve (n=therve@sd-17096.dedibox.fr) |
02:00.37 | *** part/#storm manuelnaranjo (n=manuel@190.191.55.181) |
11:30.48 | *** join/#storm sidnei (n=sidnei@plone/dreamcatcher) |
11:30.49 | *** join/#storm sidnei_ (n=sidnei@201-11-226-101.cslce701.dsl.brasiltelecom.net.br) |
12:41.30 | *** join/#storm goschtl (n=goschtl@p5B0BF688.dip.t-dialin.net) |
13:01.46 | *** join/#storm thumper_laptop (n=tim@125-236-193-95.adsl.xtra.co.nz) |
13:08.10 | *** join/#storm _thumper_ (n=tim@canonical/launchpad/thumper) |
13:32.55 | *** join/#storm djinni (n=djinni@ludios.net) |
13:33.20 | *** join/#storm ivan` (n=ivan@unaffiliated/ivan/x-000001) |
13:39.09 | *** join/#storm andrea-bs (n=andrea-b@ubuntu/member/beeseek.developer.andrea-bs) |
15:23.54 | *** join/#storm kov (n=kov@debian/developer/kov) |
15:59.49 | *** join/#storm manuelnaranjo (n=manuel@190.191.55.181) |
16:08.12 | manuelnaranjo | hello guys I have a question, I'm using SQLite as backend I want to have a class B that inherits from class A should I have a complete table for class B and another for class A, or B can share the table with A and just add the B specif fields to B db? |
16:09.10 | *** join/#storm jukart (i=lovely@81.189.156.94) |
16:31.10 | manuelnaranjo | ok I found my problem, I want to have a ReferenceSet to class A and I have subclasses B, C, D of it, then I need a ReferenceSet for each subclass, seems like storm doesn't handle subclassing in this case |
16:34.25 | manuelnaranjo | I'm and idiot! each subclass defines a new __storm_table__ then there's no way to subclass |
16:36.50 | manuelnaranjo | Infoheritance, now I get why it exists :D |
20:29.29 | *** part/#storm manuelnaranjo (n=manuel@190.191.55.181) |
21:22.07 | *** join/#storm jamesh (n=james@canonical/launchpad/jamesh) [NETSPLIT VICTIM] |
23:37.30 | *** join/#storm manuelnaranjo (n=manuel@190.191.55.181) |
23:37.51 | manuelnaranjo | hello guys it's me again, it was a hard path to learn how to use storm but I think I have almoast all what I need |
23:38.32 | manuelnaranjo | I would like to do a find in a Store, I know how to write it in SQL, but I can't figure out how to do it in the Storm ORM way |
23:40.57 | manuelnaranjo | my SQL expression is: select * from item where (nodeidlist is Null or nodeidlist like '%00:50:C2:7F:42:46%'); |
23:41.10 | manuelnaranjo | where '%00:50:C2:7F:42:46%' is my changing field |
23:41.56 | manuelnaranjo | I thought I could do: find(Item, Item.nodeidlist is None) but storm replaces it for something that has nothing to do with my sentence |
23:45.30 | manuelnaranjo | HA! I figured it out, find understands of SQL |
23:46.12 | manuelnaranjo | so I can just do: menu.items.find('''(Item.nodeidlist is Null or Item.nodeidlist LIKE "%%%s%%")''' % address) |
23:50.20 | jkakar | manuelnaranjo: I think you want: from storm.locals import Or, Like; menu.items.find(Item, Or(Item.nodeidlist is None, Like("%00:50:C2:7F:42:46%"))) |
23:51.00 | manuelnaranjo | jkakar: ohh that's even nicer, thanks. It's hard to tell how storm works without many examples and with little docs, but I managed thanks again |
23:51.21 | jkakar | manuelnaranjo: np. Keep asking questions. |
23:51.59 | jkakar | manuelnaranjo: Basically, you can use the things defined in storm.expr with store.find (or ReferenceSet.find) to build up expressions. |
23:55.57 | manuelnaranjo | jkakar: Like doesn't work as you wrote it, I'm getting a missing argument exception |
23:56.43 | jkakar | manuelnaranjo: Oops, you probably need Like(Item.nodeidlist, "...") |
23:57.35 | manuelnaranjo | ok that part works |
23:57.38 | manuelnaranjo | the None doesn't |
23:57.51 | jkakar | Try == instead of is. |
23:58.10 | manuelnaranjo | ok that was it |
23:58.20 | manuelnaranjo | ==None got translated to item.nodeidlist IS NULL |
23:59.09 | manuelnaranjo | FINALLY! I have my xml -> xpath -> storm backend done |
23:59.50 | jkakar | Nice. :) |
23:59.55 | manuelnaranjo | jkakar: thanks for your help, I can leave to take dinner now cya |