DBHandler.py 文件源码

python
阅读 22 收藏 0 点赞 0 评论 0

项目:CaptsLog 作者: jaehoonhwang 项目源码 文件源码
def search_entries_by_modified_date(self, date):
        """Search For Entries modified on the specified Date in the Entries_Table

        Args:
            date(datetime): the date you are searching for

        Return:
            result(collection): the search result

        """
        if date.date() <= datetime.now().date():
            entries_table = self.db["Entries_Table"]
            try:
                return entries_table.find(
                    {"Last_Modified": date})
            except errors.ServerSelectionTimeoutError:
                print('ERROR : No connection could be made because'
                      ' the target machine actively refused it')
                return True
        return False
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号