grr/server/grr_response_server/databases/mysql_flows.py
def UpdateFlows(self,
                  client_id_flow_id_pairs,
                  pending_termination=db.Database.unchanged,
                  cursor=None):
    """Updates flow objects in the database."""

    if pending_termination == db.Database.unchanged:
      return

    serialized_termination = pending_termination.SerializeToString()
    query = "UPDATE flows SET pending_termination=%s WHERE "
    args = [serialized_termination]
    for index, (client_id, flow_id) in enumerate(client_id_flow_id_pairs):
      query += ("" if index == 0 else " OR ") + " client_id=%s AND flow_id=%s"
      args.extend([
          mysql_utils.ClientIDToInt(client_id),
          mysql_utils.FlowIDToInt(flow_id)
      ])
    cursor.execute(query, args)
Updates flow objects in the database.
Updates flow objects in the database.
Updates flow objects in the database .
def UpdateFlows(self,
                  client_id_flow_id_pairs,
                  pending_termination=db.Database.unchanged,
                  cursor=None):
    if pending_termination == db.Database.unchanged:
      return
    serialized_termination = pending_termination.SerializeToString()
    query = "UPDATE flows SET pending_termination=%s WHERE "
    args = [serialized_termination]
    for index, (client_id, flow_id) in enumerate(client_id_flow_id_pairs):
      query += ("" if index == 0 else " OR ") + " client_id=%s AND flow_id=%s"
      args.extend([
          mysql_utils.ClientIDToInt(client_id),
          mysql_utils.FlowIDToInt(flow_id)
      ])
    cursor.execute(query, args)
def UpdateFlows ( self , client_id_flow_id_pairs , pending_termination = db . Database . unchanged , cursor = None ) : if pending_termination == db . Database . unchanged : return serialized_termination = pending_termination . SerializeToString ( ) query = "UPDATE flows SET pending_termination=%s WHERE " args = [ serialized_termination ] for index , ( client_id , flow_id ) in enumerate ( client_id_flow_id_pairs ) : query += ( "" if index == 0 else " OR " ) + " client_id=%s AND flow_id=%s" args . extend ( [ mysql_utils . ClientIDToInt ( client_id ) , mysql_utils . FlowIDToInt ( flow_id ) ] ) cursor . execute ( query , args )
Updates flow objects in the database.
Updates flow objects in the database .
"""Updates flow objects in the database."""
self
client_id_flow_id_pairs
pending_termination
cursor