def like(self, pattern):
        """
        test_database.Post.select('id').where('content').like('%cont%')
        """
        if 'where' not in self.base_statement:
            raise QueryException("like query must have a where clause before.")
        self.like_pattern = pattern or ''
        self.base_statement = ''.join(
            [self.base_statement.strip(';'), ' like "%s";'])
        return self
dataset/ETHPy150Open jasonlvhit/lunar/lunar/database.py/SelectQuery.like/original