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

com.sap.cds.jdbc.generic.GenericScalarValueResolver Maven / Gradle / Ivy

There is a newer version: 3.4.0
Show 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;
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy