Search in sources :

Example 1 with PostgisSqmFunctionDescriptors

use of org.hibernate.spatial.dialect.postgis.PostgisSqmFunctionDescriptors in project hibernate-orm by hibernate.

the class CockroachDbContributor method contributeFunctions.

@Override
public void contributeFunctions(FunctionContributions functionContributions) {
    HSMessageLogger.LOGGER.functionContributions(this.getClass().getCanonicalName());
    final PostgisSqmFunctionDescriptors postgisFunctions = new PostgisSqmFunctionDescriptors(functionContributions);
    final SqmFunctionRegistry functionRegistry = functionContributions.getFunctionRegistry();
    postgisFunctions.asMap().forEach((key, desc) -> {
        if (isUnsupported(key)) {
            return;
        }
        functionRegistry.register(key.getName(), desc);
        key.getAltName().ifPresent(altName -> functionRegistry.registerAlternateKey(altName, key.getName()));
    });
}
Also used : SqmFunctionRegistry(org.hibernate.query.sqm.function.SqmFunctionRegistry) PostgisSqmFunctionDescriptors(org.hibernate.spatial.dialect.postgis.PostgisSqmFunctionDescriptors)

Aggregations

SqmFunctionRegistry (org.hibernate.query.sqm.function.SqmFunctionRegistry)1 PostgisSqmFunctionDescriptors (org.hibernate.spatial.dialect.postgis.PostgisSqmFunctionDescriptors)1