33from databricks .sql .exc import *
44
55# PEP 249 module globals
6- apilevel = ' 2.0'
6+ apilevel = " 2.0"
77threadsafety = 1 # Threads may share the module, but not connections.
8- paramstyle = ' pyformat' # Python extended format codes, e.g. ...WHERE name=%(name)s
8+ paramstyle = " pyformat" # Python extended format codes, e.g. ...WHERE name=%(name)s
99
1010
1111class DBAPITypeObject (object ):
@@ -19,12 +19,13 @@ def __repr__(self):
1919 return "DBAPITypeObject({})" .format (self .values )
2020
2121
22- STRING = DBAPITypeObject ('string' )
23- BINARY = DBAPITypeObject ('binary' )
24- NUMBER = DBAPITypeObject ('boolean' , 'tinyint' , 'smallint' , 'int' , 'bigint' , 'float' , 'double' ,
25- 'decimal' )
26- DATETIME = DBAPITypeObject ('timestamp' )
27- DATE = DBAPITypeObject ('date' )
22+ STRING = DBAPITypeObject ("string" )
23+ BINARY = DBAPITypeObject ("binary" )
24+ NUMBER = DBAPITypeObject (
25+ "boolean" , "tinyint" , "smallint" , "int" , "bigint" , "float" , "double" , "decimal"
26+ )
27+ DATETIME = DBAPITypeObject ("timestamp" )
28+ DATE = DBAPITypeObject ("date" )
2829ROWID = DBAPITypeObject ()
2930
3031__version__ = "2.0.2"
@@ -45,4 +46,5 @@ def TimestampFromTicks(ticks):
4546
4647def connect (server_hostname , http_path , access_token , ** kwargs ):
4748 from .client import Connection
49+
4850 return Connection (server_hostname , http_path , access_token , ** kwargs )
0 commit comments