mysql.stmt.bind_in.Input_Bind

Package mysql :: Package stmt :: Module bind_in :: Class Input_Bind |
[hide private]
[frames] | no frames]

# Class Input_Bind

    object --+
             |
            Input_Bind

Known Subclasses:
  Base_Decimal, Base_In_Stream, Base_In_String, In_Big_Int, In_Bit, In_Tiny_Int, In_Date, In_Date_Time, In_Double, In_Float, In_Int, In_Medium_Int, In_Null, In_Small_Int, In_Time, In_Timestamp, In_U_Big_Int, In_U_Double, In_U_Float, In_U_Int, In_U_Medium_Int, In_U_Small_Int, In_U_Tiny_Int, In_Year

Base input binding class.

The constructor takes two arguments, 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.

Internally, the Statement object calls `Input_Bind.set_value` on all bound inputs just before calling execute. The `set_value` method is responsible for setting the internal C value from the Python value (`who.what`) that is pointed to by _buffer_type. Note that the streaming objects are unique because their data is already transfered when the user wrote to the stream.

Instance Methods | [hide private]
`` | __init__(...) x.__init__(...) initializes x; see x.__class__.__doc__ for signature
`` | __new__(T, S, ...) Returns a new object with type S, a subtype of T...
Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables | [hide private]
`` | __pyx_vtable__ = `<PyCObject object at 0x852e4b8>`

Instance Variables | [hide private]
`` | _buffer A `void *` pointer to where the data is stored.
`` | _buffer_length The size of _buffer in bytes.
`` | _buffer_type The type of the buffer (as `extern_mysql.enum_field_types`).
`` | _is_null = `<member '_is_null' of 'mysql.stmt.bind_in.Input_Bind...` Whether or not the value is NULL.
`` | _is_unsigned Set to true if the buffer is an unsigned number.
`` | _length The length of the value in _buffer.
`` | _what A string of the attribute to get from _who for the Python value to read.
`` | _who The object who contains the value.

Properties | [hide private]
Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(...) (Constructor) |
x.__init__(...) initializes x; see x.__class__.__doc__ for signature Overrides: object.__init__

### __new__(T, S, ...) |
    Returns:
        a new object with type S, a subtype of T
Overrides: object.__new__

Class Variable Details | [hide private]

    ### __pyx_vtable__ Value:
        <PyCObject object at 0x852e4b8>

Instance Variable Details | [hide private]

### _buffer A `void *` pointer to where the data is stored. Should be set in `__new__`. (C only.)

### _buffer_length The size of _buffer in bytes. Not used for some data types (such as numbers) because the size is implied by the buffer type. Should be set in `__new__` if it is needed. (C only.)

### _buffer_type The type of the buffer (as `extern_mysql.enum_field_types`). Should be set in `__new__`. (C only.)

    ### _is_null Whether or not the value is NULL. Should always be set or cleared in the `set_value` method. (C only.) Value:
        <member '_is_null' of 'mysql.stmt.bind_in.Input_Bind' objects>

### _is_unsigned Set to true if the buffer is an unsigned number. Should be set in `__new__`. (C only.)

### _length The length of the value in _buffer. Not used for some data types (such as numbers) because the size is implied by the data type. Should be set in the `set_value` method if needed. (C only.)

### _what A string of the attribute to get from _who for the Python value to read. Automatically set from __init__. (C only.)

### _who The object who contains the value. Automatically set from __init__. (C only.)