fix: use timedelta instead of time to cast TIME column in B compatibility mode(#IAIE7I)
In mysql compatibility mode, we should convert the TIME column to a python datetime.timedelta type, just like the behavior of PyMySQL and mysql-connector-python. See also: - PyMySQL:95635f587b/pymysql/converters.py (L344)- mysql-connector-python:59817f3de4/mysql-connector-python/lib/mysql/connector/conversion.py (L593)
This commit is contained in:
@ -88,5 +88,7 @@ HIDDEN PyObject *typecast_array_from_python(
|
||||
HIDDEN PyObject *typecast_cast(
|
||||
PyObject *self, const char *str, Py_ssize_t len, PyObject *curs);
|
||||
|
||||
HIDDEN long convert_time_oid_to_interval_oid(long value);
|
||||
|
||||
#endif /* !defined(PSYCOPG_TYPECAST_H) */
|
||||
PyObject *typecast_new(PyObject *name, PyObject *values, PyObject *cast, PyObject *base);
|
||||
Reference in New Issue
Block a user