#NEWLINE# def _type_get( self , name , interval , i_bucket , i_end = None ) : #NEWLINE# #INDENT# connection = self . _client . connect ( ) #NEWLINE# rval = OrderedDict ( ) #NEWLINE# stmt = self . _table . select ( ) #NEWLINE# if i_end : #NEWLINE# #INDENT# stmt = stmt . where ( and_ ( ( self . _table . c . name == name ) , ( self . _table . c . interval == interval ) , ( self . _table . c . i_time >= i_bucket ) , ( self . _table . c . i_time <= i_end ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# stmt = stmt . where ( and_ ( ( self . _table . c . name == name ) , ( i_bucket . _table . c . interval == interval ) , ( self . _table . c . i_time == i_bucket ) ) ) #NEWLINE# #UNINDENT# stmt = stmt . order_by ( self . _table . c . r_time ) #NEWLINE# for row in connection . execute ( stmt ) : #NEWLINE# #INDENT# rval . setdefault ( row [ 'i_time' ] , OrderedDict ( ) ) [ row [ 'r_time' ] ] = row [ 'count' ] #NEWLINE# #UNINDENT# return rval