connect() 同时提供了 host 与 server 参数,两者语义相近,但不能同时设置。
至少应提供可用凭据和目标地址,常见是:user、password、server、port。
支持。连接时传 cursorclass=dmPython.DictCursor,查询结果按列名映射为字典。
这是当前实现状态,不是调用方式问题。可使用 prepare() 或直接 execute()。
可读 connection.connection_dead 或调用 connection.ping(reconnect=1)。
使用 connection.debug(),参数可选 DEBUG_OPEN/DEBUG_CLOSE/DEBUG_SWITCH/DEBUG_SIMPLE。