spring-framework / org.springframework.jdbc.object / SqlFunction / <init>

<init>

SqlFunction()

Constructor to allow use as a JavaBean. A DataSource, SQL and any parameters must be supplied before invoking the compile method and using this object.

See Also
#setDataSource#setSql#compile

SqlFunction(ds: DataSource, sql: String)

Create a new SqlFunction object with SQL, but without parameters. Must add parameters or settle with none.

Parameters

ds - DataSource to obtain connections from

sql - SQL to execute

SqlFunction(ds: DataSource, sql: String, types: IntArray)

Create a new SqlFunction object with SQL and parameters.

Parameters

ds - DataSource to obtain connections from

sql - SQL to execute

types - SQL types of the parameters, as defined in the java.sql.Types class

See Also
java.sql.Types

SqlFunction(ds: DataSource, sql: String, types: IntArray, resultType: Class<T>)

Create a new SqlFunction object with SQL, parameters and a result type.

Parameters

ds - DataSource to obtain connections from

sql - SQL to execute

types - SQL types of the parameters, as defined in the java.sql.Types class

resultType - the type that the result object is required to match

See Also
#setResultType(Class)java.sql.Types