(self, db, params)
return self._oldest_link_date
Get the oldest click info date for a link.
        :param db:
        :param params:
        :return: date str
Get the oldest click info date for a link.
        :param db:
        :param params:
        :return: date str
Get the oldest click info date for a link . : param db : : param params : : return : date str
def oldest_click_date(self, db, params):
        """Get the oldest click info date for a link.
        :param db:
        :param params:
        :return: date str
        """
        if self._oldest_link_date is None:
            qry = text("""
                SELECT created_at FROM clickmeta
                WHERE link_id=:link_id
                ORDER BY created_at ASC
                LIMIT 1
                """)
            link_date = db.execute(qry, params).first()
            if link_date is None:
                return None
            link_date = link_date[0]
            if isinstance(link_date, datetime.datetime):
                link_date = link_date.strftime("%Y-%m-%d %H:%M:%S")
            self._oldest_link_date = link_date
        return self._oldest_link_date
def oldest_click_date ( self , db , params ) : if self . _oldest_link_date is None : qry = text ( """
                SELECT created_at FROM clickmeta
                WHERE link_id=:link_id
                ORDER BY created_at ASC
                LIMIT 1
                """ ) link_date = db . execute ( qry , params ) . first ( ) if link_date is None : return None link_date = link_date [ 0 ] if isinstance ( link_date , datetime . datetime ) : link_date = link_date . strftime ( "%Y-%m-%d %H:%M:%S" ) self . _oldest_link_date = link_date return self . _oldest_link_date