Skip to content

Commit 2c0342d

Browse files
committed
Fix reference documentation and miscellaneous issues
This patch fixes the following issues: - Added errors.PoolError in mysqlx namepace - Added "SSLMode" and "Auth" in constants.__all__ - Fixed documentation in result.Row.get_string() - Updated CPYINT revision with BUG#26709067
1 parent 5eda30e commit 2c0342d

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

cpyint

lib/mysqlx/__init__.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@
3535
from .dbdoc import DbDoc
3636
from .errors import (Error, Warning, InterfaceError, DatabaseError,
3737
NotSupportedError, DataError, IntegrityError,
38-
ProgrammingError, OperationalError, InternalError)
38+
ProgrammingError, OperationalError, InternalError,
39+
PoolError)
3940
from .result import (ColumnMetaData, Row, Result, BufferingResult, RowResult,
4041
SqlResult, ColumnType)
4142
from .statement import (Statement, FilterableStatement, SqlStatement,
@@ -278,7 +279,7 @@ def get_session(*args, **kwargs):
278279
# mysqlx.errors
279280
"Error", "Warning", "InterfaceError", "DatabaseError", "NotSupportedError",
280281
"DataError", "IntegrityError", "ProgrammingError", "OperationalError",
281-
"InternalError",
282+
"InternalError", "PoolError",
282283

283284
# mysqlx.result
284285
"ColumnMetaData", "Row", "Result", "BufferingResult", "RowResult",

lib/mysqlx/constants.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# MySQL Connector/Python - MySQL driver written in Python.
2-
# Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
33

44
# MySQL Connector/Python is licensed under the terms of the GPLv2
55
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
@@ -52,4 +52,4 @@ def create_enum(name, fields, values=None):
5252
Auth = create_enum("Auth", ("PLAIN", "EXTERNAL", "MYSQL41"),
5353
("plain", "external", "mysql41"))
5454

55-
__all__ = ["Algorithms", "Securities", "CheckOptions"]
55+
__all__ = ["Algorithms", "Securities", "CheckOptions", "SSLMode", "Auth"]

lib/mysqlx/result.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,10 +605,10 @@ def __getitem__(self, index):
605605
return self._fields[index]
606606

607607
def get_string(self, str_index):
608-
"""Returns the value if the index by string.
608+
"""Returns the value using the column name.
609609
610610
Args:
611-
str_index (str): The string index.
611+
str_index (str): The column name.
612612
"""
613613
int_index = self._resultset.index_of(str_index)
614614
if int_index >= len(self._fields):

0 commit comments

Comments
 (0)