[00:01:16] bear__ is now known as bear [00:14:58] ** debugger has left IRC () [01:25:29] Good morning people [01:25:35] apauley|away is now known as apauley [01:36:01] {global notice} Hi all, in about 25 mins, I'm going to start rebooting a couple of our servers for updates. This should only take about 5 mins at the most. Thank you for your patience, and thank you for using freenode! [01:52:13] {global notice} Hi all, in about 10 mins, I will begin the server reboots. Any further messages for this will be given in wallops. Thank you for your patience, and thank you for using freenode! [02:07:36] ** etrepum has left IRC (benford.freenode.net irc.freenode.net) [02:07:36] ** bear has left IRC (benford.freenode.net irc.freenode.net) [02:07:36] ** apauley has left IRC (benford.freenode.net irc.freenode.net) [02:07:36] ** arg has left IRC (benford.freenode.net irc.freenode.net) [02:07:36] ** gbay has left IRC (benford.freenode.net irc.freenode.net) [02:07:36] ** grincho has left IRC (benford.freenode.net irc.freenode.net) [02:07:36] ** Maniac has left IRC (benford.freenode.net irc.freenode.net) [02:10:18] ** arg has joined us [02:10:18] ** grincho has joined us [02:10:18] ** etrepum has joined us [02:10:18] ** gbay has joined us [02:10:21] ** Maniac has joined us [02:10:22] ** bear has joined us [02:15:21] ** bear has left IRC (benford.freenode.net irc.freenode.net) [02:15:21] ** grincho has left IRC (benford.freenode.net irc.freenode.net) [02:15:21] ** gbay has left IRC (benford.freenode.net irc.freenode.net) [02:15:21] ** arg has left IRC (benford.freenode.net irc.freenode.net) [02:15:21] ** etrepum has left IRC (benford.freenode.net irc.freenode.net) [02:16:58] ** bear has joined us [02:16:58] ** arg has joined us [02:16:58] ** grincho has joined us [02:16:58] ** etrepum has joined us [02:16:58] ** gbay has joined us [02:30:44] {global notice} Hi all, one more major split coming, and then I'll be done for the evening. I apolovize for the inconvenience, and thank you for using freenode! [02:33:16] ** gbay has left IRC (benford.freenode.net irc.freenode.net) [02:33:16] ** arg has left IRC (benford.freenode.net irc.freenode.net) [02:33:29] ** grincho has left IRC (benford.freenode.net irc.freenode.net) [02:33:29] ** bear has left IRC (benford.freenode.net irc.freenode.net) [02:37:46] ** grincho has joined us [02:47:18] ** arg has joined us [02:48:49] ** bear has joined us [02:48:59] ** gbay has joined us [02:50:38] ** apauley has joined us [04:02:31] [connected at Thu Feb 3 04:02:31 2005] [04:02:31] <> *** Looking up your hostname... [04:02:31] <> *** Checking ident [04:02:31] <> *** Found your hostname [04:03:04] <> *** No identd (auth) response [04:03:04] <> *** Your host is niven.freenode.net[niven.freenode.osuosl.org/6667], running version dancer-ircd-1.0.35 [04:03:04] [I have joined #peak] [04:03:04] ** niven.freenode.net set the topic to http://dirtsimple.org/2004/11/generic-functions-have-landed.html [05:29:26] ** gbay has left IRC (Read error: 110 (Connection timed out)) [06:16:43] ** vlado has joined us [07:28:43] ** grincho_ has joined us [07:28:44] ** grincho has left IRC (Read error: 104 (Connection reset by peer)) [08:43:10] ping [08:43:48] grincho_ is now known as grincho [09:25:37] pong [09:38:41] ** vlado has left IRC ("Leaving") [11:06:18] ** debugger has joined us [12:15:09] apauley is now known as apauley|away [13:04:28] ack [13:11:40] ** sprout has joined us [13:24:47] So, PEAK DataManagers look great and all, but I was kind of expecting to find an object-relational mapper in here. IntroToPeak/LessonFour has you writing all the SQL yourself. [13:25:11] Does PEAK offer any O-R mapping stuff, or do I have to mix SQLObject in? [14:59:01] ** gbay has joined us [15:17:47] ** gbay has left us [15:46:24] ** rdmurray has joined us [16:12:02] Is there any reason PEAK shouldn't play nice with MS SQLServer? I have a working Python DBI 2.0 jigger for it. [16:12:38] Other than MS SQL tending not to play well with others? :) [16:12:45] Yes, other than that. :-) [16:13:10] I already have some other Python stuff working with MS SQL. [16:13:12] I should think you'd be able to make it work. [16:13:30] It supports transactions, right? [16:13:33] sure [16:13:45] It's a pretty sane database, from an integrity point of view. [16:14:00] It just has some syntactical weirdnesses. [16:14:02] I think that's the only PEAK requirement, but of course PJE is the one to really ask. [16:14:16] Maybe I'll post to the list. [16:14:24] Good idea. [16:14:36] One weird thing MS SQL does that disturbs me: [16:15:07] if you "begin" and then do some stuff, some of which fails and then "commit", the statements that didn't themselves fail will commit. [16:15:37] So if you aren't vigilant enough to notice and rollback, you get half transactions committed. [16:17:59] I'll be sticking with postgres when I have a choice. :-) [16:52:57] ** gbay has joined us [16:57:37] ** pje has joined us [16:57:51] I believe Ty has used MS SQL using FreeTDS with PEAK. [16:58:22] However, it should be straightforward to roll your own connection class; just take a look at the Sybase and Oracle ones in peak.storage.SQL [16:58:41] Ah, that's the pathname I wanted. :-) [16:58:50] Also, if you want a look at future support for SQL generation, have a look at peak.query.algebra [16:58:54] There's a prototype there. [16:59:21] You can also read my blog's discussion of a "fact base" concept; this is where queries, O-R mapping and a bunch of other stuff will come together. [16:59:33] So just implement IConnection (or whatever) in peak.storage.SQL, and that'll cover it? [16:59:48] Not *in* peak.storage.SQL, although I'll accept a patch, certainly. [17:00:11] You can put it in whatever module you like, you just have to add the necessary info to your app's .ini file [17:00:17] (supplementing the ones listed in peak.ini) [17:00:20] Right; the pith of my question is "The IConnection is all I need?" [17:00:39] You need a URL class, too, unless the GenericSQLURL class suffices. [17:01:18] That doesn't sound too bad. [17:01:27] I really ought to change GenericSQLURL to make it easy to use references. [17:01:29] And I suppose all that rides on DBAPI? [17:01:55] e.g. 'ref:myapp.MSSQLConnection@sql:user:pw@host/dbname' [17:01:58] Yes. [17:02:09] Both nifty and boffo. Thank you! [17:02:17] One of the most important DBAPI integration parts is to get the 'supportedTypes' collection correct. [17:02:36] You need to make it match the list of types exported by the DBAPI module. [17:02:52] result types like INTEGER, mind you, not DBAPI constructors like Timestamp. [17:03:27] Okay. I'll need to read up on that. [17:04:23] As for O-R maps, I'm not so much interested in abstracting fancy queries away; [17:04:33] ** debugger has left IRC (Connection timed out) [17:04:42] The other bit is you need to know whether those values (e.g. VARCHAR) are constants or special comparison objects. [17:04:59] A lot of DBAPI modules use these weird objects that compare equal to various numbers. [17:05:36] The easy way to tell is just to check whether the type objects have a 'values' attribute. [17:05:52] If so, you should subclass ValueBasedTypeConn rather than SQLConnection. [17:06:08] This stuff is for doing automatic type conversion from SQL types to Python types, not query abstraction. [17:06:20] Right; I grok that. [17:06:25] There's another mechanism for doing simple query thunking to create DB-portable code. [17:07:41] What string should I pull to find that thunker? [17:07:56] It's the 'appConfig' attribute of connections. [17:08:16] It maps to a 'drivername.appConfig' configuration property namespace. [17:08:35] So, if you want to have a 'foo' that you can access from a connection that depends on the connection's driver, [17:08:51] you add 'Sybase.appConfig.foo' and 'MSSQL.appConfig.foo' to the config... [17:09:07] And access '.appConfig.foo' on the connection object. [17:09:42] You can use lambdas or functions as properties, so that allows you to create app-specific, driver-specific methods for your database connections. [17:10:30] Are you still talking about how to make a SQLServer connection thingy? [17:10:43] Or are you off into application-domain stuff? [17:10:54] I'm describing how to do query thunking. [17:11:24] I think we mean different things by "query thunking". [17:11:32] Okay. [17:11:40] I was just noticing that, in LessonFour, [17:11:57] they update every field of a row every time, no matter if only some fields needed to change. [17:11:59] I mean, so you can hide back-end specific SQL constructs, like Sybase vs. Oracle date functions. [17:12:18] Oh, that's the least of my concerns right now, though I do appreciate the info. [17:12:59] Other people have written custom DMs that do SQL generation, with more or less sophistication. [17:13:02] And I wondered if PEAK provided a mechanism for throwing together an UPDATE query that only updates the necessary fields. [17:13:13] You could write one, certainly. [17:13:14] So that's outside PEAK's scope, then? [17:13:29] It's in scope for peak.query, it's just not done yet. [17:13:29] That's what I was wondering. [17:13:43] Okay. Great. I can deal with that. :-) Thanks. [17:14:01] peak.query seems to be more ambitious than that; am I wrong? [17:14:08] Way more ambitious. [17:14:22] Seems like something on a par, sophistication-wise, with an OQL. [17:14:31] It is. Ultimately, you'll use Python listcomps or genexprs to specify queries. [17:14:32] though I haven't read much of it [17:14:39] Wheee-lah! [17:14:53] The current stuff in there is just a prototype; most of it will not survive into a new version. [17:15:23] Neither will DMs, actually, although they'll hang around for compatibility reasons. [17:15:42] Aww. I thought they were such a good idea. [17:15:49] The replacement will use a single workspace for dealing with all classes, rather than DM-per-class. [17:15:55] I dig how they decouple storage from modeling; I assume that will stay. [17:16:43] Definitely. It's just that instead of FooDM[someId] you'll do 'workspace[aQuery]' to retrieve one or more objects. [17:16:57] makes sense [17:17:09] So you don't have to know what you'll be getting? [17:17:14] Where 'aQuery' can be either a full query string, or something like [SomeClass,id] in the simple case. [17:17:18] Nope. [17:17:22] Grand. [17:17:36] At this point, I have to run away and play racquetball. [17:17:49] I've got to run, too. Hope that helps. [17:17:50] Thanks so much for the juicy info! [17:17:55] * pje waves [17:17:58] It does indeed! Ciao! [17:18:02] ** pje has left IRC ("Client exiting") [17:18:15] * grincho runs away and plays racquetball. [19:38:13] ** gbay has left IRC (Remote closed the connection) [21:14:25] ** sprout has left IRC ("Snak 4.13 IRC For Mac - http://www.snak.com") [23:23:31] ** bear_ has joined us [23:24:31] ** bear has left IRC (Nick collision from services.) [23:24:36] bear_ is now known as bear [23:30:38] ** rdmurray has left IRC ("User disconnected")