MySQL Connector/Python 發行說明
目錄
- 10.1 mysql.connector 模組
- 10.2 connection.MySQLConnection 類別
- 10.2.1 connection.MySQLConnection() 建構子
- 10.2.2 MySQLConnection.close() 方法
- 10.2.3 MySQLConnection.commit() 方法
- 10.2.4 MySQLConnection.config() 方法
- 10.2.5 MySQLConnection.connect() 方法
- 10.2.6 MySQLConnection.cursor() 方法
- 10.2.7 MySQLConnection.cmd_change_user() 方法
- 10.2.8 MySQLConnection.cmd_debug() 方法
- 10.2.9 MySQLConnection.cmd_init_db() 方法
- 10.2.10 MySQLConnection.cmd_ping() 方法
- 10.2.11 MySQLConnection.cmd_process_info() 方法
- 10.2.12 MySQLConnection.cmd_process_kill() 方法
- 10.2.13 MySQLConnection.cmd_query() 方法
- 10.2.14 MySQLConnection.cmd_query_iter() 方法
- 10.2.15 MySQLConnection.cmd_quit() 方法
- 10.2.16 MySQLConnection.cmd_refresh() 方法
- 10.2.17 MySQLConnection.cmd_reset_connection() 方法
- 10.2.18 MySQLConnection.cmd_shutdown() 方法
- 10.2.19 MySQLConnection.cmd_statistics() 方法
- 10.2.20 MySQLConnection.disconnect() 方法
- 10.2.21 MySQLConnection.get_row() 方法
- 10.2.22 MySQLConnection.get_rows() 方法
- 10.2.23 MySQLConnection.get_server_info() 方法
- 10.2.24 MySQLConnection.get_server_version() 方法
- 10.2.25 MySQLConnection.is_connected() 方法
- 10.2.26 MySQLConnection.isset_client_flag() 方法
- 10.2.27 MySQLConnection.ping() 方法
- 10.2.28 MySQLConnection.reconnect() 方法
- 10.2.29 MySQLConnection.reset_session() 方法
- 10.2.30 MySQLConnection.rollback() 方法
- 10.2.31 MySQLConnection.set_charset_collation() 方法
- 10.2.32 MySQLConnection.set_client_flags() 方法
- 10.2.33 MySQLConnection.shutdown() 方法
- 10.2.34 MySQLConnection.start_transaction() 方法
- 10.2.35 MySQLConnection.autocommit 屬性
- 10.2.36 MySQLConnection.unread_results 屬性
- 10.2.37 MySQLConnection.can_consume_results 屬性
- 10.2.38 MySQLConnection.charset 屬性
- 10.2.39 MySQLConnection.collation 屬性
- 10.2.40 MySQLConnection.connection_id 屬性
- 10.2.41 MySQLConnection.database 屬性
- 10.2.42 MySQLConnection.get_warnings 屬性
- 10.2.43 MySQLConnection.in_transaction 屬性
- 10.2.44 MySQLConnection.raise_on_warnings 屬性
- 10.2.45 MySQLConnection.server_host 屬性
- 10.2.46 MySQLConnection.server_port 屬性
- 10.2.47 MySQLConnection.sql_mode 屬性
- 10.2.48 MySQLConnection.time_zone 屬性
- 10.2.49 MySQLConnection.unix_socket 屬性
- 10.2.50 MySQLConnection.user 屬性
- 10.3 pooling.MySQLConnectionPool 類別
- 10.4 pooling.PooledMySQLConnection 類別
- 10.5 cursor.MySQLCursor 類別
- 10.5.1 cursor.MySQLCursor 建構子
- 10.5.2 MySQLCursor.add_attribute() 方法
- 10.5.3 MySQLCursor.clear_attributes() 方法
- 10.5.4 MySQLCursor.get_attributes() 方法
- 10.5.5 MySQLCursor.callproc() 方法
- 10.5.6 MySQLCursor.close() 方法
- 10.5.7 MySQLCursor.execute() 方法
- 10.5.8 MySQLCursor.executemany() 方法
- 10.5.9 MySQLCursor.fetchall() 方法
- 10.5.10 MySQLCursor.fetchmany() 方法
- 10.5.11 MySQLCursor.fetchone() 方法
- 10.5.12 MySQLCursor.fetchwarnings() 方法
- 10.5.13 MySQLCursor.stored_results() 方法
- 10.5.14 MySQLCursor.column_names 屬性
- 10.5.15 MySQLCursor.description 屬性
- 10.5.16 MySQLCursor.lastrowid 屬性
- 10.5.17 MySQLCursor.rowcount 屬性
- 10.5.18 MySQLCursor.statement 屬性
- 10.5.19 MySQLCursor.with_rows 屬性
- 10.6 cursor.MySQLCursor 的子類別
- 10.6.1 cursor.MySQLCursorBuffered 類別
- 10.6.2 cursor.MySQLCursorRaw 類別
- 10.6.3 cursor.MySQLCursorBufferedRaw 類別
- 10.6.4 cursor.MySQLCursorDict 類別
- 10.6.5 cursor.MySQLCursorBufferedDict 類別
- 10.6.6 cursor.MySQLCursorNamedTuple 類別
- 10.6.7 cursor.MySQLCursorBufferedNamedTuple 類別
- 10.6.8 cursor.MySQLCursorPrepared 類別
- 10.7 constants.ClientFlag 類別
- 10.8 constants.FieldType 類別
- 10.9 constants.SQLMode 類別
- 10.10 constants.CharacterSet 類別
- 10.11 constants.RefreshOption 類別
- 10.12 錯誤與例外
- 10.12.1 errorcode 模組
- 10.12.2 errors.Error 例外
- 10.12.3 errors.DataError 例外
- 10.12.4 errors.DatabaseError 例外
- 10.12.5 errors.IntegrityError 例外
- 10.12.6 errors.InterfaceError 例外
- 10.12.7 errors.InternalError 例外
- 10.12.8 errors.NotSupportedError 例外
- 10.12.9 errors.OperationalError 例外
- 10.12.10 errors.PoolError 例外
- 10.12.11 errors.ProgrammingError 例外
- 10.12.12 errors.Warning 例外
- 10.12.13 errors.custom_error_exception() 函數
本章包含 Connector/Python 的公開 API 參考。範例應視為適用於 Python 2.7 以及 Python 3.1 和更新版本。它們也可能適用於較舊的版本(例如 Python 2.4),除非它們使用較新 Python 版本中引入的功能。例如,使用 as
關鍵字的例外處理是在 Python 2.6 中引入的,在 Python 2.4 中將無法運作。
注意
Connector/Python 8.0.24 已移除 Python 2.7 的支援。
以下概述顯示 mysql.connector
套件及其模組。目前,僅記錄了對終端使用者最有用的模組、類別和方法。
mysql.connector
errorcode
errors
connection
constants
conversion
cursor
dbapi
locales
eng
client_error
protocol
utils