async def _get_post_id(db, author, permlink):
    """Get post_id from hive db."""
    sql = "SELECT id FROM hive_posts WHERE author = :a AND permlink = :p"
    return await db.query_one(sql, a=author, p=permlink)