org.hibernate.dialect.function.StandardJDBCEscapeFunction Maven / Gradle / Ivy
                 Go to download
                
        
                    Show more of this group  Show more artifacts with this name
Show all versions of hibernate-core Show documentation
                Show all versions of hibernate-core Show documentation
The core O/RM functionality as provided by Hibernate
                
             The newest version!
        
        /*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.dialect.function;
import java.util.List;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.type.Type;
/**
 * Analogous to {@link org.hibernate.dialect.function.StandardSQLFunction}
 * except that standard JDBC escape sequences (i.e. {fn blah}) are used when
 * rendering the SQL.
 *
 * @author Steve Ebersole
 */
public class StandardJDBCEscapeFunction extends StandardSQLFunction {
	/**
	 * Constructs a StandardJDBCEscapeFunction
	 *
	 * @param name The function name
	 * @param typeValue The function return type
	 */
	public StandardJDBCEscapeFunction(String name, Type typeValue) {
		super( name, typeValue );
	}
	@Override
	public String render(Type argumentType, List args, SessionFactoryImplementor factory) {
		return "{fn " + super.render( argumentType, args, factory ) + "}";
	}
	@Override
	public String toString() {
		return "{fn " + getName() + "...}";
	}
}
     © 2015 - 2025 Weber Informatics LLC | Privacy Policy