All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cds.ql.cqn.CqnInSubquery Maven / Gradle / Ivy

There is a newer version: 3.6.1
Show newest version
/*******************************************************************
 * © 2024 SAP SE or an SAP affiliate company. All rights reserved. *
 *******************************************************************/
package com.sap.cds.ql.cqn;

import com.google.common.annotations.Beta;

/**
 * The {@code in} subquery predicate tests wether an {@link #value() actual
 * value} (n-tuple) is equal to any value (n-tuple) returned by a defined {@link #subquery() subquery}.
 *
 * It evaluates to {@code false} if the subquery has an empty result.
 */
@Beta
public interface CqnInSubquery extends CqnPredicate {

	/**
	 * The actual {@link CqnValue} (n-tuple) that is being compared to the result set
	 * (n-tuples) of the {@link #subquery()}.
	 *
	 * @return the actual {@link CqnValue}
	 */
	CqnValue value();

	/**
	 * The subquery that defines the set of expected values the {@link #value()
	 * actual value} is tested against.
	 *
	 * @return the subquery
	 */
	CqnSelect subquery();

	@Override
	default void accept(CqnVisitor visitor) {
		value().accept(visitor);

		visitor.visit(this);
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy