Ed Leafe wrote: > On Dec 25, 2006, at 2:19 PM, Paul McNett wrote: > >> I'm keeping two dicts keyed on PK: _mementos and _newRecords. The >> _newRecords dict contains no useful values (the PK's presence in the >> dict tells us that it is a new record). > > Just a quick question: will this work with tables with compound PKs? > What about tables with no PKs?
compoundPK's: should work, because a compound key would consist of a tuple of values, and you can key a dict on a tuple, but I'll definitely have to test that to be sure. no PKs: no, it won't work, but don't we assume there will be PK's all over the place already? > BTW, why not make _newRecords into a list instead of a dict? It should be a list. It was faster to mirror the _mementos dict to get the proof of concept hacked together. -- pkm ~ http://paulmcnett.com _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
