select case when count(*) = 0 then 0 else 1 end from site_nodes where name = :name and parent_id = :parent_id