00:24.00 | *** join/#storm fcorrea (~fcorrea@201-75-152-196-nd.cpe.vivax.com.br) |
03:42.45 | *** join/#storm stub (~stub@canonical/launchpad/stub) |
04:03.24 | *** join/#storm mup_ (~mup@li37-90.members.linode.com) |
05:17.13 | *** join/#storm niemeyer_ (~niemeyer@189.74.206.84) |
06:27.23 | *** join/#storm elmom_ (~elmom@hoasnet-fe29dd00-137.dhcp.inet.fi) |
07:19.09 | *** join/#storm elmom_ (~elmom@vallila-gw.hupnet.helsinki.fi) |
07:48.05 | *** join/#storm elmom_ (~elmom@vallila-gw.hupnet.helsinki.fi) |
08:07.41 | *** join/#storm danilos (~danilo@canonical/launchpad/danilos) |
08:50.21 | *** join/#storm keppla (~keppla@i577B3612.versanet.de) |
09:02.37 | *** join/#storm elmom_ (~elmom@vallila-gw.hupnet.helsinki.fi) |
10:00.18 | *** join/#storm elmom_ (~elmom@vallila-gw.hupnet.helsinki.fi) |
10:36.00 | *** join/#storm elmom_ (~elmom@vallila-gw.hupnet.helsinki.fi) |
10:53.05 | *** join/#storm aquarius (~aquarius@91.189.88.12) |
10:53.18 | aquarius | how do I use storm.expr.Coalesce? |
10:58.35 | therve | aquarius: you pass a list of ... stuff? |
10:58.48 | therve | generally columns, but you can pass actual values |
10:59.43 | jkakar | I've explained it to aquarius in a privmsg. |
11:00.05 | jkakar | But for the sake of those playing along... |
11:00.08 | jkakar | <aquarius> wtf? wow, that's complex. what I want to do is "select * from table where coalesce(col1, col2) = 'whatever'" :-) |
11:00.08 | jkakar | <jkakar> store.find(Table, Coalesce(Table.col1, Table.col2) == "whatever") |
11:00.08 | jkakar | <aquarius> that's it? |
11:00.08 | jkakar | <PROTECTED> |
11:00.24 | aquarius | I am becoming enlightened :) |
11:00.28 | therve | :) |
11:00.30 | jkakar | heh |
11:10.46 | *** join/#storm jml (~jml@mumak.net) |
11:10.48 | *** join/#storm jml (~jml@canonical/launchpad/jml) |
11:11.25 | *** join/#storm jml (~jml@mumak.net) |
11:11.28 | *** join/#storm jml (~jml@canonical/launchpad/jml) |
11:22.24 | *** join/#storm stub (~stub@canonical/launchpad/stub) |
12:23.42 | *** join/#storm artista_frustrad (~artista_f@201-24-239-233.ctame704.dsl.brasiltelecom.net.br) |
12:42.17 | *** join/#storm zmijunkie (~chatzilla@pool-5-4.free.de) |
12:58.43 | *** join/#storm niemeyer_ (~niemeyer@189.74.206.84) |
13:55.37 | *** join/#storm danilos (~danilo@canonical/launchpad/danilos) |
15:23.44 | *** join/#storm midgetspy (~midgetspy@d75-159-12-204.abhsia.telus.net) |
16:05.40 | *** join/#storm aquarius (~aquarius@91.189.88.12) |
18:15.21 | *** join/#storm skrite99 (~skrite@pivotrac.texaspivot.com) |
18:15.52 | skrite99 | hey all |
18:16.38 | skrite99 | i have seen it posted here that InnoDB tables are supported by storm but MyISAM tables are not. On my older server i was using storm with MyISAM, just wonder what the difference is |
18:16.41 | skrite99 | or danger |
18:22.08 | therve | MyIsam doesn't support transactions |
18:22.40 | skrite99 | is that why it will not work with storm? or just a disadvantage? |
18:29.48 | therve | both, I guess :) |
19:20.43 | *** join/#storm jml (~jml@mumak.net) |
19:20.46 | *** join/#storm jml (~jml@canonical/launchpad/jml) |
20:54.31 | *** join/#storm skrite99 (~skrite@pivotrac.texaspivot.com) |
21:16.14 | midgetspy | Foo has bar = ReferenceSet(_bar_id, Bar.id). Foo only needs to exist in the DB if it is linked to one or more bars... if that's not the case it can just be deleted. what's the best way to handle a case like this to prevent orphans from cluttering up the db? |
21:17.10 | midgetspy | should I just make a cleanDB method that deletes them manually? or can I use Foo.__del__() to delete itself from the DB if necessary? |
21:33.13 | *** join/#storm artista_frustrad (~artista_f@201-24-239-233.ctame704.dsl.brasiltelecom.net.br) |
22:51.36 | jkakar | midgetspy: You can add logic to a __storm_invalidate__ handler to do what you want. invalidate calls are run before commit occurs. I'm not sure if doing database operations in invalidate is complete safe, but from a quick glance at the code it looks to be. |
22:52.14 | jkakar | midgetspy: I suspect you'll needto make sure to call store.flush at the end of your invalidate call for things to work right, though. |
22:52.41 | jkakar | midgetspy: It might be a better idea to do something more explicit at the application layer... like never adding Foo's to the store unless they are linked to bars, but you can try the invalidate suggestion. |
22:52.44 | jkakar | => bed |
23:15.03 | *** join/#storm infobot (ibot@rikers.org) |
23:15.03 | *** topic/#storm is The Storm Python ORM - http://storm.canonical.com/ - 0.16 released! || Review branches: https://code.launchpad.net/storm/+activereviews || IRC logs: http://ibot.rikers.org/#storm/ || API documentation: http://people.canonical.com/~jkakar/storm/ |