grr/server/grr_response_server/databases/mysql_flows.py
def DeleteFlowRequests(self, requests, cursor=None):
    """Deletes a list of flow requests from the database."""
    if not requests:
      return

    conditions = []
    args = []
    for r in requests:
      conditions.append("(client_id=%s AND flow_id=%s AND request_id=%s)")
      args.append(mysql_utils.ClientIDToInt(r.client_id))
      args.append(mysql_utils.FlowIDToInt(r.flow_id))
      args.append(r.request_id)

    req_query = "DELETE FROM flow_requests WHERE " + " OR ".join(conditions)
    res_query = "DELETE FROM flow_responses WHERE " + " OR ".join(conditions)

    cursor.execute(res_query, args)
    cursor.execute(req_query, args)
Deletes a list of flow requests from the database.
Deletes a list of flow requests from the database.
Deletes a list of flow requests from the database .
def DeleteFlowRequests(self, requests, cursor=None):
    if not requests:
      return
    conditions = []
    args = []
    for r in requests:
      conditions.append("(client_id=%s AND flow_id=%s AND request_id=%s)")
      args.append(mysql_utils.ClientIDToInt(r.client_id))
      args.append(mysql_utils.FlowIDToInt(r.flow_id))
      args.append(r.request_id)
    req_query = "DELETE FROM flow_requests WHERE " + " OR ".join(conditions)
    res_query = "DELETE FROM flow_responses WHERE " + " OR ".join(conditions)
    cursor.execute(res_query, args)
    cursor.execute(req_query, args)
def DeleteFlowRequests ( self , requests , cursor = None ) : if not requests : return conditions = [ ] args = [ ] for r in requests : conditions . append ( "(client_id=%s AND flow_id=%s AND request_id=%s)" ) args . append ( mysql_utils . ClientIDToInt ( r . client_id ) ) args . append ( mysql_utils . FlowIDToInt ( r . flow_id ) ) args . append ( r . request_id ) req_query = "DELETE FROM flow_requests WHERE " + " OR " . join ( conditions ) res_query = "DELETE FROM flow_responses WHERE " + " OR " . join ( conditions ) cursor . execute ( res_query , args ) cursor . execute ( req_query , args )
Deletes a list of flow requests from the database.
Deletes a list of flow requests from the database .
"""Deletes a list of flow requests from the database."""
self
requests
cursor