<commit_before>/*
 * The Spring Framework is published under the terms
 * of the Apache Software License.
 */

package org.springframework.jdbc.object;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;

import javax.sql.DataSource;

import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.support.JdbcUtils;

/**
 * SQL function wrapper that returns a single row of results. The default
 * behavior is to return an int, but that can be overridden by using the methods
 * with an extra return type parameter.Intended to use to call SQL functions.
 *
 * <p>This is a concrete class, which there is normally no need to subclass.
 * Code using this package can create an object of this type, declaring SQL
 * and parameters, and then invoke the appropriate run() method repeatedly to
 * execute the function.
 *
 * <p>Like all RdbmsOperation objects, SqlFunction objects are threadsafe.
 *
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 *
 * History :
 * 20/04/2003 : modified by IM to allow returning something else than an int
 * 09/05/2003 : modified by JPP, added case Types.BIGINT in function extract
 * @version $Id: SqlFunction.java,v 1.4 2003-12-05 17:03:14 jhoeller Exp $
 */

public class SqlFunction extends MappingSqlQuery {

	/** The SQL return type of the function */
	private int retType;<commit_msg>Modified JavaDoc to better differentiate between SqlFunction and StoredProcedure<commit_after>/*
 * The Spring Framework is published under the terms
 * of the Apache Software License.
 */

package org.springframework.jdbc.object;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Types;

import javax.sql.DataSource;

import org.springframework.dao.InvalidDataAccessApiUsageException;
import org.springframework.jdbc.support.JdbcUtils;

/**
 * SQL "function" wrapper for a query that returns a single row of results. 
 * The default behavior is to return an int, but that can be overridden by 
 * using the methods with an extra return type parameter.  
 * Intended to use to call SQL functions that return a single result using a 
 * query like "select user()" or "select sysdate from dual".  It is not intended
 * for calling more complex stored functions or for using a callableStatement to 
 * invoke a stored procedure or stored function.  Use StoredProcedure or SqlCall 
 * for this type of processing.
 *
 * <p>This is a concrete class, which there is normally no need to subclass.
 * Code using this package can create an object of this type, declaring SQL
 * and parameters, and then invoke the appropriate run() method repeatedly to
 * execute the function.
 *
 * <p>Like all RdbmsOperation objects, SqlFunction objects are threadsafe.
 *
 * @author <NAME>
 * @author <NAME>
 * @author <NAME>
 * @see org.springframework.jdbc.object.StoredProcedure
 *
 * History :
 * 20/04/2003 : modified by IM to allow returning something else than an int
 * 09/05/2003 : modified by JPP, added case Types.BIGINT in function extract
 * @version $Id: SqlFunction.java,v 1.5 2003-12-15 13:52:02 trisberg Exp $
 */

public class SqlFunction extends MappingSqlQuery {

	/** The SQL return type of the function */
	private int retType;
{'fraction_non_alphanumeric': 0.07552404438964241, 'fraction_numerical': 0.01972872996300863, 'mean_word_length': 4.167197452229299, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4224964', 'n_tokens_mistral': 928, 'n_tokens_neox': 860, 'n_words': 395}