Change: don't annotate MSSQL queries.

(I got tired of chasing weird unicode issues)
This commit is contained in:
Arik Fraimovich 2016-10-05 16:29:40 +03:00
parent ad5e4f46d6
commit 4462afc670

View File

@ -23,12 +23,14 @@ types_map = {
5: TYPE_FLOAT, 5: TYPE_FLOAT,
} }
class MSSQLJSONEncoder(JSONEncoder): class MSSQLJSONEncoder(JSONEncoder):
def default(self, o): def default(self, o):
if isinstance(o, uuid.UUID): if isinstance(o, uuid.UUID):
return str(o) return str(o)
return super(MSSQLJSONEncoder, self).default(o) return super(MSSQLJSONEncoder, self).default(o)
class SqlServer(BaseSQLQueryRunner): class SqlServer(BaseSQLQueryRunner):
@classmethod @classmethod
def configuration_schema(cls): def configuration_schema(cls):
@ -80,6 +82,10 @@ class SqlServer(BaseSQLQueryRunner):
def type(cls): def type(cls):
return "mssql" return "mssql"
@classmethod
def annotate_query(cls):
return True
def __init__(self, configuration): def __init__(self, configuration):
super(SqlServer, self).__init__(configuration) super(SqlServer, self).__init__(configuration)
@ -113,9 +119,7 @@ class SqlServer(BaseSQLQueryRunner):
return schema.values() return schema.values()
def run_query(self, query): def run_query(self, query):
connection = None connection = None
try: try: