File tree Expand file tree Collapse file tree 3 files changed +7
-23
lines changed Expand file tree Collapse file tree 3 files changed +7
-23
lines changed Original file line number Diff line number Diff line change 1313
1414import re
1515from sqlalchemy import exc
16- try :
17- from sqlalchemy import processors
18- except ImportError :
19- # Newer versions of sqlalchemy require:
20- from sqlalchemy .engine import processors
16+ from sqlalchemy import processors
2117from sqlalchemy import types
2218from sqlalchemy import util
2319# TODO shouldn't use mysql type
24- try :
25- from sqlalchemy .databases .mysql import MSTinyInteger
26- except ImportError :
27- # Newer versions of sqlalchemy require:
28- from sqlalchemy .dialects .mysql import MSTinyInteger
20+ from sqlalchemy .databases import mysql
2921from sqlalchemy .engine import default
3022from sqlalchemy .sql import compiler
3123from sqlalchemy .sql .compiler import SQLCompiler
@@ -129,7 +121,7 @@ def __init__(self, dialect):
129121
130122_type_map = {
131123 'boolean' : types .Boolean ,
132- 'tinyint' : MSTinyInteger ,
124+ 'tinyint' : mysql . MSTinyInteger ,
133125 'smallint' : types .SmallInteger ,
134126 'int' : types .Integer ,
135127 'bigint' : types .BigInteger ,
Original file line number Diff line number Diff line change 1313from sqlalchemy import types
1414from sqlalchemy import util
1515# TODO shouldn't use mysql type
16- try :
17- from sqlalchemy .databases .mysql import MSTinyInteger
18- except ImportError :
19- # Newer versions of sqlalchemy require:
20- from sqlalchemy .dialects .mysql import MSTinyInteger
16+ from sqlalchemy .databases import mysql
2117from sqlalchemy .engine import default
2218from sqlalchemy .sql import compiler
2319from sqlalchemy .sql .compiler import SQLCompiler
@@ -33,7 +29,7 @@ class PrestoIdentifierPreparer(compiler.IdentifierPreparer):
3329
3430_type_map = {
3531 'boolean' : types .Boolean ,
36- 'tinyint' : MSTinyInteger ,
32+ 'tinyint' : mysql . MSTinyInteger ,
3733 'smallint' : types .SmallInteger ,
3834 'integer' : types .Integer ,
3935 'bigint' : types .BigInteger ,
Original file line number Diff line number Diff line change 1313from sqlalchemy import types
1414from sqlalchemy import util
1515# TODO shouldn't use mysql type
16- try :
17- from sqlalchemy .databases .mysql import MSTinyInteger
18- except ImportError :
19- # Newer versions of sqlalchemy require:
20- from sqlalchemy .dialects .mysql import MSTinyInteger
16+ from sqlalchemy .databases import mysql
2117from sqlalchemy .engine import default
2218from sqlalchemy .sql import compiler
2319from sqlalchemy .sql .compiler import SQLCompiler
@@ -32,7 +28,7 @@ class TrinoIdentifierPreparer(PrestoIdentifierPreparer):
3228
3329_type_map = {
3430 'boolean' : types .Boolean ,
35- 'tinyint' : MSTinyInteger ,
31+ 'tinyint' : mysql . MSTinyInteger ,
3632 'smallint' : types .SmallInteger ,
3733 'integer' : types .Integer ,
3834 'bigint' : types .BigInteger ,
You can’t perform that action at this time.
0 commit comments