from sqlalchemy import exists, select

from maps_adv.adv_store.lib.db import db
from maps_adv.adv_store.v2.lib.db import tables


async def does_campaign_exist(campaign_id):
    return await db.ro.fetch_val(
        select([exists().where(tables.campaign.c.id == campaign_id)])
    )
