sqlobject.styles module¶
-
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).
-
class
sqlobject.styles.
MixedCaseUnderscoreStyle
(pythonAttrToDBColumn=None, dbColumnToPythonAttr=None, pythonClassToDBTable=None, dbTableToPythonClass=None, idForTable=None, longID=False)[source]¶ Bases:
sqlobject.styles.Style
This is the default style. Python attributes use mixedCase, while database columns use underscore_separated.
-
sqlobject.styles.
DefaultStyle
¶
-
class
sqlobject.styles.
MixedCaseStyle
(pythonAttrToDBColumn=None, dbColumnToPythonAttr=None, pythonClassToDBTable=None, dbTableToPythonClass=None, idForTable=None, longID=False)[source]¶ Bases:
sqlobject.styles.Style
This style leaves columns as mixed-case, and uses long ID names (like ProductID instead of simply id).