Markus Gritsch | 18 Apr 15:59 2007
Picon

Thoughts on "Support for MySQL storage ENGINEs"

Hi Oleg,

SQLObject 0.9.0b1 got under "Small Features"
* Support for MySQL storage ENGINEs.

I wonder if the special treatment for MySQL in dbconnection.py and
main.py in order to implement this feature is worth it.  The same
result can already be obtained by using something like this:

class Version( SQLObject ):
    class sqlmeta:
        createSQL = { 'mysql' : 'ALTER TABLE version ENGINE InnoDB' }
    number = IntCol( notNone = True )

So I would suggest not to add this feature in the final release.  I
see no real benefit and like the Zen of Python says "Special cases
aren't special enough to break the rules." ;)

And implementing some special case for the engine would not be enough
anyway.  For example I am using a non-default collation system.
Therefore I have to write something like the following:

class Act( SQLObject ):
    class sqlmeta:
        createSQL = { 'mysql' : 'ALTER TABLE act CHARACTER SET utf8
COLLATE utf8_estonian_ci' }

Kind regards,
Markus

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/

Gmane