sqlobject.styles module¶
- sqlobject.styles.DefaultStyle¶
alias of
MixedCaseUnderscoreStyle
- class sqlobject.styles.MixedCaseStyle(pythonAttrToDBColumn=None, dbColumnToPythonAttr=None, pythonClassToDBTable=None, dbTableToPythonClass=None, idForTable=None, longID=False)[source]¶
Bases:
Style
This style leaves columns as mixed-case, and uses long ID names (like ProductID instead of simply id).
- class sqlobject.styles.MixedCaseUnderscoreStyle(pythonAttrToDBColumn=None, dbColumnToPythonAttr=None, pythonClassToDBTable=None, dbTableToPythonClass=None, idForTable=None, longID=False)[source]¶
Bases:
Style
This is the default style. Python attributes use mixedCase, while database columns use underscore_separated.
- class sqlobject.styles.Style(pythonAttrToDBColumn=None, dbColumnToPythonAttr=None, pythonClassToDBTable=None, dbTableToPythonClass=None, idForTable=None, longID=False)[source]¶
Bases:
object
The base Style class, and also the simplest implementation. No translation occurs – column names and attribute names match, as do class names and table names (when using auto class or schema generation).