def import_sqlite(db_file, older_than=None, **kwargs):
    """Reads the content of the database file and returns imported data."""
    conn = _open_sqlite(db_file)
    cur = conn.cursor()
    # get rows that were not exported yet
    select = "SELECT * FROM testcases WHERE exported != 'yes'"
    if older_than:
        cur.execute(" ".join((select, "AND sqltime < ?")), (older_than,))
    else:
        cur.execute(select)
    columns = [description[0] for description in cur.description]
    rows = cur.fetchall()

    # map data to columns
    results = []
    for row in rows:
        record = OrderedDict(list(zip(columns, row)))
        results.append(record)

    testrun = _get_testrun_from_sqlite(conn)

    conn.close()

    return xunit_exporter.ImportedData(results=results, testrun=testrun)
Reads the content of the database file and returns imported data.