grr/server/grr_response_server/databases/mysql_clients.py
def ReadClientCrashInfo(self, client_id, cursor=None):
    """Reads the latest client crash record for a single client."""
    cursor.execute(
        "SELECT timestamp, crash_info FROM clients, client_crash_history WHERE "
        "clients.client_id = client_crash_history.client_id AND "
        "clients.last_crash_timestamp = client_crash_history.timestamp AND "
        "clients.client_id = %s", [mysql_utils.ClientIDToInt(client_id)])
    row = cursor.fetchone()
    if not row:
      return None

    timestamp, crash_info = row
    res = rdf_client.ClientCrash.FromSerializedString(crash_info)
    res.timestamp = mysql_utils.MysqlToRDFDatetime(timestamp)
    return res
Reads the latest client crash record for a single client.
Reads the latest client crash record for a single client.
Reads the latest client crash record for a single client .
def ReadClientCrashInfo(self, client_id, cursor=None):
    cursor.execute(
        "SELECT timestamp, crash_info FROM clients, client_crash_history WHERE "
        "clients.client_id = client_crash_history.client_id AND "
        "clients.last_crash_timestamp = client_crash_history.timestamp AND "
        "clients.client_id = %s", [mysql_utils.ClientIDToInt(client_id)])
    row = cursor.fetchone()
    if not row:
      return None
    timestamp, crash_info = row
    res = rdf_client.ClientCrash.FromSerializedString(crash_info)
    res.timestamp = mysql_utils.MysqlToRDFDatetime(timestamp)
    return res
def ReadClientCrashInfo ( self , client_id , cursor = None ) : cursor . execute ( "SELECT timestamp, crash_info FROM clients, client_crash_history WHERE " "clients.client_id = client_crash_history.client_id AND " "clients.last_crash_timestamp = client_crash_history.timestamp AND " "clients.client_id = %s" , [ mysql_utils . ClientIDToInt ( client_id ) ] ) row = cursor . fetchone ( ) if not row : return None timestamp , crash_info = row res = rdf_client . ClientCrash . FromSerializedString ( crash_info ) res . timestamp = mysql_utils . MysqlToRDFDatetime ( timestamp ) return res
Reads the latest client crash record for a single client.
Reads the latest client crash record for a single client .
"""Reads the latest client crash record for a single client."""
self
client_id
cursor