sqlobject.col module¶
Col – SQLObject columns
Note that each column object is named BlahBlahCol, and these are used in class definitions. But there’s also a corresponding SOBlahBlahCol object, which is used in SQLObject classes.
An explanation: when a SQLObject subclass is created, the metaclass looks through your class definition for any subclasses of Col. It collects them together, and indexes them to do all the database stuff you like, like the magic attributes and whatnot. It then asks the Col object to create an SOCol object (usually a subclass, actually). The SOCol object contains all the interesting logic, as well as a record of the attribute name you used and the class it is bound to (set by the metaclass).
So, in summary: Col objects are what you define, but SOCol objects are what gets used.
-
class
sqlobject.col.
UuidCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
class
sqlobject.col.
SOPickleCol
(**kw)[source]¶ Bases:
sqlobject.col.SOBLOBCol
-
class
sqlobject.col.
SOForeignKey
(**kw)[source]¶ Bases:
sqlobject.col.SOKeyCol
-
class
sqlobject.col.
DecimalStringCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.StringCol
-
baseClass
¶ alias of
SODecimalStringCol
-
-
class
sqlobject.col.
TimestampCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOTimestampCol
-
-
class
sqlobject.col.
BigIntCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOBigIntCol
-
-
class
sqlobject.col.
JsonbCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOJsonbCol
-
-
class
sqlobject.col.
SOJsonbCol
(name, soClass, creationOrder, dbName=None, default=<class sqlobject.sqlbuilder.NoDefault>, defaultSQL=None, foreignKey=None, alternateID=False, alternateMethodName=None, constraints=None, notNull=<class sqlobject.sqlbuilder.NoDefault>, notNone=<class sqlobject.sqlbuilder.NoDefault>, unique=<class sqlobject.sqlbuilder.NoDefault>, sqlType=None, columnDef=None, validator=None, validator2=None, immutable=False, cascade=None, lazy=False, noCache=False, forceDBName=False, title=None, tags=[], origName=None, dbEncoding=None, extra_vars=None)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
SOCurrencyCol
(**kw)[source]¶ Bases:
sqlobject.col.SODecimalCol
-
class
sqlobject.col.
SOTimestampCol
(**kw)[source]¶ Bases:
sqlobject.col.SODateTimeCol
Necessary to support MySQL’s use of TIMESTAMP versus DATETIME types
-
class
sqlobject.col.
DateCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
class
sqlobject.col.
SODecimalStringCol
(**kw)[source]¶ Bases:
sqlobject.col.SOStringCol
-
class
sqlobject.col.
JSONCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.StringCol
-
class
sqlobject.col.
StringCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOStringCol
-
-
class
sqlobject.col.
SOStringLikeCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
A common ancestor for SOStringCol and SOUnicodeCol
-
class
sqlobject.col.
SOIntCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
SOFloatCol
(name, soClass, creationOrder, dbName=None, default=<class sqlobject.sqlbuilder.NoDefault>, defaultSQL=None, foreignKey=None, alternateID=False, alternateMethodName=None, constraints=None, notNull=<class sqlobject.sqlbuilder.NoDefault>, notNone=<class sqlobject.sqlbuilder.NoDefault>, unique=<class sqlobject.sqlbuilder.NoDefault>, sqlType=None, columnDef=None, validator=None, validator2=None, immutable=False, cascade=None, lazy=False, noCache=False, forceDBName=False, title=None, tags=[], origName=None, dbEncoding=None, extra_vars=None)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
SODecimalCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
SOEnumCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
SOUuidCol
(name, soClass, creationOrder, dbName=None, default=<class sqlobject.sqlbuilder.NoDefault>, defaultSQL=None, foreignKey=None, alternateID=False, alternateMethodName=None, constraints=None, notNull=<class sqlobject.sqlbuilder.NoDefault>, notNone=<class sqlobject.sqlbuilder.NoDefault>, unique=<class sqlobject.sqlbuilder.NoDefault>, sqlType=None, columnDef=None, validator=None, validator2=None, immutable=False, cascade=None, lazy=False, noCache=False, forceDBName=False, title=None, tags=[], origName=None, dbEncoding=None, extra_vars=None)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
SOTimedeltaCol
(name, soClass, creationOrder, dbName=None, default=<class sqlobject.sqlbuilder.NoDefault>, defaultSQL=None, foreignKey=None, alternateID=False, alternateMethodName=None, constraints=None, notNull=<class sqlobject.sqlbuilder.NoDefault>, notNone=<class sqlobject.sqlbuilder.NoDefault>, unique=<class sqlobject.sqlbuilder.NoDefault>, sqlType=None, columnDef=None, validator=None, validator2=None, immutable=False, cascade=None, lazy=False, noCache=False, forceDBName=False, title=None, tags=[], origName=None, dbEncoding=None, extra_vars=None)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
SetCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
class
sqlobject.col.
SOTinyIntCol
(**kw)[source]¶ Bases:
sqlobject.col.SOIntCol
-
class
sqlobject.col.
BoolCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
class
sqlobject.col.
TinyIntCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOTinyIntCol
-
-
class
sqlobject.col.
SOCol
(name, soClass, creationOrder, dbName=None, default=<class sqlobject.sqlbuilder.NoDefault>, defaultSQL=None, foreignKey=None, alternateID=False, alternateMethodName=None, constraints=None, notNull=<class sqlobject.sqlbuilder.NoDefault>, notNone=<class sqlobject.sqlbuilder.NoDefault>, unique=<class sqlobject.sqlbuilder.NoDefault>, sqlType=None, columnDef=None, validator=None, validator2=None, immutable=False, cascade=None, lazy=False, noCache=False, forceDBName=False, title=None, tags=[], origName=None, dbEncoding=None, extra_vars=None)[source]¶ Bases:
object
-
default
¶
-
joinName
¶
-
validator
¶
-
-
class
sqlobject.col.
SODateTimeCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
-
datetimeFormat
= '%Y-%m-%d %H:%M:%S.%f'¶
-
-
class
sqlobject.col.
SOBLOBCol
(**kw)[source]¶ Bases:
sqlobject.col.SOStringCol
-
class
sqlobject.col.
SOKeyCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
-
key_type
= {<type 'str'>: 'TEXT', <type 'int'>: 'INT'}¶
-
-
class
sqlobject.col.
TimedeltaCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOTimedeltaCol
-
-
class
sqlobject.col.
SODateCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
-
dateFormat
= '%Y-%m-%d'¶
-
-
class
sqlobject.col.
SOSetCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
CurrencyCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.DecimalCol
-
baseClass
¶ alias of
SOCurrencyCol
-
-
class
sqlobject.col.
KeyCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
class
sqlobject.col.
ForeignKey
(foreignKey=None, **kw)[source]¶ Bases:
sqlobject.col.KeyCol
-
baseClass
¶ alias of
SOForeignKey
-
-
class
sqlobject.col.
SOSmallIntCol
(**kw)[source]¶ Bases:
sqlobject.col.SOIntCol
-
class
sqlobject.col.
PickleCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.BLOBCol
-
baseClass
¶ alias of
SOPickleCol
-
-
class
sqlobject.col.
SOJSONCol
(**kw)[source]¶ Bases:
sqlobject.col.SOStringCol
-
class
sqlobject.col.
BLOBCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.StringCol
-
class
sqlobject.col.
IntCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
class
sqlobject.col.
SOBigIntCol
(**kw)[source]¶ Bases:
sqlobject.col.SOIntCol
-
class
sqlobject.col.
EnumCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
class
sqlobject.col.
SOMediumIntCol
(**kw)[source]¶ Bases:
sqlobject.col.SOIntCol
-
class
sqlobject.col.
SOTimeCol
(**kw)[source]¶ Bases:
sqlobject.col.SOCol
-
timeFormat
= '%H:%M:%S.%f'¶
-
-
class
sqlobject.col.
SOBoolCol
(name, soClass, creationOrder, dbName=None, default=<class sqlobject.sqlbuilder.NoDefault>, defaultSQL=None, foreignKey=None, alternateID=False, alternateMethodName=None, constraints=None, notNull=<class sqlobject.sqlbuilder.NoDefault>, notNone=<class sqlobject.sqlbuilder.NoDefault>, unique=<class sqlobject.sqlbuilder.NoDefault>, sqlType=None, columnDef=None, validator=None, validator2=None, immutable=False, cascade=None, lazy=False, noCache=False, forceDBName=False, title=None, tags=[], origName=None, dbEncoding=None, extra_vars=None)[source]¶ Bases:
sqlobject.col.SOCol
-
class
sqlobject.col.
DecimalCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SODecimalCol
-
-
class
sqlobject.col.
TimeCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
class
sqlobject.col.
MediumIntCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOMediumIntCol
-
-
class
sqlobject.col.
DateTimeCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SODateTimeCol
-
-
class
sqlobject.col.
FloatCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOFloatCol
-
-
class
sqlobject.col.
UnicodeCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOUnicodeCol
-
-
class
sqlobject.col.
SmallIntCol
(name=None, **kw)[source]¶ Bases:
sqlobject.col.Col
-
baseClass
¶ alias of
SOSmallIntCol
-