mirror of
https://github.com/valitydev/redash.git
synced 2024-11-07 09:28:51 +00:00
Change: don't annotate MSSQL queries.
(I got tired of chasing weird unicode issues)
This commit is contained in:
parent
ad5e4f46d6
commit
4462afc670
@ -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:
|
||||||
|
Loading…
Reference in New Issue
Block a user