#NEWLINE# def __init__( self , client , **kwargs ) : #NEWLINE# #INDENT# '\n    Initialize the sql backend after timeseries has processed the configuration.\n    ' #NEWLINE# self . _metadata = MetaData ( ) #NEWLINE# self . _str_length = kwargs . get ( 'string_length' , 255 ) #NEWLINE# self . _txt_length = kwargs . get ( 'text_length' , ( 32 * 1024 ) ) #NEWLINE# vtype = kwargs . get ( 'value_type' , float ) #NEWLINE# if ( vtype in TYPE_MAP ) : #NEWLINE# #INDENT# self . _value_type = TYPE_MAP [ vtype ] #NEWLINE# if ( self . _value_type == String ) : #NEWLINE# #INDENT# self . _value_type = String ( self . _str_length ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . _value_type == Text ) : #NEWLINE# #INDENT# self . _value_type = Text ( self . _txt_length ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . _value_type == LargeBinary ) : #NEWLINE# #INDENT# self . _value_type = LargeBinary ( self . _txt_length ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if issubclass ( vtype , TypeEngine ) : #NEWLINE# #INDENT# if ( vtype == String ) : #NEWLINE# #INDENT# self . _value_type = String ( self . _str_length ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( vtype == Text ) : #NEWLINE# #INDENT# self . _value_type = Text ( self . _txt_length ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( vtype == LargeBinary ) : #NEWLINE# #INDENT# self . _value_type = LargeBinary ( self . _txt_length ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if isinstance ( vtype , TypeEngine ) : #NEWLINE# #INDENT# self . _value_type = vtype #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( ( "Unsupported type '%s'" % vtype ) ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# self . _table_name = kwargs . get ( 'table_name' , self . _table_name ) #NEWLINE# super ( SqlBackend , self ) . __init__ ( client , ** kwargs )