example.py 文件源码

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

项目:movies-python-py2neo-3.0 作者: neo4j-examples 项目源码 文件源码
def get_search():
    try:
        q = request.query["q"]
    except KeyError:
        return []
    else:
        results = graph.run(
            "MATCH (movie:Movie) "
            "WHERE movie.title =~ {title} "
            "RETURN movie", {"title": "(?i).*" + q + ".*"})
        response.content_type = "application/json"
        return json.dumps([{"movie": dict(row["movie"])} for row in results])
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号