Diff of /MySQLdb/converters.py [80164e] .. [3b03cb]  Maximize  Restore

Switch to unified view

a/MySQLdb/converters.py b/MySQLdb/converters.py
...
...
108
    FIELD_TYPE.TIME: timedelta_or_None,
108
    FIELD_TYPE.TIME: timedelta_or_None,
109
    FIELD_TYPE.DATE: date_or_None,   
109
    FIELD_TYPE.DATE: date_or_None,   
110
    }
110
    }
111
111
112
# Decoder protocol
112
# Decoder protocol
113
# Each decoder is passed a cursor object and a field object.
113
# Each decoder is passed a field object.
114
# The decoder returns a single value:
114
# The decoder returns a single value:
115
# * A callable that given an SQL value, returns a Python object.
115
# * A callable that given an SQL value, returns a Python object.
116
# This can be as simple as int or str, etc. If the decoder
116
# This can be as simple as int or str, etc. If the decoder
117
# returns None, this decoder will be ignored and the next decoder
117
# returns None, this decoder will be ignored and the next decoder
118
# on the stack will be checked.
118
# on the stack will be checked.
...
...
176
def tuple_row_decoder(decoders, row):
176
def tuple_row_decoder(decoders, row):
177
    if row is None:
177
    if row is None:
178
        return None
178
        return None
179
    return tuple(iter_row_decoder(decoders, row))
179
    return tuple(iter_row_decoder(decoders, row))
180
180
181
default_row_formatter = tuple_row_decoder
181
182
182
183
184
185

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks