[pysqlite] variable number of fields updates

"Eric S. Johansson" <[email protected]> Tue, 04 Nov 2008 09:50:53 -0500
Newsgroups gmane.comp.python.db.pysqlite.user
Message-ID <[email protected]>
got a record with 21 fields.   have a faint inkling of when I'm going to insert
versus update but that's another problem.  What I'm really concerned with is
that I update a variable number of fields at different points in my workflow.
With what I know about SQL, I have to create a separate unique and distinct SQL
command for every different set of fields I'm updating.  This is seriously ugly
not to mention the complexity and testing all of these combinations.  Is there
any mechanism/tool/idiom available that let's me do something like specify a
dictionary, and a list of fields to update and have it generate the right SQL