com.sap.cds.util.ConstantLiteralSealingModifier Maven / Gradle / Ivy
/*******************************************************************
* © 2023 SAP SE or an SAP affiliate company. All rights reserved. *
*******************************************************************/
package com.sap.cds.util;
import com.sap.cds.ql.CQL;
import com.sap.cds.ql.cqn.CqnLiteral;
import com.sap.cds.ql.cqn.CqnValue;
// Seals all literals as constants. Assumed to be stateless and not aware of the context.
public class ConstantLiteralSealingModifier extends AbstractCqnFilterModifier {
@Override
public CqnValue literal(CqnLiteral> value) {
return value.isConstant() ? value : CQL.constant(value.value());
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy