grr/server/grr_response_server/databases/mysql_flows.py
def _DeleteClientMessages(self, to_delete, cursor):
    """Builds deletes for client messages."""
    query = "DELETE FROM client_messages WHERE "
    conditions = []
    args = []

    for client_id, task_id in to_delete:
      conditions.append("(client_id=%s AND message_id=%s)")
      args.append(mysql_utils.ClientIDToInt(client_id))
      args.append(task_id)

    query += " OR ".join(conditions)
    cursor.execute(query, args)
Builds deletes for client messages.
Builds deletes for client messages.
Builds deletes for client messages .
def _DeleteClientMessages(self, to_delete, cursor):
    query = "DELETE FROM client_messages WHERE "
    conditions = []
    args = []
    for client_id, task_id in to_delete:
      conditions.append("(client_id=%s AND message_id=%s)")
      args.append(mysql_utils.ClientIDToInt(client_id))
      args.append(task_id)
    query += " OR ".join(conditions)
    cursor.execute(query, args)
def _DeleteClientMessages ( self , to_delete , cursor ) : query = "DELETE FROM client_messages WHERE " conditions = [ ] args = [ ] for client_id , task_id in to_delete : conditions . append ( "(client_id=%s AND message_id=%s)" ) args . append ( mysql_utils . ClientIDToInt ( client_id ) ) args . append ( task_id ) query += " OR " . join ( conditions ) cursor . execute ( query , args )
Builds deletes for client messages.
Builds deletes for client messages .
"""Builds deletes for client messages."""
self
to_delete
cursor