com.sap.cds.jdbc.generic.GenericScalarValueResolver Maven / Gradle / Ivy
The newest version!
/*******************************************************************
* © 2024 SAP SE or an SAP affiliate company. All rights reserved. *
*******************************************************************/
package com.sap.cds.jdbc.generic;
import com.sap.cds.jdbc.spi.ScalarValueResolver;
import com.sap.cds.ql.cqn.CqnBooleanLiteral;
public class GenericScalarValueResolver implements ScalarValueResolver {
private static final String SQL_TRUE = "TRUE";
private static final String SQL_FALSE = "FALSE";
@Override
public String literal(CqnBooleanLiteral bool) {
return Boolean.TRUE.equals(bool.value()) ? SQL_TRUE : SQL_FALSE;
}
}