#NEWLINE# def __init__( self , dsn , instance , database = None , user = 'root' , password = None , deadline_seconds = 60.0 , conv = None , query_deadline_seconds = 86400.0 , retry_interval_seconds = 30.0 ) : #NEWLINE# #INDENT# 'Creates a new SQL Service connection.\n\n    Args:\n      dsn: A string, the SQL Service job path or host:port.\n      instance: A string, the SQL Service instance name, often a username.\n      database: A string, semantics defined by the backend.\n      user: A string, database user name.\n      password: A string, database password.\n      deadline_seconds: A float, request deadline in seconds.\n      conv: A dict, maps types to a conversion function. See converters.py.\n      query_deadline_seconds: A float, query deadline in seconds.\n      retry_interval_seconds: A float, seconds to wait between each retry.\n    Raises:\n      OperationalError: Transport failure.\n      DatabaseError: Error from SQL Service server.\n      TypeError: Invalid value provided for instance.\n    ' #NEWLINE# self . _dsn = dsn #NEWLINE# if ( not instance ) : #NEWLINE# #INDENT# raise TypeError ( ( 'Invalid value for instance (%s)' % instance ) ) #NEWLINE# #UNINDENT# self . _instance = instance #NEWLINE# self . _database = database #NEWLINE# self . _user = user #NEWLINE# self . _password = password #NEWLINE# self . _deadline_seconds = deadline_seconds #NEWLINE# self . _connection_id = None #NEWLINE# self . _idempotent_request_id = 0 #NEWLINE# if ( not conv ) : #NEWLINE# #INDENT# conv = converters . conversions #NEWLINE# #UNINDENT# self . _query_deadline_seconds = query_deadline_seconds #NEWLINE# self . _retry_interval_seconds = retry_interval_seconds #NEWLINE# self . converter = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# self . encoders = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , value ) in conv . items ( ) : #NEWLINE# #INDENT# if isinstance ( key , int ) : #NEWLINE# #INDENT# self . converter [ conv ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . encoders [ key ] = value #NEWLINE# #UNINDENT# #UNINDENT# self . OpenConnection ( )