def __length_hint__(self):
        """Return the approximate table size based on internal database
        statistics if present, otherwise, find the actual length
        """
        # Assuming the database has been analyzed before, the stat1 table
        # should contain the total row count for the table as the first number
        # in the stat coloumn from when it was last analyzed. Very fast but may
        # not be up to date
        try:
            return int(self._connection.execute(
                "SELECT stat FROM sqlite_stat1 WHERE tbl=?;",
                (self.table,)
                ).fetchone()[0].split(' ')[0]
            )
        except (TypeError,sqlite3.OperationalError):
            return self.__len__()
def __length_hint__ ( self ) : try : return int ( self . _connection . execute ( "SELECT stat FROM sqlite_stat1 WHERE tbl=?;" , ( self . table , ) ) . fetchone ( ) [ 0 ] . split ( ' ' ) [ 0 ] ) except ( TypeError , sqlite3 . OperationalError ) : return self . __len__ ( )
Return the approximate table size based on internal database
        statistics if present, otherwise, find the actual length