- changed status to wontfix
add count_matched_rows API for all MySQL dialects
Issue #3173
wontfix
includes:
-
count_matched_rows
flag -
documentation
-
implementation for all dialects, MySQLdb, MySQL-connector, OurSQL, etc.
-
unit tests, at least against
create_connect_args()
basic idea:
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index 012d178..0327043 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -2256,10 +2256,12 @@ class MySQLDialect(default.DefaultDialect):
})
]
- def __init__(self, isolation_level=None, **kwargs):
+ def __init__(
+ self, isolation_level=None, count_matched_rows=True, **kwargs):
kwargs.pop('use_ansiquotes', None) # legacy
default.DefaultDialect.__init__(self, **kwargs)
self.isolation_level = isolation_level
+ self.count_matched_rows = count_matched_rows
def on_connect(self):
if self.isolation_level is not None:
classics-MacBook-Pro-2:sqlalchemy classic$ git diff
diff --git a/lib/sqlalchemy/dialects/mysql/base.py b/lib/sqlalchemy/dialects/mysql/base.py
index 012d178..0327043 100644
--- a/lib/sqlalchemy/dialects/mysql/base.py
+++ b/lib/sqlalchemy/dialects/mysql/base.py
@@ -2256,10 +2256,12 @@ class MySQLDialect(default.DefaultDialect):
})
]
- def __init__(self, isolation_level=None, **kwargs):
+ def __init__(
+ self, isolation_level=None, count_matched_rows=True, **kwargs):
kwargs.pop('use_ansiquotes', None) # legacy
default.DefaultDialect.__init__(self, **kwargs)
self.isolation_level = isolation_level
+ self.count_matched_rows = count_matched_rows
def on_connect(self):
if self.isolation_level is not None:
Comments (1)
-
reporter - Log in to comment
this is not needed. if someone really wants it, we can look at it then.