From 3e2c672724f1c061d8b5469e43835a71f544ec2e Mon Sep 17 00:00:00 2001 From: adustman Date: Sat, 28 Apr 2001 03:27:58 +0000 Subject: [PATCH] Documentation updates. --- mysql/_mysql_const/CLIENT.py | 11 ++++++++++- mysql/_mysql_const/CR.py | 7 +++++++ mysql/_mysql_const/ER.py | 7 +++++++ mysql/_mysql_const/FIELD_TYPE.py | 7 +++++++ mysql/_mysql_const/FLAG.py | 7 +++++++ mysql/_mysql_const/REFRESH.py | 7 +++++++ 6 files changed, 45 insertions(+), 1 deletion(-) diff --git a/mysql/_mysql_const/CLIENT.py b/mysql/_mysql_const/CLIENT.py index a29c038..d9e0b56 100644 --- a/mysql/_mysql_const/CLIENT.py +++ b/mysql/_mysql_const/CLIENT.py @@ -1,3 +1,12 @@ +"""MySQL CLIENT constants + +These constants are used when creating the connection. Use bitwise-OR +(|) to combine options together, and pass them as the client_flags +parameter to MySQLdb.Connection. For more information on these flags, +see the MySQL C API documentation for mysql_real_connect(). + +""" + LONG_PASSWORD = 1 FOUND_ROWS = 2 LONG_FLAG = 4 @@ -11,4 +20,4 @@ CHANGE_USER = 512 INTERACTIVE = 1024 SSL = 2048 IGNORE_SIGPIPE = 4096 -TRANSACTIONS = 8192 # mysql_com.h is WRONG +TRANSACTIONS = 8192 # mysql_com.h was WRONG prior to 3.23.35 diff --git a/mysql/_mysql_const/CR.py b/mysql/_mysql_const/CR.py index b22b8d3..249dfec 100644 --- a/mysql/_mysql_const/CR.py +++ b/mysql/_mysql_const/CR.py @@ -1,3 +1,10 @@ +"""MySQL Connection Errors + +Nearly all of these raise OperationalError. COMMANDS_OUT_OF_SYNC +raises ProgrammingError. + +""" + MIN_ERROR = 2000 MAX_ERROR = 2999 UNKNOWN_ERROR = 2000 diff --git a/mysql/_mysql_const/ER.py b/mysql/_mysql_const/ER.py index ea1d755..262bfce 100644 --- a/mysql/_mysql_const/ER.py +++ b/mysql/_mysql_const/ER.py @@ -1,3 +1,10 @@ +"""MySQL ER Constants + +These constants are error codes for the bulk of the error conditions +that may occur. + +""" + HASHCHK = 1000 NISAMCHK = 1001 NO = 1002 diff --git a/mysql/_mysql_const/FIELD_TYPE.py b/mysql/_mysql_const/FIELD_TYPE.py index 1222dcf..c010bae 100644 --- a/mysql/_mysql_const/FIELD_TYPE.py +++ b/mysql/_mysql_const/FIELD_TYPE.py @@ -1,3 +1,10 @@ +"""MySQL FIELD_TYPE Constants + +These constants represent the various column (field) types that are +supported by MySQL. + +""" + DECIMAL = 0 TINY = 1 SHORT = 2 diff --git a/mysql/_mysql_const/FLAG.py b/mysql/_mysql_const/FLAG.py index a35a143..00e6c7c 100644 --- a/mysql/_mysql_const/FLAG.py +++ b/mysql/_mysql_const/FLAG.py @@ -1,3 +1,10 @@ +"""MySQL FLAG Constants + +These flags are used along with the FIELD_TYPE to indicate various +properties of columns in a result set. + +""" + NOT_NULL = 1 PRI_KEY = 2 UNIQUE_KEY = 4 diff --git a/mysql/_mysql_const/REFRESH.py b/mysql/_mysql_const/REFRESH.py index f229df7..4a08b94 100644 --- a/mysql/_mysql_const/REFRESH.py +++ b/mysql/_mysql_const/REFRESH.py @@ -1,3 +1,10 @@ +"""MySQL REFRESH Constants + +These constants seem to mostly deal with things internal to the +MySQL server. Forget you saw this. + +""" + GRANT = 1 LOG = 2 TABLES = 4