IRC log for #storm on 20071115

00:00.15*** join/#storm wallflower (n=wallflow@ip-205-246-113-216.pool.grokthis.net)
02:02.13*** join/#storm pyCube (n=jmayfiel@ip72-208-138-205.ph.ph.cox.net)
03:26.46*** join/#storm jamesh (n=james@canonical/launchpad/jamesh)
03:46.48*** join/#storm jkakar (n=jkakar@dhcp802-1-85.dsl.ucc-net.ca)
03:50.11*** join/#storm pyCube (n=jmayfiel@ip72-208-138-205.ph.ph.cox.net)
05:15.55pyCubei have a class that has a thing = reference(), is it possible to do a find() for the type of thing that thing references?
05:21.09jameshtry describing it again
05:21.47pyCubeok..
05:22.22pyCubeclass table(Storm): ref = Reference(id, anothertable.id)
05:23.12pyCubei want to query like, store.find(anothertable)
05:23.33pyCubebut using self.ref
05:28.19jameshif you have an instance of "table", can't you just get the corresponding "anothertable" instance with "foo.ref" directly?
05:28.42pyCubeyes
05:29.04pyCubebut i want to query all the other 'anothertable"s
05:29.20jameshwhat do you mean by that exactly?
05:29.32jameshall the "anothertable" rows matching what?
05:30.32pyCubeat this point, all of them... just curious if i can query for a table class that i dont know, i only have an instance of it
05:31.02jameshwell
05:31.07jameshtype(instance) will give you the class
05:31.19jameshor instance.__class__ if you prefer
05:46.16pyCubehow does that help?
06:11.23jameshpyCube: sorry, was doing something else.
06:11.36jameshpyCube: I am still not sure what you want to do
06:12.02jameshperhaps if you gave some details of your use case I could provide more help
06:37.01jameshpyCube: is it possible that you want a ReferenceSet rather than a Reference?
06:37.50pyCubeperhaps, if i can make a ref set like ReferenceSet(*, table.id) or similar
06:38.08pyCubeactually, no
06:38.09pyCubehehe
06:38.12jameshwhat would the "*" be?
06:38.12pyCubenot that
06:41.04pyCubejust a referenceset of all table, as if you did select * from table
06:44.22jameshpyCube: okay.  that's just store.find(classname), isn't it?
06:44.36pyCubeyeah
06:45.09jameshso do an @property that returns that
06:45.13jameshif that's what you're after
06:45.31jameshit doesn't sound like you're talking about a relation between the two tables
06:46.58*** join/#storm bozzo (n=bozzo@BSN-77-49-15.dial-up.dsl.siol.net)
06:48.59*** join/#storm bozzo (n=bozzo@BSN-77-49-15.dial-up.dsl.siol.net)
06:53.19pyCubeis there a way to pass the class name to find as a string?, like store.find("table") ?
06:53.42pyCubelike in Reference(), etc
06:59.24*** join/#storm jukart (n=jukart@194.183.146.181)
07:14.23jameshI don't think so
07:14.26jameshwhy would you want to?
07:16.23pyCubefor the same reason you can do it in Reference()
07:50.04jameshpyCube: for Reference(), the reason for allowing strings is that the other class may not yet be defined
07:50.45jameshif you are defining a property whose implementation calls store.find(), the code will be run after the classes have been instantiated
07:51.38jameshso I don't think the same reasons hold
07:54.43pyCubewhat aboutr circular import issues?
07:57.24jameshperform a local import
08:02.57pyCuberight.. heh.. oh yeah
08:33.06*** join/#storm mcella (n=michele@ip-171-30.sn3.eutelia.it)
08:41.43*** join/#storm Key_Gena (i=lok@gateway/tor/x-263f54de325be392)
09:47.05*** join/#storm pyCube (n=jmayfiel@ip72-208-138-205.ph.ph.cox.net)
11:03.30*** join/#storm bozzo_ (n=bozzo@BSN-210-221-23.dial-up.dsl.siol.net)
11:09.58*** join/#storm niemeyer (n=niemeyer@200-138-134-89.ctame705.dsl.brasiltelecom.net.br)
11:32.42*** join/#storm gpolo (n=polo@189.7.21.145)
14:07.40*** join/#storm bigdo1 (n=scmikes@72-197-8-8-arpa.cust.cinci.current.net)
14:34.20radixniemeyer: so, RETURNING
14:34.39radixniemeyer: is storm currently factored well to allow changing it to use RETURNING instead of a later SELECT?
14:34.40niemeyerRETURNING!
14:34.49niemeyerradix: It is
14:34.53radixawesome
14:35.01niemeyerradix: I *think* only the backends needs tweaking
14:35.05niemeyerbackend
14:35.57radixexcellent
14:39.29niemeyerradix: Even then, we should use some trick to prevent people with older servers to run into the same problem
14:40.41niemeyerThe only thing I can think for now is a subselect
14:40.57radixoh, I see
14:41.01radixRETURNING id is only 8.1+?
14:41.35niemeyer8.2+
14:41.39radixoh
14:42.28radixso maybe we shouldn't even use RETURNING
14:43.35niemeyerradix: Why?
14:43.50radixif we can just use the subselect currval()
14:43.59radixwell, I guess RETURNING can still save us an extra round trip
14:44.06niemeyerradix: Well, we're still saving a significant amount of ... right
14:44.37niemeyerradix: Besides being more correct
14:44.55niemeyerradix: It doesn't suffer from the same fragilities regarding sequences changing in triggers
14:45.16radixyeah
14:47.15niemeyerOkie
14:47.24niemeyerI have a test passing with a Returning expression..
14:47.31niemeyerMore after lunch
15:06.10*** join/#storm mcella (n=michele@ip-171-30.sn3.eutelia.it)
16:25.18*** join/#storm michelp (n=michelp@70.103.91.130)
16:26.55*** join/#storm Key_Gena (i=lok@gateway/tor/x-f62e2659be762fe7)
16:55.17*** join/#storm bigdog (n=scmikes@72-197-8-8-arpa.cust.cinci.current.net)
17:25.21*** part/#storm gpolo (n=polo@189.7.21.145)
17:27.42*** join/#storm dobee (n=dobeee@194.183.146.186)
17:53.09Zenomdo you guys use a lot of zope stuff ?
18:16.45jkakarWe use Zope 3
18:29.41Zenomjkakar: how do you like it ? I have never personally used it myself
18:30.25jkakarZenom: The learning curve is steep, but once you get past that it's a very nice system to work with.  I'm enjoying it a lot.
18:34.23Zenomjkakar: using on high traffic sites?
18:34.59jkakarZenom: Yes.  launchpad.net uses Zope 3, for example.  They get a fair amount of traffic. :)
18:35.08Zenominteresting
18:38.04Zenomjust seems more time consuimg
18:38.10Zenomwith all the config files I have seen so far etc
18:42.07jkakarYeah.  People have mixed feelings about ZCML.  Basically, the idea is that you separate configuration of a component from the implementation of a component; this, when done well, makes components easily reusable.
18:42.21jkakarI generally find that separation of concerns has benefit.  Sometimes I find ZCML a bit boilerplate-y, but overall a good thing.
19:06.58*** join/#storm dobee (n=dobeee@81-223-53-162.dornbirn.xdsl-line.inode.at)
19:07.26Zenomis there a way to create the database based on the schema? for example with sqlite?
19:08.14radixZenom: you mean based on the storm classes? no
19:08.29Zenomright, ok so everything has to be made by hand
19:08.52weatherman_storm/insert-returning r191 committed by gustavo@niemeyer.net
19:08.52weatherman_Modified the postgres database backend to use the RETURNING extension
19:08.52weatherman_of the INSERT statement to obtain the primary key values which were
19:08.56weatherman_inserted, and then assign them with the respective variables.
19:09.04weatherman_This extension is only supported in Postgres >= 8.2.  Old versions
19:09.08weatherman_will continue to work fine with the previously existent mechanism,
19:09.12weatherman_which requires one additional query to be performed.
19:09.21radixwoot
19:19.50*** join/#storm bigdog (n=scmikes@72-197-8-8-arpa.cust.cinci.current.net)
19:27.40*** join/#storm bigdo1 (n=scmikes@72-197-8-8-arpa.cust.cinci.current.net)
20:52.54Zenomanyone currently working on a way to take established storm model classes and forming them into generated html forms? :D
20:55.34radixI don't think so
20:56.36Zenomdoes storm have ways to define unique fields, not-null fields?
20:57.17Zenomand I wonder how hard it would be to create a form generator for storm
20:57.27radixZenom: well, allow_none=False is a way to say that None can't be a value for a property
20:57.45radixit doesn't have a way to enforce uniqueness though, it relies on the database for that
20:57.52Zenomgotcha
20:58.30Zenomwould be neat to have some sort of form generator based on storm classes though, will have to research, i wonder if I could pull it off, lol
20:59.34Zenombut then again if there is no validation in the model, the validation would have to be in a separate class like formencode
21:15.09*** join/#storm Fujitsu (n=fujitsu@ubuntu/member/fujitsu)
21:26.22aa_Zenom: if its any use to you I do form generation in pygtk + storm
21:26.37aa_execpt one thing, my form generation schemas are totally independent of the model
21:27.15aa_this is like my 4th iteration, and one thing I have set in stone is that the form generating schemas are totally separate from the model definitions
21:27.32aa_and then I even have a separate layer for validation
21:27.40aa_(why am I telling you this?)
21:28.14aa_because I honestly think that form generation straight from model definitions (by adding a load of clunk) leaves you in a horrible non-portable mess
21:28.39aa_non-portable in the case that when/if you change ORM, or the ORM API changes, you are pretty screwed
21:28.55aa_and it's not maintainable either
21:29.09aa_just my 2c :)
21:29.43*** join/#storm dobee (n=dobeee@81-223-53-162.dornbirn.xdsl-line.inode.at)
21:47.51weatherman_storm/insert-returning r192 committed by gustavo@niemeyer.net
21:47.51weatherman_Rather than retrieving all values from the database after an object
21:47.52weatherman_is flushed, retrieve only the primary key, if necessary.  All other
21:47.56weatherman_values are set to AutoReload, and will only be retrieved once the
21:48.00weatherman_one of them is touched.
21:48.08weatherman_This should improve the performance of Storm-based applications
21:48.12weatherman_significantly, as inserted values are only really retrieved if
21:48.16weatherman_needed.  In cases where the primary key is preset explicitly or
21:48.20weatherman_by the backend during the insertion, this will prevent the second
21:48.24weatherman_query entirely.  In other cases, it will mean a fast index lookup.
21:59.42*** join/#storm dobee (n=dobeee@81-223-53-162.dornbirn.xdsl-line.inode.at) [NETSPLIT VICTIM]
21:59.42*** join/#storm bigdo1 (n=scmikes@72-197-8-8-arpa.cust.cinci.current.net) [NETSPLIT VICTIM]
21:59.42*** join/#storm weatherman_ (n=weatherm@dhcp802-1-85.dsl.ucc-net.ca) [NETSPLIT VICTIM]
21:59.42*** join/#storm WebMaven (n=webmaven@nv-65-173-64-133.dhcp.embarqhsd.net) [NETSPLIT VICTIM]
21:59.51*** join/#storm radix (n=radix@70.91.133.157) [NETSPLIT VICTIM]
22:00.05*** join/#storm michelp (n=michelp@70.103.91.130) [NETSPLIT VICTIM]
22:00.05*** join/#storm pyCube (n=jmayfiel@ip72-208-138-205.ph.ph.cox.net) [NETSPLIT VICTIM]
22:00.05*** join/#storm ajmitch (n=ajmitch@ubuntu/member/ajmitch) [NETSPLIT VICTIM]
22:17.31weatherman_storm/insert-returning r193 committed by gustavo@niemeyer.net
22:17.31weatherman_Changed get_insert_identity() in the PostgreSQL to prevent a
22:17.32weatherman_pathological case where performing table.id = currval(...) will
22:17.36weatherman_ignore the index for table.id.  This is only meaninful for
22:17.40weatherman_versions of PostgreSQL < 8.2, as otherwise the INSERT+RETURNING
22:17.44weatherman_mechanism is used.
22:17.58Zenomnice to see storm progressing :)
22:18.36niemeyerThat's what real world usage makes for you :-)
22:18.50Zenomaa_: thanks for the info, yeah i see what you mean about the validation from the model etc.
22:18.59Zenomniemeyer: yeah, thank god looks like you guys use postgresql
22:19.00Zenomlol
22:19.21niemeyerZenom: Indeed..
22:19.26niemeyerZenom: That's a pretty controversial case..
22:19.47niemeyerZenom: We would probably not even face that kind of issue if we were using MySQL :-)
22:20.15Zenomyeah there is a good and bad for both
22:20.28Zenomi like postgresql but i have found it really hard to find orm's that work the right way with it
22:20.56Zenomso far I think storm is the most straight forward and flexible
22:21.05Zenomalthough I wish order bys and sorting were a little more straight forward
22:21.30Zenomie., with things like find(News).order_by('title DESC")
22:21.31niemeyerZenom: Hmm
22:21.32Zenomor something
22:21.38niemeyerZenom: How can it be more straightforward?
22:21.45niemeyerZenom: I mean, you say order_by(column)
22:21.52niemeyerZenom: Is there something simpler than that? :)
22:21.54dobeeniemeyer: mysql has the same problem
22:21.55Zenomwell but thats on the result
22:22.00niemeyerdobee: Oh, really?
22:22.04Zenomi was thinking before the result
22:22.16niemeyerZenom: You can also specify default ordering
22:22.16Zenomor am i missing something
22:22.16dobeeyes, we found out (but not with storm)
22:22.24niemeyerdobee: Do you have any details?
22:22.34dobeeselect max(ident) is faster than the current value
22:22.46niemeyerdobee: I'd like to see if Storm is affected by it, and try to do something about it as well
22:22.47dobeeniemeyer: sec
22:23.10Zenomniemeyer: can you set a default limit too?
22:23.51niemeyerZenom: Nope.. that seems a bit unusual
22:24.01Zenomwhy? If I am looking up transactions
22:24.09Zenomwhy would I want to return 1 million transactions so to speak
22:24.15Zenomwhen I am showing say 10 per page
22:24.41radixZenom: you realize you can say .order_by(Desc(News.title)), right?
22:24.57Zenomradix: is that on the find()?
22:25.00radixyeah
22:25.03niemeyerZenom: Because: 1) You don't want to show every object in your system in pages, 2) You don't have to return all 1 million objects when you iterate over them, etc
22:25.05Zenomoh, no didn't know that
22:25.13Zenomi was thinking i had to do lik
22:25.24Zenomnews = find(News)
22:25.26Zenomthen sort it
22:25.40Zenomaccording to the examples on the wiki thats how I understood it i guess
22:26.01radixcan you point at specific examples?
22:26.03Zenomniemeyer: but isn't that taking up more memory? By storing all 1 million rows?
22:26.26Zenomhttps://storm.canonical.com/Tutorial#head-d1ed8578d511f42e79b2ff3e9b67051a1d58817f
22:26.35Zenomordering and limiting results
22:26.48Zenomthat seems confusing and doesn't necessarily state you can append .order_by to the find i guess
22:26.54Zenommaybe its just my lack of undertsanding of it all too
22:27.03radixthat's just basic Python stuff :)
22:27.09radixx = foo()
22:27.13radixy = x.blah()
22:27.14Zenomwell but you have result.order_by()
22:27.16radixis the same as y = foo().blah()
22:27.22Zenomso you are doing it to the list i guess the list is the list is the list
22:27.31radixthe result of find() is not a list
22:27.31Zenomwether i am appending to the find() or doing it to the result
22:27.44Zenomwell object
22:27.48Zenomor whatever it is heh
22:28.09Zenombut now that I know i can append to the find
22:28.12Zenomthats fine with me :)
22:28.18radixhooray
22:28.30Zenomi was thinking to sort I had to do like the whole example shown there :)
22:28.43Zenom[employee.name for employee in result.order_by(Employee.name)[:2]]
22:28.53Zenomcan you limit in the same way radix?
22:29.01Zenomor do you have to limit it from the result as shown?
22:29.02radixyes
22:29.14radixstore.find(Employee)[:2] works
22:29.22Zenomvery cool , ok
22:29.36Zenomsorry i guess I didn't realize that worked haha
22:31.06Zenomi thought those parts were going to be more complicated lol
22:31.29dobeeniemeyer: dunno if it applies to storm but "select last_insert_id() from ..." is extremely slow
22:31.38Zenomif there is anything i can help with documentation wise in the project or anything let me know
22:31.40Zenomi will try to help out
22:32.35niemeyerdobee: Let me check
22:33.05niemeyerdobee: Probably not.. we get it from the cursor
22:33.18dobeeah ok
22:33.48niemeyerdobee: Hmm..
22:34.03niemeyerdobee: Would you like to review a changeset we're going to integrate?
22:34.14niemeyerdobee: (and would you have the time to do it now)
22:34.25dobeeits midnight here
22:34.31niemeyerdobee: Ouch :)
22:34.38niemeyerdobee: Ok.. thanks even then
22:35.02dobeei can test the stuff with our test cases tomorrow
22:35.05dobeeif that helps
22:36.27niemeyerdobee: That'd be cool, definitely
22:36.48niemeyerdobee: We've run the Landscape test suite on it as well, but in that case, the more the better
22:36.53niemeyerdobee: Thanks in advance
22:37.04dobeedo you have a branch url
22:37.19niemeyerdobee: Will probably be on trunk by tomorrow
22:37.23dobeek
22:37.56Zenomwe are thinking about using landscape when we reload all our servers
22:38.03Zenomor as, we reload them i should say
22:38.34niemeyerZenom: Cool!
22:38.46Zenomlike 35 servers and growing heh
22:39.20niemeyerZenom: They'll be very welcome :)
22:40.01Zenomwhen is the next lts coming out?
22:40.32niemeyerZenom: 6 months
22:40.48Zenomcool
22:42.15radix[1]     execute.__doc__ = Connection.__doc__
22:42.16radixI think you probably meant Connection.execute.__doc__.
22:42.16radixHowever, I'd much appreciate if the docstring were something like
22:42.16radix"""
22:42.16radixSimilar to L{Connection.execute}, but
22:42.17radix<reasons that we need a specialized implementation>.
22:42.20radix"""
22:44.14niemeyerradix: It was originally like that, but I've wondered if that'd be useful for people doing e.g. help(connection.execute)
22:44.14radix(^^niemeyer)
22:44.39niemeyerradix: So I copied over and used a comment for the explanation
22:45.05niemeyerradix: Would you prefer to change it even then?
22:46.01radixniemeyer: I would still do it the way I described, as long as there's an explicit reference to the common thing they should read, but this is of course not an important issue
22:46.14niemeyerradix: Ok, I'll change it then
22:46.57radixman I wish I could use bzr-gtk :(
22:48.10radix[2]             Postgres._version = tuple(int(x) for x in server_version.split("."))
22:48.20niemeyerradix:
22:48.23niemeyer<PROTECTED>
22:48.23niemeyer<PROTECTED>
22:48.23niemeyer<PROTECTED>
22:48.23niemeyer<PROTECTED>
22:48.23niemeyer<PROTECTED>
22:48.25niemeyerradix: ?
22:48.45radixWhat if they've got multiple stores/Databases pointing at different Postgres servers with different versions?
22:48.58radixniemeyer: re [1]: looks good
22:49.17niemeyerradix: Oh, ouch..
22:49.34niemeyerradix: I originally had it in the connection, then I moved it to the database, which is right, but definitely not in the calss
22:49.34niemeyerclass
22:49.38niemeyerradix: Thanks for catching it
22:49.50radixcool
22:50.36niemeyerradix: Does s/Posgres/self/ sound correct?
22:51.37radixyes
22:51.50radixafter having thought about it for about 60 seconds :)
22:53.25niemeyerOk, tests like it
22:54.23jkakarniemeyer: test_wb_currval_based_identity doesn't seem to actually verify that the right query is run for pre-8.2 versions of PostgreSQL.  Seems like it should.
22:55.08niemeyerjkakar: Hmm.. I don't get this one
22:55.17niemeyerjkakar: Hmmm
22:55.19niemeyerjkakar: Oh, ok
22:55.21niemeyerjkakar: So
22:55.22jkakarniemeyer: So, maybe I'm misinterpreting what the test is about?
22:55.33niemeyerjkakar: Let me see it
22:57.18niemeyerjkakar: Oh.. so we have two different sets of tests for the same subject
22:57.42niemeyerjkakar: This one test verifies that the statement which is executed for the currval-based system actually works
22:58.06niemeyerjkakar: IOW, it's somewhat of an integration test between the store, the database, and the backend
22:58.34niemeyerjkakar: We have specific tests in tests/databases/postgres.py which verifies when RETURNING is or is not used
22:59.00jkakarniemeyer: Right, I get that part.  But, unless I'm missing something, there's nothing that asserts, in that test, that it's using currval, instead of RETURNING.  I'm still making my way through the changes, so maybe my comment is premature.
22:59.21niemeyerjkakar: Specifically, test_wb_execute_insert_returning_with_old_postgres
22:59.34niemeyerWhich is probably misnamed
22:59.46niemeyerIt's now named
22:59.48niemeyertest_wb_execute_insert_returning_not_used_with_old_postgres
23:00.08niemeyerjkakar: That:         self.assertFalse(variable1.is_defined())
23:01.30niemeyerjkakar: Hmm.. I think I can also add an additional assertion on the result of INSERT
23:01.32niemeyerWhich should be 1
23:01.35niemeyerLet me try that
23:02.40niemeyerHmm.. doesn't work as I expected
23:09.51radix[3] +    def test_execute_insert_returning_without_columns(self):
23:09.51radix+        """Without primary_variables, INSERT+RETURNING won't work."""
23:09.57radixI think you mean "Without primary_columns"
23:09.58radix?
23:11.29niemeyerOops
23:11.48niemeyerThey're both inverted
23:11.50radixactually that description is pretty confusing
23:12.21radixI mean, I don't really see what that test has to do with "RETURNING" at all
23:12.41niemeyerIt's not using it..
23:12.43niemeyer<PROTECTED>
23:12.49radixoops sorry
23:12.55niemeyerConsidering that you and jkakar didn't get this, I think it's obscure :(
23:13.01radixno actually I get it
23:13.09radixI was just being stupid
23:13.15radixI *did* grok the assertFalse
23:13.25radixI just forgot momentarily that execute() is where the magic happens
23:13.57jkakarniemeyer: I'm still partway through the code; I probably just spoke up prematurely.
23:14.29jkakarniemeyer: I'm not very happy with this test_wb_version, but I can't think of a better way to do it.  I would prefer to assert against a hard-coded value.  The assert here is basically the same code in the implementation.
23:14.35niemeyerI guess I can easily put mocker to work here, if necessary
23:14.42niemeyerBy expecting a call on get_insert_identity
23:14.48jkakarie: ".".join(str(x) for x in version)
23:15.25niemeyerjkakar: Well, that's what it's asserting :)
23:15.31jkakarniemeyer: Yeah, I know. :)
23:15.53radixbtw map(str, version) is shorter ;P
23:15.57jkakarniemeyer: I just tend to be wary when a test basically just copies an expression from the implementation into the test.  But, like I said, I can't think of a better way right now.
23:16.06niemeyerradix: Wow.. brilliant :-)
23:17.15niemeyerjkakar: Well, it didn't actually copy the expression
23:17.24niemeyerjkakar: They're precisely the opposite of each other
23:17.40niemeyerjkakar: and we test the types of the value
23:17.46jkakarniemeyer: Hehe, yeah, I guess you're right.
23:17.49niemeyerjkakar: So there's something else going on there
23:18.17jkakarniemeyer: I guess I really want to see assertEquals(server_version, "8.2.1"), but that of course won't work.
23:18.56niemeyerjkakar: Right
23:21.01niemeyerjkakar: Hmm.. actually, in a certain way that's what we're doing
23:21.12niemeyerjkakar: Since we get server_version from postgres untouched
23:21.29Zenomyou guys know of an sqlite gui for mac?
23:21.34jkakarniemeyer: Hmm.  Yeah, I think you're right.
23:21.37radixok yeah, this second revision is hard
23:21.40Zenomdon't want to install postgresql locally if I don't have to
23:21.58radixZenom: why do you want a gui?
23:22.01niemeyerradix: Sorry :(
23:22.13Zenomradix just makes it easier
23:22.15Zenombeing lazy
23:22.16Zenomlol
23:22.32niemeyerradix: Let me explain the idea.. maybe it helps
23:22.53niemeyerBefore, _fill_missing_values() was a big and ugly function
23:22.55radixZenom: what does it make easier? I mean, what do you want to use it for?
23:23.14radixZenom: if you just want to run the storm tests, if you have python2.5 it will work because os x comes with sqlite and python 2.5 comes with pysqlite
23:23.41niemeyerIt did several things: validated cached objects, and resolved lazy values to their database real values
23:23.52niemeyerNow, these features were split
23:24.31Zenomradix: i just didn't want to generate the tables manually
23:24.34Zenomjust being lazy is all
23:24.37niemeyer_fill_missing_values() should only retrieve the primary key values, if they're missing, and set everything else that is missing to AutoReload
23:24.47Zenomie., didn't want to do CREATE TABLE news ( ... ) lol
23:24.54radixZenom: oh, ok :)
23:25.50niemeyerThen, _resolve_lazy_value actually resolves values
23:25.59niemeyerand _validate_cache does the cache validation step
23:26.13niemeyerNotice that _fill_missing_values() now is only called in _flush_one()
23:26.18jkakarStorm needs more docstrings. :)
23:26.18radixright, cool
23:26.27jkakarBut that explanation does really help, thanks.
23:26.27radixactually I'm pretty happy with the docstring for _fill_missing_values
23:27.19jkakarI would like to write meaningful docstrings for the tests, actually.  I often find I'm reading them and feel that I'm missing an important detail that isn't obvious from the implementation.  Eventually, the light turns on and I usually remember/figure it out. :)
23:27.38radixniemeyer: I suggest renaming it to _fill_missing_primary_values, or at least updating the first line of the docstring to say as such
23:27.50radix(now that it's changed)
23:28.15niemeyerradix: It actually "fills" other variables as well
23:28.20radixalthough maybe not, since it does...
23:28.21radixright
23:28.35radixnever mind, the docstring is already perfect
23:28.50radixinteractive reviews are bad, they give me a chance to blabber without accumulating all of my thoughts :)
23:30.00jkakarHehe, I feel the same way.
23:30.15niemeyer<PROTECTED>
23:30.16niemeyer<PROTECTED>
23:30.16niemeyer<PROTECTED>
23:30.16niemeyer<PROTECTED>
23:30.16niemeyer<PROTECTED>
23:30.16niemeyer<PROTECTED>
23:30.18niemeyer<PROTECTED>
23:34.45jkakarNice
23:36.36Zenomsqlite only has 4 column types? text, integer, blob and real?
23:37.08niemeyerZenom: Hmm.. something close to that :)
23:37.17radixman this second revision is actually really nice
23:37.17Zenomrofl
23:37.23niemeyerZenom: It actually has a different idea about column types
23:37.28radixit actually only has two column types
23:37.36niemeyerZenom: The documentation will help in that case
23:37.54Zenomyeah i am looking at it now, lol
23:38.23niemeyerThere's that "affinity" thing
23:42.14jkakarniemeyer: Okay, I've read over this code carefully.  I suspect there are things I'm missing, but I think I understand most of the changes.  I think I'm happy to say +1 on it.
23:42.41niemeyerjkakar: Thanks for checking it out!
23:43.17jkakarniemeyer: No problem!  It looks pretty cool.  I was pleased to see that making a, seemingly significant, change like adding the RETURNING stuff was quite straight-forward.
23:44.01radixman  this second revision is *awesome* :)
23:45.09weatherman_storm/insert-returning r194 committed by gustavo@niemeyer.net
23:45.09weatherman_Applying reviews from Jamu and Chris.
23:45.28radixand the third is short and sweet
23:45.32radixniemeyer: +1!
23:46.03niemeyerWOOT!
23:46.59jkakarOh, this is so exciting.
23:55.29weatherman_storm/trunk r191 committed by gustavo@niemeyer.net
23:55.30weatherman_Merged insert-returning branch [r=radix,jkakar]
23:55.34weatherman_This branch implements three important changes:
23:55.42weatherman_- It changes the flushing mechanism to not load values inserted
23:55.46weatherman_<PROTECTED>
23:55.50weatherman_<PROTECTED>
23:55.58weatherman_- It implements support in the postgres backend to use the RETURNING
23:56.02weatherman_<PROTECTED>
23:56.06weatherman_<PROTECTED>
23:56.14weatherman_- It prevents a pathological case which happens when a statement like
23:56.18weatherman_<PROTECTED>
23:56.22weatherman_<PROTECTED>
23:56.26weatherman_<PROTECTED>

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.