SQL Type Wrappers¶
-
class
ctds.
SqlBigInt
(value)¶ SQL BIGINT type wrapper.
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
-
class
ctds.
SqlBinary
(value)¶ SQL BINARY type wrapper.
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
-
class
ctds.
SqlChar
(value)¶ SQL CHAR type wrapper. The value’s UTF-8-encoded length must be <= 8000.
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
-
class
ctds.
SqlDate
(value)¶ SQL DATE type wrapper.
- Parameters
value (datetime.date) – The date value to wrap or
None
.
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
class
ctds.
SqlDecimal
(value, precision=18, scale=0)¶ SQL DECIMAL type wrapper.
- Parameters
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
class
ctds.
SqlInt
(value)¶ SQL INT type wrapper.
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
-
class
ctds.
SqlNVarChar
(value, size=None)¶ SQL NVARCHAR type wrapper.
New in version 1.1.
- Parameters
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
class
ctds.
SqlSmallInt
(value)¶ SQL SMALLINT type wrapper.
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
-
class
ctds.
SqlTinyInt
(value)¶ SQL TINYINT type wrapper.
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.
-
-
class
ctds.
SqlVarBinary
(value, size=None)¶ SQL VARBINARY type wrapper.
- Parameters
-
size
¶ The size of the type. This will be -1 for fixed size values.
-
tdstype
¶ The TDS type code.
-
value
¶ The wrapped Python value.