Home | Trees | Indices | Help |
---|
|
MySQL Statement Input Binding.
This module contains all the Statement input binding objects. When you create a new Statement object with parameters, you need to call mysql.stmt.Statement.bind_input with instances of these objects to indicate which Python variable to read the value from.
All input binding objects take at least two parameters, the first is the object in which to look for a parameter. The second is the name (as a string) of the parameter to read.
Some input bindings, such as string objects, take a third argument which is the maximum expected size of the value.
The "streaming" input bindings (blob and text) take an optional use_stream parameter. If this is set to True, then the value in your object will show up as a stream object with a write method. Otherwise the value is expected to be a string. See Base_In_Stream for more detail.
All values may be set to None in which case the value will be set to NULL in the database. However, when you are using a stream, do not write any data, and the value will be set to NULL. If you want an empty string when using a stream, call write with an empty string.
As a reference, use the following objects for their corresponding MySQL types:
The following input binding types are not supported:
|
|||
|
Base_Decimal Signed Decimal input binding. |
||
|
Base_In_Stream Base class for streaming input. |
||
|
Base_In_String Base class input binding that is a character array from a string. |
||
|
In_Big_Int BIGINT input binding. |
||
|
In_Binary CHAR input binding. |
||
|
In_Bit BIT input binding. |
||
|
In_Blob BLOB input binding. |
||
|
In_Bool BOOL input binding. |
||
|
In_Char CHAR input binding. |
||
|
In_Date DATE input binding. |
||
|
In_Date_Time DATETIME input binding. |
||
|
In_Decimal Signed Decimal input binding. |
||
|
In_Double DOUBLE input binding. |
||
|
In_Enum ENUM input binding. |
||
|
In_Float FLOAT input binding. |
||
|
In_Int INT input binding. |
||
|
In_Long_Blob LONGBLOB input binding. |
||
|
In_Long_Text LONGBLOB input binding. |
||
|
In_Medium_Blob MEDIUMBLOB input binding. |
||
|
In_Medium_Int MEDIUMINT input binding. |
||
|
In_Medium_Text MEDIUMBLOB input binding. |
||
|
In_New_Decimal Signed "new" decimal input binding. |
||
|
In_Null Null input binding. |
||
|
In_Set SET input binding. |
||
|
In_Small_Int SMALLINT input binding. |
||
|
In_Text BLOB input binding. |
||
|
In_Time TIME input binding. |
||
|
In_Timestamp TIMESTAMP input binding. |
||
|
In_Tiny_Blob TINYBLOB input binding. |
||
|
In_Tiny_Int TINYINT input binding. |
||
|
In_Tiny_Text TINYBLOB input binding. |
||
|
In_U_Big_Int UNSIGNED BIG INT input binding. |
||
|
In_U_Decimal Unsigned Decimal input binding. |
||
|
In_U_Double UNSIGNED DOUBLE input binding. |
||
|
In_U_Float UNSIGNED FLOAT input binding. |
||
|
In_U_Int UNSIGNED INT input binding. |
||
|
In_U_Medium_Int UNSIGNED MEDIUMINT input binding. |
||
|
In_U_New_Decimal Unsigned "new" decimal input binding. |
||
|
In_U_Small_Int UNSIGNED SMALLINT input binding. |
||
|
In_U_Tiny_Int UNSIGNED TINYINT input binding. |
||
|
In_Varbinary VARCHAR input binding. |
||
|
In_Varchar VARCHAR input binding. |
||
|
In_Year YEAR input binding. |
||
|
Input_Bind Base input binding class. |
||
|
Input_Stream Input Stream. |
|
|||
|
__version__ = '$Revision: 1.5 $'
|
|
__version__
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Sun Nov 12 20:01:27 2006 | http://epydoc.sourceforge.net |