Home | Trees | Indices | Help |
---|
|
MySQL Statement Output Binding.
This module contains all the Statement output binding objects. When you create a new Statement object that selecs data, you need to call mysql.stmt.Statement.bind_output with instances of these objects to indicate which Python variable to set with the output value.
All output binding objects take at least two parameters, the first is the object in which to set the value. The second is the name (as a string) of the parameter to set.
Some output bindings, such as string objects, take a third argument which is the maximum expected size of the value. If the data is truncated, then the call to fetch raises mysql.exceptions.Data_Truncated.
The "streaming" output bindings (blob and text) take an optional fourth argument use_stream. If this is set to True, then the value in your object will show up as a stream object with a read method. Otherwise the value will be set as a string. See Base_Out_Stream for more detail.
All values may be returned as None for NULL values.
As a reference, use the following objects for their corresponding MySQL types:
The following output binding types are not supported:
|
|||
|
Base_Out_Stream Base class for streaming output. |
||
|
Base_Out_String Base string-type output binding. |
||
|
Out_Big_Int BIGINT output binding. |
||
|
Out_Binary CHAR output binding. |
||
|
Out_Bit BIT output binding. |
||
|
Out_Blob BLOB output binding. |
||
|
Out_Bool BOOL output binding. |
||
|
Out_Char CHAR output binding. |
||
|
Out_Date DATE output binding. |
||
|
Out_Date_Time DATETIME output binding. |
||
|
Out_Decimal DECIMAL output binding. |
||
|
Out_Double DOUBLE output binding. |
||
|
Out_Enum VARCHAR output binding. |
||
|
Out_Float FLOAT output binding. |
||
|
Out_Int INT output binding. |
||
|
Out_Long_Blob LONGBLOB output binding. |
||
|
Out_Long_Text LONGBLOB output binding. |
||
|
Out_Medium_Blob MEDIUMBLOB output binding. |
||
|
Out_Medium_Int INT output binding. |
||
|
Out_Medium_Text MEDIUMBLOB output binding. |
||
|
Out_New_Decimal NEW DECIMAL output binding. |
||
|
Out_Null Null output binding. |
||
|
Out_Set SET output binding. |
||
|
Out_Small_Int SMALLINT output binding. |
||
|
Out_Text BLOB output binding. |
||
|
Out_Time TIME output binding. |
||
|
Out_Timestamp TIMESTAMP output binding. |
||
|
Out_Tiny_Blob TINYBLOB output binding. |
||
|
Out_Tiny_Int TINYINT output binding. |
||
|
Out_Tiny_Text TINYBLOB output binding. |
||
|
Out_U_Big_Int UNSIGNED BIGINT output binding. |
||
|
Out_U_Decimal DECIMAL output binding. |
||
|
Out_U_Double DOUBLE output binding. |
||
|
Out_U_Float FLOAT output binding. |
||
|
Out_U_Int UNSIGNED INT output binding. |
||
|
Out_U_Medium_Int UNSIGNED INT output binding. |
||
|
Out_U_New_Decimal NEW DECIMAL output binding. |
||
|
Out_U_Small_Int UNSIGNED SMALLINT output binding. |
||
|
Out_U_Tiny_Int UNSIGNED TINYINT output binding. |
||
|
Out_Varbinary VARCHAR output binding. |
||
|
Out_Varchar VARCHAR output binding. |
||
|
Out_Year YEAR output binding. |
||
|
Output_Bind Base output binding class. |
||
|
Output_Stream Output stream. |
|
|||
|
__version__ = '$Revision: 1.7 $'
|
|
__version__
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0alpha3 on Sun Nov 12 20:01:27 2006 | http://epydoc.sourceforge.net |