mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2025-08-16 12:27:03 +08:00
Spelling fixes (#112)
This commit is contained in:

committed by
INADA Naoki

parent
2617620e27
commit
db1bb2ccb1
@ -23,7 +23,7 @@ else:
|
|||||||
|
|
||||||
|
|
||||||
#: Regular expression for :meth:`Cursor.executemany`.
|
#: Regular expression for :meth:`Cursor.executemany`.
|
||||||
#: executemany only suports simple bulk insert.
|
#: executemany only supports simple bulk insert.
|
||||||
#: You can use it to load large dataset.
|
#: You can use it to load large dataset.
|
||||||
RE_INSERT_VALUES = re.compile(
|
RE_INSERT_VALUES = re.compile(
|
||||||
r"\s*((?:INSERT|REPLACE)\s.+\sVALUES?\s+)" +
|
r"\s*((?:INSERT|REPLACE)\s.+\sVALUES?\s+)" +
|
||||||
@ -475,7 +475,7 @@ class CursorUseResultMixIn(object):
|
|||||||
"""This is a MixIn class which causes the result set to be stored
|
"""This is a MixIn class which causes the result set to be stored
|
||||||
in the server and sent row-by-row to client side, i.e. it uses
|
in the server and sent row-by-row to client side, i.e. it uses
|
||||||
mysql_use_result(). You MUST retrieve the entire result set and
|
mysql_use_result(). You MUST retrieve the entire result set and
|
||||||
close() the cursor before additional queries can be peformed on
|
close() the cursor before additional queries can be performed on
|
||||||
the connection."""
|
the connection."""
|
||||||
|
|
||||||
_defer_warnings = True
|
_defer_warnings = True
|
||||||
|
2
_mysql.c
2
_mysql.c
@ -2508,7 +2508,7 @@ static struct PyMemberDef _mysql_ConnectionObject_memberlist[] = {
|
|||||||
T_UINT,
|
T_UINT,
|
||||||
offsetof(_mysql_ConnectionObject,connection.server_capabilities),
|
offsetof(_mysql_ConnectionObject,connection.server_capabilities),
|
||||||
READONLY,
|
READONLY,
|
||||||
"Capabilites of server; consult MySQLdb.constants.CLIENT"
|
"Capabilities of server; consult MySQLdb.constants.CLIENT"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"port",
|
"port",
|
||||||
|
@ -20,7 +20,7 @@ threadsafe = False.
|
|||||||
|
|
||||||
This almost always mean you don't have development packages
|
This almost always mean you don't have development packages
|
||||||
installed. On some systems, C headers for various things (like MySQL)
|
installed. On some systems, C headers for various things (like MySQL)
|
||||||
are distributed as a seperate package. You'll need to figure out
|
are distributed as a separate package. You'll need to figure out
|
||||||
what that is and install it, but often the name ends with -devel.
|
what that is and install it, but often the name ends with -devel.
|
||||||
|
|
||||||
Another possibility: Some older versions of mysql_config behave oddly
|
Another possibility: Some older versions of mysql_config behave oddly
|
||||||
|
@ -441,7 +441,7 @@ conv
|
|||||||
is a function as above. The sequence is tested until the flags
|
is a function as above. The sequence is tested until the flags
|
||||||
on the field match those of the first value. If both values
|
on the field match those of the first value. If both values
|
||||||
are None, then the default conversion is done. Presently this
|
are None, then the default conversion is done. Presently this
|
||||||
is only used to distinquish TEXT and BLOB columns.
|
is only used to distinguish TEXT and BLOB columns.
|
||||||
|
|
||||||
If the key is a Python type or class, then the value is a
|
If the key is a Python type or class, then the value is a
|
||||||
callable Python object (usually a function) taking two arguments
|
callable Python object (usually a function) taking two arguments
|
||||||
@ -615,7 +615,7 @@ Using and extending
|
|||||||
-------------------
|
-------------------
|
||||||
|
|
||||||
In general, it is probably wise to not directly interact with the DB
|
In general, it is probably wise to not directly interact with the DB
|
||||||
API except for small applicatons. Databases, even SQL databases, vary
|
API except for small applications. Databases, even SQL databases, vary
|
||||||
widely in capabilities and may have non-standard features. The DB API
|
widely in capabilities and may have non-standard features. The DB API
|
||||||
does a good job of providing a reasonably portable interface but some
|
does a good job of providing a reasonably portable interface but some
|
||||||
methods are non-portable. Specifically, the parameters accepted by
|
methods are non-portable. Specifically, the parameters accepted by
|
||||||
|
@ -52,9 +52,9 @@ import time
|
|||||||
# - Now a subclass of TestCase, to avoid requiring the driver stub
|
# - Now a subclass of TestCase, to avoid requiring the driver stub
|
||||||
# to use multiple inheritance
|
# to use multiple inheritance
|
||||||
# - Reversed the polarity of buggy test in test_description
|
# - Reversed the polarity of buggy test in test_description
|
||||||
# - Test exception heirarchy correctly
|
# - Test exception hierarchy correctly
|
||||||
# - self.populate is now self._populate(), so if a driver stub
|
# - self.populate is now self._populate(), so if a driver stub
|
||||||
# overrides self.ddl1 this change propogates
|
# overrides self.ddl1 this change propagates
|
||||||
# - VARCHAR columns now have a width, which will hopefully make the
|
# - VARCHAR columns now have a width, which will hopefully make the
|
||||||
# DDL even more portible (this will be reversed if it causes more problems)
|
# DDL even more portible (this will be reversed if it causes more problems)
|
||||||
# - cursor.rowcount being checked after various execute and fetchXXX methods
|
# - cursor.rowcount being checked after various execute and fetchXXX methods
|
||||||
@ -176,7 +176,7 @@ class DatabaseAPI20Test(unittest.TestCase):
|
|||||||
|
|
||||||
def test_Exceptions(self):
|
def test_Exceptions(self):
|
||||||
# Make sure required exceptions exist, and are in the
|
# Make sure required exceptions exist, and are in the
|
||||||
# defined heirarchy.
|
# defined hierarchy.
|
||||||
self.assertTrue(issubclass(self.driver.Warning,Exception))
|
self.assertTrue(issubclass(self.driver.Warning,Exception))
|
||||||
self.assertTrue(issubclass(self.driver.Error,Exception))
|
self.assertTrue(issubclass(self.driver.Error,Exception))
|
||||||
self.assertTrue(
|
self.assertTrue(
|
||||||
@ -485,7 +485,7 @@ class DatabaseAPI20Test(unittest.TestCase):
|
|||||||
self.assertRaises(self.driver.Error,cur.fetchone)
|
self.assertRaises(self.driver.Error,cur.fetchone)
|
||||||
|
|
||||||
# cursor.fetchone should raise an Error if called after
|
# cursor.fetchone should raise an Error if called after
|
||||||
# executing a query that cannnot return rows
|
# executing a query that cannot return rows
|
||||||
self.executeDDL1(cur)
|
self.executeDDL1(cur)
|
||||||
self.assertRaises(self.driver.Error,cur.fetchone)
|
self.assertRaises(self.driver.Error,cur.fetchone)
|
||||||
|
|
||||||
@ -497,7 +497,7 @@ class DatabaseAPI20Test(unittest.TestCase):
|
|||||||
self.assertTrue(cur.rowcount in (-1,0))
|
self.assertTrue(cur.rowcount in (-1,0))
|
||||||
|
|
||||||
# cursor.fetchone should raise an Error if called after
|
# cursor.fetchone should raise an Error if called after
|
||||||
# executing a query that cannnot return rows
|
# executing a query that cannot return rows
|
||||||
cur.execute("insert into %sbooze values ('Victoria Bitter')" % (
|
cur.execute("insert into %sbooze values ('Victoria Bitter')" % (
|
||||||
self.table_prefix
|
self.table_prefix
|
||||||
))
|
))
|
||||||
|
@ -80,7 +80,7 @@ class test_MySQLdb(dbapi20.DatabaseAPI20Test):
|
|||||||
self.assertRaises(self.driver.Error,cur.fetchone)
|
self.assertRaises(self.driver.Error,cur.fetchone)
|
||||||
|
|
||||||
# cursor.fetchone should raise an Error if called after
|
# cursor.fetchone should raise an Error if called after
|
||||||
# executing a query that cannnot return rows
|
# executing a query that cannot return rows
|
||||||
self.executeDDL1(cur)
|
self.executeDDL1(cur)
|
||||||
## self.assertRaises(self.driver.Error,cur.fetchone)
|
## self.assertRaises(self.driver.Error,cur.fetchone)
|
||||||
|
|
||||||
@ -92,7 +92,7 @@ class test_MySQLdb(dbapi20.DatabaseAPI20Test):
|
|||||||
self.assertTrue(cur.rowcount in (-1,0))
|
self.assertTrue(cur.rowcount in (-1,0))
|
||||||
|
|
||||||
# cursor.fetchone should raise an Error if called after
|
# cursor.fetchone should raise an Error if called after
|
||||||
# executing a query that cannnot return rows
|
# executing a query that cannot return rows
|
||||||
cur.execute("insert into %sbooze values ('Victoria Bitter')" % (
|
cur.execute("insert into %sbooze values ('Victoria Bitter')" % (
|
||||||
self.table_prefix
|
self.table_prefix
|
||||||
))
|
))
|
||||||
|
Reference in New Issue
Block a user