#NEWLINE# def _update_data( self , name , value , timestamp , interval , config , conn ) : #NEWLINE# #INDENT# 'Support function for insert. Should be called within a transaction' #NEWLINE# i_time = config [ 'i_calc' ] . to_bucket ( self ) #NEWLINE# if ( not config [ 'coarse' ] ) : #NEWLINE# #INDENT# r_time = config [ 'r_calc' ] . to_bucket ( timestamp ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# r_time = None #NEWLINE# #UNINDENT# stmt = self . _table . update ( ) . where ( and_ ( ( self . _table . c . name == name ) , ( self . _table . c . interval == interval ) , ( self . _table . c . i_time == i_time ) , ( self . _table . c . r_time == r_time ) , ( self . _table . c . value == value ) ) ) . values ( { #NEWLINE# #INDENT# self . _table . c . count : ( self . _table . c . count + 1 ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# rval = conn . execute ( stmt ) #NEWLINE# return rval . rowcount