Class JdbcCallableStatement

  • TheJdbcCallableStatement class in Apps Script provides functionality for interacting with callable statements in a JDBC database connection.

  • It includes methods for batch processing, executing SQL statements, handling parameters (setting input and registering/retrieving output), and retrieving results and metadata.

  • The class also provides methods to manage statement properties and configurations, such as setting fetch size, query timeout, and closing the statement.

  • All methods described require authorization with thehttps://www.googleapis.com/auth/script.external_request scope for external database interaction.

JdbcCallableStatement

A JDBCCallableStatement. For documentation of this class, seejava.sql.CallableStatement.

Methods

MethodReturn typeBrief description
addBatch()voidFor documentation of this method, seejava.sql.PreparedStatement#addBatch().
addBatch(sql)voidFor documentation of this method, seejava.sql.Statement#addBatch(String).
cancel()voidFor documentation of this method, seejava.sql.Statement#cancel().
clearBatch()voidFor documentation of this method, seejava.sql.Statement#clearBatch().
clearParameters()voidFor documentation of this method, seejava.sql.PreparedStatement#clearParameters().
clearWarnings()voidFor documentation of this method, seejava.sql.Statement#clearWarnings().
close()voidFor documentation of this method, seejava.sql.Statement#close().
execute()BooleanFor documentation of this method, seejava.sql.PreparedStatement#execute().
execute(sql)BooleanFor documentation of this method, seejava.sql.Statement#execute(String).
execute(sql, autoGeneratedKeys)BooleanFor documentation of this method, seejava.sql.Statement#execute(String, int).
execute(sql, columnIndexes)BooleanFor documentation of this method, seejava.sql.Statement#execute(String, int[]).
execute(sql, columnNames)BooleanFor documentation of this method, seejava.sql.Statement#execute(String, String[]).
executeBatch()Integer[]For documentation of this method, seejava.sql.Statement#executeBatch().
executeBatch(parameters)Integer[]Submits a batch of commands to the database for execution and if all commands executesuccessfully, returns an array of update counts.
executeQuery()JdbcResultSetFor documentation of this method, seejava.sql.PreparedStatement#executeQuery().
executeQuery(sql)JdbcResultSetFor documentation of this method, seejava.sql.Statement#executeQuery(String).
executeUpdate()IntegerFor documentation of this method, seejava.sql.PreparedStatement#executeUpdate().
executeUpdate(sql)IntegerFor documentation of this method, seejava.sql.Statement#executeUpdate(String).
executeUpdate(sql, autoGeneratedKeys)IntegerFor documentation of this method, seejava.sql.Statement#executeUpdate(String, int).
executeUpdate(sql, columnIndexes)IntegerFor documentation of this method, seejava.sql.Statement#executeUpdate(String, int[]).
executeUpdate(sql, columnNames)IntegerFor documentation of this method, seejava.sql.Statement#executeUpdate(String, String[]).
getArray(parameterIndex)JdbcArrayFor documentation of this method, seejava.sql.CallableStatement#getArray(int).
getArray(parameterName)JdbcArrayFor documentation of this method, seejava.sql.CallableStatement#getArray(String).
getBigDecimal(parameterIndex)BigNumberFor documentation of this method, seejava.sql.CallableStatement#getBigDecimal(int).
getBigDecimal(parameterName)BigNumberFor documentation of this method, seejava.sql.CallableStatement#getBigDecimal(String).
getBlob(parameterIndex)JdbcBlobFor documentation of this method, seejava.sql.CallableStatement#getBlob(int).
getBlob(parameterName)JdbcBlobFor documentation of this method, seejava.sql.CallableStatement#getBlob(String).
getBoolean(parameterIndex)BooleanFor documentation of this method, seejava.sql.CallableStatement#getBoolean(int).
getBoolean(parameterName)BooleanFor documentation of this method, seejava.sql.CallableStatement#getBoolean(String).
getByte(parameterIndex)ByteFor documentation of this method, seejava.sql.CallableStatement#getByte(int).
getByte(parameterName)ByteFor documentation of this method, seejava.sql.CallableStatement#getByte(String).
getBytes(parameterIndex)Byte[]For documentation of this method, seejava.sql.CallableStatement#getBytes(int).
getBytes(parameterName)Byte[]For documentation of this method, seejava.sql.CallableStatement#getBytes(String).
getClob(parameterIndex)JdbcClobFor documentation of this method, seejava.sql.CallableStatement#getClob(int).
getClob(parameterName)JdbcClobFor documentation of this method, seejava.sql.CallableStatement#getClob(String).
getConnection()JdbcConnectionFor documentation of this method, seejava.sql.Statement#getConnection().
getDate(parameterIndex)JdbcDateFor documentation of this method, seejava.sql.CallableStatement#getDate(int).
getDate(parameterIndex, timeZone)JdbcDateFor documentation of this method, seejava.sql.CallableStatement#getDate(int, Calendar).
getDate(parameterName)JdbcDateFor documentation of this method, seejava.sql.CallableStatement#getDate(String).
getDate(parameterName, timeZone)JdbcDateFor documentation of this method, seejava.sql.CallableStatement#getDate(String, Calendar).
getDouble(parameterIndex)NumberFor documentation of this method, seejava.sql.CallableStatement#getDouble(int).
getDouble(parameterName)NumberFor documentation of this method, seejava.sql.CallableStatement#getDouble(String).
getFetchDirection()IntegerFor documentation of this method, seejava.sql.Statement#getFetchDirection().
getFetchSize()IntegerFor documentation of this method, seejava.sql.Statement#getFetchSize().
getFloat(parameterIndex)NumberFor documentation of this method, seejava.sql.CallableStatement#getFloat(int).
getFloat(parameterName)NumberFor documentation of this method, seejava.sql.CallableStatement#getFloat(String).
getGeneratedKeys()JdbcResultSetFor documentation of this method, seejava.sql.Statement#getGeneratedKeys().
getInt(parameterIndex)IntegerFor documentation of this method, seejava.sql.CallableStatement#getInt(int).
getInt(parameterName)IntegerFor documentation of this method, seejava.sql.CallableStatement#getInt(String).
getLong(parameterIndex)IntegerFor documentation of this method, seejava.sql.CallableStatement#getLong(int).
getLong(parameterName)IntegerFor documentation of this method, seejava.sql.CallableStatement#getLong(String).
getMaxFieldSize()IntegerFor documentation of this method, seejava.sql.Statement#getMaxFieldSize().
getMaxRows()IntegerFor documentation of this method, seejava.sql.Statement#getMaxRows().
getMetaData()JdbcResultSetMetaDataFor documentation of this method, seejava.sql.PreparedStatement#getMetaData().
getMoreResults()BooleanFor documentation of this method, seejava.sql.Statement#getMoreResults().
getMoreResults(current)BooleanFor documentation of this method, seejava.sql.Statement#getMoreResults(int).
getNClob(parameterIndex)JdbcClobFor documentation of this method, seejava.sql.CallableStatement#getNClob(int).
getNClob(parameterName)JdbcClobFor documentation of this method, seejava.sql.CallableStatement#getNClob(String).
getNString(parameterIndex)StringFor documentation of this method, seejava.sql.CallableStatement#getNString(int).
getNString(parameterName)StringFor documentation of this method, seejava.sql.CallableStatement#getNString(String).
getObject(parameterIndex)ObjectFor documentation of this method, seejava.sql.CallableStatement#getObject(int).
getObject(parameterName)ObjectFor documentation of this method, seejava.sql.CallableStatement#getObject(String).
getParameterMetaData()JdbcParameterMetaDataFor documentation of this method, seejava.sql.PreparedStatement#getParameterMetaData().
getQueryTimeout()IntegerFor documentation of this method, seejava.sql.Statement#getQueryTimeout().
getRef(parameterIndex)JdbcRefFor documentation of this method, seejava.sql.CallableStatement#getRef(int).
getRef(parameterName)JdbcRefFor documentation of this method, seejava.sql.CallableStatement#getRef(String).
getResultSet()JdbcResultSetFor documentation of this method, seejava.sql.Statement#getResultSet().
getResultSetConcurrency()IntegerFor documentation of this method, seejava.sql.Statement#getResultSetConcurrency().
getResultSetHoldability()IntegerFor documentation of this method, seejava.sql.Statement#getResultSetHoldability().
getResultSetType()IntegerFor documentation of this method, seejava.sql.Statement#getResultSetType().
getRowId(parameterIndex)JdbcRowIdFor documentation of this method, seejava.sql.CallableStatement#getRowId(int).
getRowId(parameterName)JdbcRowIdFor documentation of this method, seejava.sql.CallableStatement#getRowId(String).
getSQLXML(parameterIndex)JdbcSQLXMLFor documentation of this method, seejava.sql.CallableStatement#getSQLXML(int).
getSQLXML(parameterName)JdbcSQLXMLFor documentation of this method, seejava.sql.CallableStatement#getSQLXML(String).
getShort(parameterIndex)IntegerFor documentation of this method, seejava.sql.CallableStatement#getShort(int).
getShort(parameterName)IntegerFor documentation of this method, seejava.sql.CallableStatement#getShort(String).
getString(parameterIndex)StringFor documentation of this method, seejava.sql.CallableStatement#getString(int).
getString(parameterName)StringFor documentation of this method, seejava.sql.CallableStatement#getString(String).
getTime(parameterIndex)JdbcTimeFor documentation of this method, seejava.sql.CallableStatement#getTime(int).
getTime(parameterIndex, timeZone)JdbcTimeFor documentation of this method, seejava.sql.CallableStatement#getTime(int, Calendar).
getTime(parameterName)JdbcTimeFor documentation of this method, seejava.sql.CallableStatement#getTime(String).
getTime(parameterName, timeZone)JdbcTimeFor documentation of this method, seejava.sql.CallableStatement#getTime(String, Calendar).
getTimestamp(parameterIndex)JdbcTimestampFor documentation of this method, seejava.sql.CallableStatement#getTimestamp(int).
getTimestamp(parameterIndex, timeZone)JdbcTimestampFor documentation of this method, seejava.sql.CallableStatement#getTimestamp(int, Calendar).
getTimestamp(parameterName)JdbcTimestampFor documentation of this method, seejava.sql.CallableStatement#getTimestamp(String).
getTimestamp(parameterName, timeZone)JdbcTimestampFor documentation of this method, seejava.sql.CallableStatement#getTimestamp(String, Calendar).
getURL(parameterIndex)StringFor documentation of this method, seejava.sql.CallableStatement#getURL(int).
getURL(parameterName)StringFor documentation of this method, seejava.sql.CallableStatement#getURL(String).
getUpdateCount()IntegerFor documentation of this method, seejava.sql.Statement#getUpdateCount().
getWarnings()String[]For documentation of this method, seejava.sql.Statement#getWarnings().
isClosed()BooleanFor documentation of this method, seejava.sql.Statement#isClosed().
isPoolable()BooleanFor documentation of this method, seejava.sql.Statement#isPoolable().
registerOutParameter(parameterIndex, sqlType)voidFor documentation of this method, seejava.sql.CallableStatement#registerOutParameter(int, int).
registerOutParameter(parameterIndex, sqlType, scale)voidFor documentation of this method, seejava.sql.CallableStatement#registerOutParameter(int, int, int).
registerOutParameter(parameterIndex, sqlType, typeName)voidFor documentation of this method, seejava.sql.CallableStatement#registerOutParameter(int, int, String).
registerOutParameter(parameterName, sqlType)voidFor documentation of this method, seejava.sql.CallableStatement#registerOutParameter(String, int).
registerOutParameter(parameterName, sqlType, scale)voidFor documentation of this method, seejava.sql.CallableStatement#registerOutParameter(String, int, int).
registerOutParameter(parameterName, sqlType, typeName)voidFor documentation of this method, seejava.sql.CallableStatement#registerOutParameter(String, int, String).
setArray(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setArray(int, Array).
setBigDecimal(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setBigDecimal(int, BigDecimal).
setBigDecimal(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setBigDecimal(String, BigDecimal).
setBlob(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setBlob(int, Clob).
setBlob(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setBlob(String, Blob).
setBoolean(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setBoolean(int, boolean).
setBoolean(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setBoolean(String, boolean).
setByte(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setByte(int, byte).
setByte(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setByte(String, byte).
setBytes(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setBytes(int, byte[]).
setBytes(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setBytes(String, byte[]).
setClob(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setClob(int, Clob).
setClob(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setBlob(String, Clob).
setCursorName(name)voidFor documentation of this method, seejava.sql.Statement#setCursorName(String).
setDate(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setDate(int, Date).
setDate(parameterIndex, x, timeZone)voidFor documentation of this method, seejava.sql.PreparedStatement#setDate(int, Date, Calendar).
setDate(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setDate(String, Date).
setDate(parameterName, x, timeZone)voidFor documentation of this method, seejava.sql.CallableStatement#setDate(String, Date, Calendar).
setDouble(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setDouble(int, double).
setDouble(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setDouble(String, double).
setEscapeProcessing(enable)voidFor documentation of this method, seejava.sql.Statement#setEscapeProcessing(boolean).
setFetchDirection(direction)voidFor documentation of this method, seejava.sql.Statement#setFetchDirection(int).
setFetchSize(rows)voidFor documentation of this method, seejava.sql.Statement#setFetchSize(int).
setFloat(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setFloat(int, float).
setFloat(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setFloat(String, float).
setInt(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setInt(int, int).
setInt(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setInt(String, int).
setLong(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setLong(int, long).
setLong(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setLong(String, long).
setMaxFieldSize(max)voidFor documentation of this method, seejava.sql.Statement#setMaxFieldSize(int).
setMaxRows(max)voidFor documentation of this method, seejava.sql.Statement#setMaxRows(int).
setNClob(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setNClob(int, NClob).
setNClob(parameterName, value)voidFor documentation of this method, seejava.sql.CallableStatement#setNClob(String, NClob).
setNString(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setNString(int, String).
setNString(parameterName, value)voidFor documentation of this method, seejava.sql.CallableStatement#setNString(String, String).
setNull(parameterIndex, sqlType)voidFor documentation of this method, seejava.sql.PreparedStatement#setNull(int, int).
setNull(parameterIndex, sqlType, typeName)voidFor documentation of this method, seejava.sql.PreparedStatement#setNull(int, int, String).
setNull(parameterName, sqlType)voidFor documentation of this method, seejava.sql.CallableStatement#setNull(String, int).
setNull(parameterName, sqlType, typeName)voidFor documentation of this method, seejava.sql.CallableStatement#setNull(String, int, String).
setObject(index, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setObject(int, Object).
setObject(parameterIndex, x, targetSqlType)voidFor documentation of this method, seejava.sql.PreparedStatement#setObject(int, Object, int).
setObject(parameterIndex, x, targetSqlType, scaleOrLength)voidFor documentation of this method, seejava.sql.PreparedStatement#setObject(int, Object, int, int).
setObject(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setObject(String, Object).
setObject(parameterName, x, targetSqlType)voidFor documentation of this method, seejava.sql.CallableStatement#setObject(String, Object, int).
setObject(parameterName, x, targetSqlType, scale)voidFor documentation of this method, seejava.sql.CallableStatement#setObject(String, Object, int, int).
setPoolable(poolable)voidFor documentation of this method, seejava.sql.Statement#setPoolable(boolean).
setQueryTimeout(seconds)voidFor documentation of this method, seejava.sql.Statement#setQueryTimeout(int).
setRef(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setRef(int, Ref).
setRowId(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setRowId(int, RowId).
setRowId(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setRowId(String, RowId).
setSQLXML(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setSQLXML(int, SQLXML).
setSQLXML(parameterName, xmlObject)voidFor documentation of this method, seejava.sql.CallableStatement#setSQLXML(String, SQLXML).
setShort(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setShort(int, short).
setShort(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setShort(String, short).
setString(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setString(int, String).
setString(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setString(String, String).
setTime(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setTime(int, Time).
setTime(parameterIndex, x, timeZone)voidFor documentation of this method, seejava.sql.PreparedStatement#setTime(int, Time, Calendar).
setTime(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setTime(String, Time).
setTime(parameterName, x, timeZone)voidFor documentation of this method, seejava.sql.CallableStatement#setTime(String, Time, Calendar).
setTimestamp(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setTimestamp(int, Timestamp).
setTimestamp(parameterIndex, x, timeZone)voidFor documentation of this method, seejava.sql.PreparedStatement#setTimestamp(int, Timestamp, Calendar).
setTimestamp(parameterName, x)voidFor documentation of this method, seejava.sql.CallableStatement#setTimestamp(String, Timestamp).
setTimestamp(parameterName, x, timeZone)voidFor documentation of this method, seejava.sql.CallableStatement#setTimestamp(String, Timestamp, Calendar).
setURL(parameterIndex, x)voidFor documentation of this method, seejava.sql.PreparedStatement#setURL(int, URL).
setURL(parameterName, val)voidFor documentation of this method, seejava.sql.CallableStatement#setURL(String, URL).
wasNull()BooleanFor documentation of this method, seejava.sql.CallableStatement#wasNull().

Detailed documentation

addBatch()

For documentation of this method, seejava.sql.PreparedStatement#addBatch().

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

addBatch(sql)

For documentation of this method, seejava.sql.Statement#addBatch(String).

Parameters

NameTypeDescription
sqlStringThe SQL command to add to this statement, typically an SQLINSERT orUPDATE.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

cancel()

For documentation of this method, seejava.sql.Statement#cancel().

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

clearBatch()

For documentation of this method, seejava.sql.Statement#clearBatch().

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

clearParameters()

For documentation of this method, seejava.sql.PreparedStatement#clearParameters().

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

clearWarnings()

For documentation of this method, seejava.sql.Statement#clearWarnings().

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

close()

For documentation of this method, seejava.sql.Statement#close().


execute()

For documentation of this method, seejava.sql.PreparedStatement#execute().

Return

Booleantrue if the first result is a result set;false if the first result is an update count or there is no result.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

execute(sql)

For documentation of this method, seejava.sql.Statement#execute(String).

Parameters

NameTypeDescription
sqlStringThe SQL statement to execute.

Return

Booleantrue if the first result is a result set;false if it is an update count or if there are no results.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

execute(sql, autoGeneratedKeys)

For documentation of this method, seejava.sql.Statement#execute(String, int).

Parameters

NameTypeDescription
sqlStringThe SQL statement to execute.
autoGeneratedKeysIntegerA flag that indicates whether auto-generated keys are made available for future retrieval; eitherJdbc.Statement.RETURN_GENERATED_KEYS orJdbc.Statement.NO_GENERATED_KEYS.

Return

Booleantrue if the first result is a result set;false if it is an update count or if there are no results.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

execute(sql, columnIndexes)

For documentation of this method, seejava.sql.Statement#execute(String, int[]).

Parameters

NameTypeDescription
sqlStringThe SQL statement to execute.
columnIndexesInteger[]The column indices in the whose auto-generated keys are made available for future retrieval.

Return

Booleantrue if the first result is a result set;false if it is an update count or if there are no results.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

execute(sql, columnNames)

For documentation of this method, seejava.sql.Statement#execute(String, String[]).

Parameters

NameTypeDescription
sqlStringThe SQL statement to execute.
columnNamesString[]The names of columns in the whose auto-generated keys are made available for future retrieval.

Return

Booleantrue if the first result is a result set;false if it is an update count or if there are no results.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeBatch()

For documentation of this method, seejava.sql.Statement#executeBatch().

Return

Integer[] — The update counts for each command in the batch, using the same order in which commands were added to the batch.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeBatch(parameters)

Submits a batch of commands to the database for execution and if all commands executesuccessfully, returns an array of update counts. The parameters argument is a 2D array, whereeach inner array contains the parameters for a single execution of the statement. For example,if you have a statement like "INSERT INTO employees (name, age) VALUES (?, ?)", the parameterscould be[["John Doe", 30], ["John Smith", 25]].

The following example inserts multiple rows into a database using batching:

varconn=Jdbc.getCloudSqlConnection("jdbc:google:mysql://...");varstmt=conn.prepareStatement("INSERT INTO employees (name, age) VALUES (?, ?)");varparams=[["John Doe",30],["John Smith",25]];stmt.executeBatch(params);

Parameters

NameTypeDescription
parametersObject[][]A 2D array of Objects representing the parameters for each batch.

Return

Integer[] — An array of update counts containing one element for each command in the batch.

Throws

Error — if a database access error occurs.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeQuery()

For documentation of this method, seejava.sql.PreparedStatement#executeQuery().

Return

JdbcResultSet — A result set that contains the data produced by the query.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeQuery(sql)

For documentation of this method, seejava.sql.Statement#executeQuery(String).

Parameters

NameTypeDescription
sqlStringThe SQL statement to execute, typically a staticSELECT.

Return

JdbcResultSet — A result set containing the results of the execution. This is nevernull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeUpdate()

For documentation of this method, seejava.sql.PreparedStatement#executeUpdate().

Return

Integer — The row count ofr SQL Data Manipulation Language statements, or 0 for SQL statements that return nothing.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeUpdate(sql)

For documentation of this method, seejava.sql.Statement#executeUpdate(String).

Parameters

NameTypeDescription
sqlStringThe SQL Data Manipulation Language statement to execute (such asINSERT,UPDATE, orDELETE), or else a statement that returns nothing (such as a DDL statement).

Return

Integer — Either the row count for for Data Manipulation Language statements, or 0 for statements that return nothing.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeUpdate(sql, autoGeneratedKeys)

For documentation of this method, seejava.sql.Statement#executeUpdate(String, int).

Parameters

NameTypeDescription
sqlStringThe SQL Data Manipulation Language statement to execute (such asINSERT,UPDATE, orDELETE), or else a statement that returns nothing (such as a DDL statement).
autoGeneratedKeysIntegerA flag that indicates whether auto-generated keys are made available for future retrieval; eitherJdbc.Statement.RETURN_GENERATED_KEYS orJdbc.Statement.NO_GENERATED_KEYS.

Return

Integer — Either the row count for for Data Manipulation Language statements, or 0 for statements that return nothing.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeUpdate(sql, columnIndexes)

For documentation of this method, seejava.sql.Statement#executeUpdate(String, int[]).

Parameters

NameTypeDescription
sqlStringThe SQL Data Manipulation Language statement to execute (such asINSERT,UPDATE, orDELETE), or else a statement that returns nothing (such as a DDL statement).
columnIndexesInteger[]The column indices in the whose auto-generated keys are made available for future retrieval.

Return

Integer — Either the row count for for Data Manipulation Language statements, or 0 for statements that return nothing.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

executeUpdate(sql, columnNames)

For documentation of this method, seejava.sql.Statement#executeUpdate(String, String[]).

Parameters

NameTypeDescription
sqlStringThe SQL Data Manipulation Language statement to execute (such asINSERT,UPDATE, orDELETE), or else a statement that returns nothing (such as a DDL statement).
columnNamesString[]The names of columns in the whose auto-generated keys are made available for future retrieval.

Return

Integer — Either the row count for for Data Manipulation Language statements, or 0 for statements that return nothing.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getArray(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getArray(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

JdbcArray — The value of aARRAY parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getArray(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getArray(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcArray — The value of aARRAY parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getBigDecimal(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getBigDecimal(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

BigNumber — The value of aNUMERIC parameter in full precision. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getBigDecimal(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getBigDecimal(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

BigNumber — The value of aNUMERIC parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getBlob(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getBlob(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

JdbcBlob — The value of aBLOB parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getBlob(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getBlob(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcBlob — The value of aBLOB parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getBoolean(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getBoolean(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Boolean — The value of aBIT orBOOLEAN parameter. Returnsfalse if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getBoolean(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getBoolean(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Boolean — The value of aBIT orBOOLEAN parameter. Returnsfalse if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getByte(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getByte(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Byte — The value of aTINYINT parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getByte(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getByte(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Byte — The value of aTINYINT parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getBytes(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getBytes(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Byte[] — The value of aBINARY orVARBINARY parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getBytes(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getBytes(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Byte[] — The value of aBINARY orVARBINARY parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getClob(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getClob(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

JdbcClob — The value of aCLOB parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getClob(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getClob(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcClob — The value of aCLOB parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getConnection()

For documentation of this method, seejava.sql.Statement#getConnection().

Return

JdbcConnection — The connection that produced this statement.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getDate(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getDate(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

JdbcDate — The value of aDATE parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getDate(parameterIndex, timeZone)

For documentation of this method, seejava.sql.CallableStatement#getDate(int, Calendar).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Return

JdbcDate — The value of aDATE parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getDate(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getDate(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcDate — The value of aDATE parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getDate(parameterName, timeZone)

For documentation of this method, seejava.sql.CallableStatement#getDate(String, Calendar).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Return

JdbcDate — The value of aDATE parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getDouble(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getDouble(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Number — The value of aDOUBLE parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getDouble(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getDouble(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Number — The value of aDOUBLE parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getFetchDirection()

For documentation of this method, seejava.sql.Statement#getFetchDirection().

Return

Integer — The default direction for result sets generated by this statement, which is eitherJdbc.ResultSet.FETCH_FORWARD orJdbc.ResultSet.FETCH_REVERSE.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getFetchSize()

For documentation of this method, seejava.sql.Statement#getFetchSize().

Return

Integer — The default row fetch size for result sets generated from this statement.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getFloat(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getFloat(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Number — The value of aFLOAT parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getFloat(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getFloat(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Number — The value of aFLOAT parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getGeneratedKeys()

For documentation of this method, seejava.sql.Statement#getGeneratedKeys().

Return

JdbcResultSet — A result set containing the auto-generated keys generated by the execution of this statement.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getInt(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getInt(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Integer — The value of aINTEGER parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getInt(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getInt(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Integer — The value of aINTEGER parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getLong(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getLong(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Integer — The value of aBIGINT parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getLong(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getLong(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Integer — The value of aBIGINT parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getMaxFieldSize()

For documentation of this method, seejava.sql.Statement#getMaxFieldSize().

Return

Integer — The current column byte size limit for columns storing character and binary values; a value of zero indictates no limit.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getMaxRows()

For documentation of this method, seejava.sql.Statement#getMaxRows().

Return

Integer — The current maximum number of rows for a result set produced by this statement; a value of 0 indicates no limit.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getMetaData()

For documentation of this method, seejava.sql.PreparedStatement#getMetaData().

Return

JdbcResultSetMetaData — The description of a result set's columns, orNULL if this metadata is unavailable.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getMoreResults()

For documentation of this method, seejava.sql.Statement#getMoreResults().

Return

Booleantrue if the next result is a result set;false otherwise.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getMoreResults(current)

For documentation of this method, seejava.sql.Statement#getMoreResults(int).

Parameters

NameTypeDescription
currentIntegerA flag that indicates what happens to current result sets when retrieved. This value is one ofJdbc.Statement.CLOSE_CURRENT_RESULT,Jdbc.Statement.KEEP_CURRENT_RESULT, orJdbc.Statement.CLOSE_ALL_RESULTS.

Return

Booleantrue if the next result is a result set;false otherwise.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getNClob(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getNClob(int).

Parameters

NameTypeDescription
parameterIndexIntegerAn index indicating which parameter to register (the first parameter is 1, the second is 2, and so on).

Return

JdbcClob — The value of aNCLOB parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getNClob(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getNClob(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcClob — The value of aNCLOB parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getNString(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getNString(int).

Parameters

NameTypeDescription
parameterIndexIntegerAn index indicating which parameter to register (the first parameter is 1, the second is 2, and so on).

Return

String — A string that maps aNCHAR,NVARCHAR, orLONGNVARCHAR value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getNString(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getNString(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

String — A string that maps aNCHAR,NVARCHAR, orLONGNVARCHAR value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getObject(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getObject(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Object — An object holding the parameter value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getObject(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getObject(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Object — An object holding the parameter value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getParameterMetaData()

For documentation of this method, seejava.sql.PreparedStatement#getParameterMetaData().

Return

JdbcParameterMetaData — The parameter metadata, including the number, types, and properties for each parameter.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getQueryTimeout()

For documentation of this method, seejava.sql.Statement#getQueryTimeout().

Return

Integer — The current query timeout in seconds; a value of zero indicates no timeout.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getRef(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getRef(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

JdbcRef — The value of aREF parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getRef(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getRef(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcRef — The value of aREF parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getResultSet()

For documentation of this method, seejava.sql.Statement#getResultSet().

Return

JdbcResultSet — The current result set, ornull if the result is an update count or there are no more results.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getResultSetConcurrency()

For documentation of this method, seejava.sql.Statement#getResultSetConcurrency().

Return

Integer — The result set concurrency for result sets generated from this statement, which is eitherJdbc.ResultSet.CONCUR_READ_ONLY orJdbc.ResultSet.CONCUR_UPDATABLE.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getResultSetHoldability()

For documentation of this method, seejava.sql.Statement#getResultSetHoldability().

Return

Integer — The result set holdability, which is eitherJdbc.ResultSet.HOLD_CURSORS_OVER_COMMIT orJdbc.ResultSet.CLOSE_CURSORS_AT_COMMIT.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getResultSetType()

For documentation of this method, seejava.sql.Statement#getResultSetType().

Return

Integer — The result set type for result sets generated from this statement, which isJdbc.ResultSet.TYPE_FORWARD_ONLY,Jdbc.ResultSet.TYPE_SCROLL_INSENSITIVE, orJdbc.ResultSet.TYPE_SCROLL_INSENSITIVE.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getRowId(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getRowId(int).

Parameters

NameTypeDescription
parameterIndexIntegerAn index indicating which parameter to register (the first parameter is 1, the second is 2, and so on).

Return

JdbcRowId — TheROWID value. Returnsnull if the parameter contains an SQLNULL.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getRowId(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getRowId(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcRowId — TheROWID value. Returnsnull if the parameter contains an SQLNULL.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getSQLXML(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getSQLXML(int).

Parameters

NameTypeDescription
parameterIndexIntegerAn index indicating which parameter to register (the first parameter is 1, the second is 2, and so on).

Return

JdbcSQLXML — A SQLXML object that maps to an SQL XML value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getSQLXML(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getSQLXML(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcSQLXML — A SQLXML object that maps to an SQL XML value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getShort(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getShort(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

Integer — The value of aSMALLINT parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getShort(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getShort(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

Integer — The value of aSMALLINT parameter. Returns 0 if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getString(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getString(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

String — The value of aCHAR,VARCHAR, orLONGVARCHAR parameter.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getString(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getString(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

String — The value of aCHAR,VARCHAR, orLONGVARCHAR parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getTime(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getTime(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

JdbcTime — The value of aTIME parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getTime(parameterIndex, timeZone)

For documentation of this method, seejava.sql.CallableStatement#getTime(int, Calendar).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Return

JdbcTime — The value of aTIME parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getTime(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getTime(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcTime — The value of aTIME parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getTime(parameterName, timeZone)

For documentation of this method, seejava.sql.CallableStatement#getTime(String, Calendar).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Return

JdbcTime — The value of aTIME parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getTimestamp(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getTimestamp(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

JdbcTimestamp — The value of aTIMESTAMP parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getTimestamp(parameterIndex, timeZone)

For documentation of this method, seejava.sql.CallableStatement#getTimestamp(int, Calendar).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Return

JdbcTimestamp — The value of aTIMESTAMP parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getTimestamp(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getTimestamp(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

JdbcTimestamp — The value of aTIMESTAMP parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getTimestamp(parameterName, timeZone)

For documentation of this method, seejava.sql.CallableStatement#getTimestamp(String, Calendar).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Return

JdbcTimestamp — The value of aTIMESTAMP parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getURL(parameterIndex)

For documentation of this method, seejava.sql.CallableStatement#getURL(int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).

Return

String — The value of aDATALINK parameter as a string.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getURL(parameterName)

For documentation of this method, seejava.sql.CallableStatement#getURL(String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter.

Return

String — The value of aDATALINK parameter. Returnsnull if the value isnull.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getUpdateCount()

For documentation of this method, seejava.sql.Statement#getUpdateCount().

Return

Integer — The current result as an update count, or -1 if the current result is a result set or if there are no more results.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

getWarnings()

For documentation of this method, seejava.sql.Statement#getWarnings().

Return

String[] — The current set of warnings, ornull if there are no warnings.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

isClosed()

For documentation of this method, seejava.sql.Statement#isClosed().

Return

Booleantrue if this statement is closed;false otherwise.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

isPoolable()

For documentation of this method, seejava.sql.Statement#isPoolable().

Return

Booleantrue if this statement is poolable;false otherwise.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

registerOutParameter(parameterIndex, sqlType)

For documentation of this method, seejava.sql.CallableStatement#registerOutParameter(int, int).

Parameters

NameTypeDescription
parameterIndexIntegerAn index indicating which parameter to register (the first parameter is 1, the second is 2, and so on).
sqlTypeIntegerThe JDBCtype code to register. If the parameter is of JDBC typeNUMERIC orDECIMAL, useregisterOutParameter(parameterIndex, sqlType, scale) instead.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

registerOutParameter(parameterIndex, sqlType, scale)

For documentation of this method, seejava.sql.CallableStatement#registerOutParameter(int, int, int).

Parameters

NameTypeDescription
parameterIndexIntegerAn index indicating which parameter to register (the first parameter is 1, the second is 2, and so on).
sqlTypeIntegerThe JDBCtype code to register.
scaleIntegerThe desired number of digits to the right of the decimal point (must be zero or greater).

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

registerOutParameter(parameterIndex, sqlType, typeName)

For documentation of this method, seejava.sql.CallableStatement#registerOutParameter(int, int, String).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to retrieve (the first parameter is 1, the second is 2, and so on).
sqlTypeIntegerAtype code value.
typeNameStringThe fully-qualified name of an SQL structured type.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

registerOutParameter(parameterName, sqlType)

For documentation of this method, seejava.sql.CallableStatement#registerOutParameter(String, int).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to be registered.
sqlTypeIntegerAtype code value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

registerOutParameter(parameterName, sqlType, scale)

For documentation of this method, seejava.sql.CallableStatement#registerOutParameter(String, int, int).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to be registered.
sqlTypeIntegerAtype code value.
scaleIntegerThe desired number of digits to the right of the decimal point, which must be zero or greater.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

registerOutParameter(parameterName, sqlType, typeName)

For documentation of this method, seejava.sql.CallableStatement#registerOutParameter(String, int, String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to be registered.
sqlTypeIntegerAtype code value.
typeNameStringThe fully-qualified name of an SQL structured type.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setArray(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setArray(int, Array).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcArrayThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setBigDecimal(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setBigDecimal(int, BigDecimal).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xBigNumberThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setBigDecimal(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setBigDecimal(String, BigDecimal).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xBigNumberThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setBlob(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setBlob(int, Clob).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcBlobThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setBlob(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setBlob(String, Blob).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcBlobA blob that maps to an SQLBLOB value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setBoolean(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setBoolean(int, boolean).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xBooleanThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setBoolean(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setBoolean(String, boolean).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xBooleanThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setByte(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setByte(int, byte).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xByteThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setByte(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setByte(String, byte).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xByteThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setBytes(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setBytes(int, byte[]).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xByte[]The parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setBytes(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setBytes(String, byte[]).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xByte[]The parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setClob(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setClob(int, Clob).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcClobThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setClob(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setBlob(String, Clob).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcClobA clob that maps to an SQLCLOB value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setCursorName(name)

For documentation of this method, seejava.sql.Statement#setCursorName(String).

Parameters

NameTypeDescription
nameStringThe new cursor name, which must be unique within a connection.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setDate(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setDate(int, Date).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcDateThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setDate(parameterIndex, x, timeZone)

For documentation of this method, seejava.sql.PreparedStatement#setDate(int, Date, Calendar).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcDateThe parameter value to set.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setDate(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setDate(String, Date).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcDateThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setDate(parameterName, x, timeZone)

For documentation of this method, seejava.sql.CallableStatement#setDate(String, Date, Calendar).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcDateThe parameter value to set.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setDouble(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setDouble(int, double).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xNumberThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setDouble(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setDouble(String, double).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xNumberThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setEscapeProcessing(enable)

For documentation of this method, seejava.sql.Statement#setEscapeProcessing(boolean).

Parameters

NameTypeDescription
enableBooleanIftrue, escape processing is enabled; otherwise it is disabled.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setFetchDirection(direction)

For documentation of this method, seejava.sql.Statement#setFetchDirection(int).

Parameters

NameTypeDescription
directionIntegerThe specified direction to set, which is eitherJdbc.ResultSet.FETCH_FORWARD orJdbc.ResultSet.FETCH_REVERSE.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setFetchSize(rows)

For documentation of this method, seejava.sql.Statement#setFetchSize(int).

Parameters

NameTypeDescription
rowsIntegerThe number of rows to fetch.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setFloat(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setFloat(int, float).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xNumberThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setFloat(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setFloat(String, float).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xNumberThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setInt(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setInt(int, int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xIntegerThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setInt(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setInt(String, int).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xIntegerThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setLong(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setLong(int, long).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xIntegerThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setLong(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setLong(String, long).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xIntegerThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setMaxFieldSize(max)

For documentation of this method, seejava.sql.Statement#setMaxFieldSize(int).

Parameters

NameTypeDescription
maxIntegerThe new column byte size limit; a value of zero indicates no limit.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setMaxRows(max)

For documentation of this method, seejava.sql.Statement#setMaxRows(int).

Parameters

NameTypeDescription
maxIntegerThe maximum number of rows a result set generated by this statement can have. A value of 0 indicates no limit.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setNClob(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setNClob(int, NClob).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcClobThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setNClob(parameterName, value)

For documentation of this method, seejava.sql.CallableStatement#setNClob(String, NClob).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
valueJdbcClobThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setNString(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setNString(int, String).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xStringThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setNString(parameterName, value)

For documentation of this method, seejava.sql.CallableStatement#setNString(String, String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
valueStringThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setNull(parameterIndex, sqlType)

For documentation of this method, seejava.sql.PreparedStatement#setNull(int, int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
sqlTypeIntegerTheSQL type of the specified parameter.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setNull(parameterIndex, sqlType, typeName)

For documentation of this method, seejava.sql.PreparedStatement#setNull(int, int, String).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
sqlTypeIntegerTheSQL type of the specified parameter.
typeNameStringThe fully-qualifed name of an SQL user-defined type. Ignored if the parameter isn't a user-defined type orREF.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setNull(parameterName, sqlType)

For documentation of this method, seejava.sql.CallableStatement#setNull(String, int).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
sqlTypeIntegerThe SQL type code.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setNull(parameterName, sqlType, typeName)

For documentation of this method, seejava.sql.CallableStatement#setNull(String, int, String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
sqlTypeIntegerTheSQL type.
typeNameStringThe fully-qualified name of an SQL user-defined type; ignored if the parameter is not a user-defined type or SQLREF value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setObject(index, x)

For documentation of this method, seejava.sql.PreparedStatement#setObject(int, Object).

Parameters

NameTypeDescription
indexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xObjectThe object containing the value to set the parameter to.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setObject(parameterIndex, x, targetSqlType)

For documentation of this method, seejava.sql.PreparedStatement#setObject(int, Object, int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xObjectThe object containing the value to set the parameter to.
targetSqlTypeIntegerTheSQL type to send to the database.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setObject(parameterIndex, x, targetSqlType, scaleOrLength)

For documentation of this method, seejava.sql.PreparedStatement#setObject(int, Object, int, int).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xObjectThe object containing the value to set the parameter to.
targetSqlTypeIntegerTheSQL type to send to the database. The scale argument may further qualify this type.
scaleOrLengthIntegerThe number of digits after the decimal forDECIMAL orNUMERIC types, or the length of data forInputStream orReader types. Ignored for all other types.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setObject(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setObject(String, Object).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xObjectThe object containing the value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setObject(parameterName, x, targetSqlType)

For documentation of this method, seejava.sql.CallableStatement#setObject(String, Object, int).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xObjectThe object containing the value to set.
targetSqlTypeIntegerTheSQL type sent to the database.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setObject(parameterName, x, targetSqlType, scale)

For documentation of this method, seejava.sql.CallableStatement#setObject(String, Object, int, int).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xObjectThe object containing the value to set.
targetSqlTypeIntegerTheSQL type sent to the database. The scale parameter may further qualify this type.
scaleIntegerThe number of digits after the decimal point forDECIMAL andNUMERIC types. Ignored for all other types.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setPoolable(poolable)

For documentation of this method, seejava.sql.Statement#setPoolable(boolean).

Parameters

NameTypeDescription
poolableBooleanIftrue, requests that this statement be pooled; otherwise requests it not be pooled.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setQueryTimeout(seconds)

For documentation of this method, seejava.sql.Statement#setQueryTimeout(int).

Parameters

NameTypeDescription
secondsIntegerThe new query timeout in seconds; a value of 0 indicates no timeout.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setRef(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setRef(int, Ref).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcRefThe SQLREF value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setRowId(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setRowId(int, RowId).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcRowIdThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setRowId(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setRowId(String, RowId).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcRowIdThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setSQLXML(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setSQLXML(int, SQLXML).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcSQLXMLThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setSQLXML(parameterName, xmlObject)

For documentation of this method, seejava.sql.CallableStatement#setSQLXML(String, SQLXML).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xmlObjectJdbcSQLXMLA SQLXML object that maps to an SQL XML value.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setShort(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setShort(int, short).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xIntegerThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setShort(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setShort(String, short).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xIntegerThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setString(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setString(int, String).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xStringThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setString(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setString(String, String).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xStringThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setTime(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setTime(int, Time).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcTimeThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setTime(parameterIndex, x, timeZone)

For documentation of this method, seejava.sql.PreparedStatement#setTime(int, Time, Calendar).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcTimeThe parameter value to set.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setTime(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setTime(String, Time).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcTimeThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setTime(parameterName, x, timeZone)

For documentation of this method, seejava.sql.CallableStatement#setTime(String, Time, Calendar).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcTimeThe parameter value to set.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setTimestamp(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setTimestamp(int, Timestamp).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcTimestampThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setTimestamp(parameterIndex, x, timeZone)

For documentation of this method, seejava.sql.PreparedStatement#setTimestamp(int, Timestamp, Calendar).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xJdbcTimestampThe parameter value to set.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setTimestamp(parameterName, x)

For documentation of this method, seejava.sql.CallableStatement#setTimestamp(String, Timestamp).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcTimestampThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setTimestamp(parameterName, x, timeZone)

For documentation of this method, seejava.sql.CallableStatement#setTimestamp(String, Timestamp, Calendar).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
xJdbcTimestampThe parameter value to set.
timeZoneStringA time zone string used to construct java.lang.Calendar instance, which in turn is used to build the date. Several formats of time zone strings are recognized: short IDs (such asPST,EST, andGMT), long IDs (such asUS/Pacific andAmerica/Los_Angeles), and offsets (such asGMT+6:30).

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setURL(parameterIndex, x)

For documentation of this method, seejava.sql.PreparedStatement#setURL(int, URL).

Parameters

NameTypeDescription
parameterIndexIntegerThe index of the parameter to set (the first parameter is 1, the second is 2, and so on).
xStringThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

setURL(parameterName, val)

For documentation of this method, seejava.sql.CallableStatement#setURL(String, URL).

Parameters

NameTypeDescription
parameterNameStringThe name of the parameter to set.
valStringThe parameter value to set.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

wasNull()

For documentation of this method, seejava.sql.CallableStatement#wasNull().

Return

Booleantrue if the last parameter read wasnull; returnsfalse otherwise.

Authorization

Scripts that use this method require authorization with one or more of the followingscopes:

  • https://www.googleapis.com/auth/script.external_request

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-11 UTC.