![]() Processed data like division by zero, numeric value out of range,Įtc. Is an earlier version, an empty sequence is returned.ĭataError = Exception raised for errors that are due to problems with the Is only supported in MySQL-4.1 and up. If your server Sequence of tuples of (Level, Code, Message). This show_warnings(self) Return detailed information about warnings as a set_sql_mode(self, sql_mode) Set the connection sql_mode. See MySQL documentation for Older version, NotSupportedError will be raised. To change the character set from the current value in an Set can only be changed in MySQL-4.1 and newer. If you try set_character_set(self, charset) Set the connection character set to charset. The character Non-standard. For internal use do not use this in yourĪpplications. If o is a non-string sequence, the items of the sequence are literal(self, o) If o is a single object, returns an SQL literal as a string. ![]() You can override this with your own error handler by assigning it errorhandler = defaulterrorhandler(connection, cursor, errorclass, errorvalue) If cursor is not None, (errorclass, errorvalue) is appended toĬssages otherwise it is appended toĬssages. Then errorclass is raised with errorvalue as Optional cursorclass parameter is used to create theĬursor. By default, self. cursor(self, cursorclass =None) Create a cursor on which queries may be performed. The begin(self) Explicitly begin a connection. Non-standard. There are a number of undocumented, non-standard methods. See theĭocumentation for the MySQL C API for some hints on what they do. Integer, non-zero enables LOAD LOCAL INFILE zero disables Support SSL, NotSupportedError will be raised. See the MySQL documentation for more details Setting (MySQL-4.1 and newer). For more details and legalĭictionary or mapping, contains SSL connection parameters If supplied, the session SQL mode will be changed to this To this character set (MySQL-4.1 and newer). This implies If supplied, the connection character set will be changed The connection's character set regardless of this setting. Normal strings. Unicode objects will always be encoded to Otherwise, text-likeĬolumns are returned as strings. If True, text-like columns are returned as unicode objects If set, a named pipe is used to connect (Windows only)Ĭommand which is run once the connection is createdįile from which default client values are readĬonfiguration group to use from the default fileĬlass object, used to create cursors (keyword only) Number of seconds to wait before the connection attempt That you only use keyword parameters. Consult the MySQL C APIĬonversion dictionary, see nverters _init_(self, *args, **kwargs) Create a connection to the database. It is strongly recommended Method resolution order: Connection _nnection _builtin_.object Override fault_cursor with a non-standard Cursor class. Want to make your own subclasses. In most cases, you will probably Only one class: Connection. Others are unlikely. However, you might This module implements connections for MySQLdb. Presently there is
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |