def unique_query(unique_opts,impressionable=nil)
      full_statement = direct_create_statement({},impressionable)
      # reduce the full statement to the params we need for the specified unique options
      unique_opts.reduce({}) do |query, param|
        query[param] = full_statement[param]
        query
      end
    end
def unique_query(unique_opts,impressionable=nil)
      full_statement = direct_create_statement({},impressionable)
      # reduce the full statement to the params we need for the specified unique options
      unique_opts.reduce({}) do |query, param|
        query[param] = full_statement[param]
        query
      end
    end
creates the query to check for uniqueness