Added unicode parameter workaround.
This commit is contained in:
parent
e28e7a5592
commit
ad845f5765
1 changed files with 15 additions and 0 deletions
|
@ -91,6 +91,10 @@ class SQLBase7Dialect(DefaultDialect):
|
||||||
|
|
||||||
max_identifier_length = 18
|
max_identifier_length = 18
|
||||||
|
|
||||||
|
# # Hmm, it'd be great if these actually did something...
|
||||||
|
# supports_unicode_statements = False
|
||||||
|
# supports_unicode_binds = False
|
||||||
|
|
||||||
statement_compiler = SQLBase7Compiler
|
statement_compiler = SQLBase7Compiler
|
||||||
|
|
||||||
type_map = {
|
type_map = {
|
||||||
|
@ -160,3 +164,14 @@ class SQLBase7Dialect(DefaultDialect):
|
||||||
|
|
||||||
def get_indexes(self, connection, table_name, schema=None, **kw):
|
def get_indexes(self, connection, table_name, schema=None, **kw):
|
||||||
return []
|
return []
|
||||||
|
|
||||||
|
def do_execute(self, cursor, statement, parameters, context=None):
|
||||||
|
# Since the "supports_unicode_binds" attribute doesn't seem to do
|
||||||
|
# anything, take matters into our own hands here.
|
||||||
|
_parameters = []
|
||||||
|
for parameter in parameters:
|
||||||
|
if isinstance(parameter, basestring) and not isinstance(parameter, str):
|
||||||
|
parameter = str(parameter)
|
||||||
|
_parameters.append(parameter)
|
||||||
|
parameters = tuple(_parameters)
|
||||||
|
cursor.execute(statement, parameters)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue