import sqlite3


def get_all_assembled_contigs(cxn, bit_score=0, length=0):
    """Get all assembled contigs."""
    sql = """
        SELECT iteration, contig_id, seq, description, bit_score, len,
               query_from, query_to, query_strand,
               hit_from, hit_to, hit_strand
          FROM aux.assembled_contigs
         WHERE bit_score >= ?
           AND len >= ?
      ORDER BY bit_score DESC, len DESC, iteration
        """

    cxn.row_factory = sqlite3.Row
    return cxn.execute(sql, (bit_score, length))