grr/server/grr_response_server/databases/mysql_artifacts.py
def ReadArtifact(self, name, cursor=None):
    """Looks up an artifact with given name from the database."""
    cursor.execute("SELECT definition FROM artifacts WHERE name_hash = %s",
                   [mysql_utils.Hash(name)])

    row = cursor.fetchone()
    if row is None:
      raise db.UnknownArtifactError(name)
    else:
      return _RowToArtifact(row)
Looks up an artifact with given name from the database.
Looks up an artifact with given name from the database.
Looks up an artifact with given name from the database .
def ReadArtifact(self, name, cursor=None):
    cursor.execute("SELECT definition FROM artifacts WHERE name_hash = %s",
                   [mysql_utils.Hash(name)])
    row = cursor.fetchone()
    if row is None:
      raise db.UnknownArtifactError(name)
    else:
      return _RowToArtifact(row)
def ReadArtifact ( self , name , cursor = None ) : cursor . execute ( "SELECT definition FROM artifacts WHERE name_hash = %s" , [ mysql_utils . Hash ( name ) ] ) row = cursor . fetchone ( ) if row is None : raise db . UnknownArtifactError ( name ) else : return _RowToArtifact ( row )
Looks up an artifact with given name from the database.
Looks up an artifact with given name from the database .
"""Looks up an artifact with given name from the database."""
self
name
cursor