Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] SQLAlchemy Has Annoyances



On 02/05/2015 01:45 PM, Mike Small wrote:
> So in his case could he use only one class and map it to many tables? 
> i.e. when finished with one temporary table and moving on to a second 
> one, 

I tried that, and SQL Alchemy complains.

> could he sweep out all the old class members (member variables or 
> methods -- I don't know how the mapping to columns is done here) and 
> add new ones corresponding to the new set of columns? 

I don't dare do surgery on the class unless I also do matching surgery 
on the private data structures they are maintaining to map between a 
class and SQL. The don't watch the class dynamically, that is why I have 
to make a mapper call.

I also considered lifting from their code that frees all the mappings 
and just free the one I want, but that seemed dangerous and getting is 
too deep.

-kb




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org