AI-generated Key Takeaways
-  The JdbcPreparedStatementclass in Apps Script facilitates interaction with SQL databases using prepared statements, mirroring Java JDBC API functionality.
-  Key methods are available for batch operations, statement execution, setting parameters, retrieving information, and managing the statement itself. 
-  Numerous setmethods are provided to configure parameters for the prepared statement at specific indices, supporting various data types.
-  Statement properties can be configured using methods like setCursorName,setFetchDirection,setMaxRows, andsetQueryTimeout.
-  Most methods require authorization with the https://www.googleapis.com/auth/script.external_requestscope.
A JDBC Prepared  
. For documentation of this class, see  java.sql.PreparedStatement 
 
.
Methods
| Method | Return type | Brief description | 
|---|---|---|
| void | For documentation of this method, see java.sql.PreparedStatement#addBatch(). | |
| void | For documentation of this method, see java.sql.Statement#addBatch(String). | |
| void | For documentation of this method, see java.sql.Statement#cancel(). | |
| void | For documentation of this method, see java.sql.Statement#clearBatch(). | |
| void | For documentation of this method, see java.sql.PreparedStatement#clearParameters(). | |
| void | For documentation of this method, see java.sql.Statement#clearWarnings(). | |
| void | For documentation of this method, see java.sql.Statement#close(). | |
| Boolean | For documentation of this method, see java.sql.PreparedStatement#execute(). | |
| Boolean | For documentation of this method, see java.sql.Statement#execute(String). | |
| Boolean | For documentation of this method, see java.sql.Statement#execute(String, int). | |
| Boolean | For documentation of this method, see java.sql.Statement#execute(String, int[]). | |
| Boolean | For documentation of this method, see java.sql.Statement#execute(String, String[]). | |
| Integer[] | For documentation of this method, see java.sql.Statement#executeBatch(). | |
|  Jdbc  | For documentation of this method, see java.sql.PreparedStatement#executeQuery(). | |
|  Jdbc  | For documentation of this method, see java.sql.Statement#executeQuery(String). | |
| Integer | For documentation of this method, see java.sql.PreparedStatement#executeUpdate(). | |
| Integer | For documentation of this method, see java.sql.Statement#executeUpdate(String). | |
| Integer | For documentation of this method, see java.sql.Statement#executeUpdate(String, int). | |
| Integer | For documentation of this method, see java.sql.Statement#executeUpdate(String, int[]). | |
| Integer | For documentation of this method, see java.sql.Statement#executeUpdate(String, String[]). | |
|  Jdbc  | For documentation of this method, see java.sql.Statement#getConnection(). | |
| Integer | For documentation of this method, see java.sql.Statement#getFetchDirection(). | |
| Integer | For documentation of this method, see java.sql.Statement#getFetchSize(). | |
|  Jdbc  | For documentation of this method, see java.sql.Statement#getGeneratedKeys(). | |
| Integer | For documentation of this method, see java.sql.Statement#getMaxFieldSize(). | |
| Integer | For documentation of this method, see java.sql.Statement#getMaxRows(). | |
|  Jdbc  | For documentation of this method, see java.sql.PreparedStatement#getMetaData(). | |
| Boolean | For documentation of this method, see java.sql.Statement#getMoreResults(). | |
| Boolean | For documentation of this method, see java.sql.Statement#getMoreResults(int). | |
|  Jdbc  | For documentation of this method, see java.sql.PreparedStatement#getParameterMetaData(). | |
| Integer | For documentation of this method, see java.sql.Statement#getQueryTimeout(). | |
|  Jdbc  | For documentation of this method, see java.sql.Statement#getResultSet(). | |
| Integer | For documentation of this method, see java.sql.Statement#getResultSetConcurrency(). | |
| Integer | For documentation of this method, see java.sql.Statement#getResultSetHoldability(). | |
| Integer | For documentation of this method, see java.sql.Statement#getResultSetType(). | |
| Integer | For documentation of this method, see java.sql.Statement#getUpdateCount(). | |
| String[] | For documentation of this method, see java.sql.Statement#getWarnings(). | |
| Boolean | For documentation of this method, see java.sql.Statement#isClosed(). | |
| Boolean | For documentation of this method, see java.sql.Statement#isPoolable(). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setArray(int, Array). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setBigDecimal(int, BigDecimal). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setBlob(int, Clob). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setBoolean(int, boolean). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setByte(int, byte). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setBytes(int, byte[]). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setClob(int, Clob). | |
| void | For documentation of this method, see java.sql.Statement#setCursorName(String). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setDate(int, Date). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setDate(int, Date, Calendar). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setDouble(int, double). | |
| void | For documentation of this method, see java.sql.Statement#setEscapeProcessing(boolean). | |
| void | For documentation of this method, see java.sql.Statement#setFetchDirection(int). | |
| void | For documentation of this method, see java.sql.Statement#setFetchSize(int). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setFloat(int, float). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setInt(int, int). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setLong(int, long). | |
| void | For documentation of this method, see java.sql.Statement#setMaxFieldSize(int). | |
| void | For documentation of this method, see java.sql.Statement#setMaxRows(int). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setNClob(int, NClob). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setNString(int, String). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setNull(int, int). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setNull(int, int, String). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setObject(int, Object). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setObject(int, Object, int). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setObject(int, Object, int, int). | |
| void | For documentation of this method, see java.sql.Statement#setPoolable(boolean). | |
| void | For documentation of this method, see java.sql.Statement#setQueryTimeout(int). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setRef(int, Ref). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setRowId(int, RowId). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setSQLXML(int, SQLXML). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setShort(int, short). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setString(int, String). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setTime(int, Time). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setTime(int, Time, Calendar). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setTimestamp(int, Timestamp). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setTimestamp(int, Timestamp, Calendar). | |
| void | For documentation of this method, see java.sql.PreparedStatement#setURL(int, URL). | 
Detailed documentation
 add  
 
 For documentation of this method, see  java.sql.PreparedStatement#addBatch() 
 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 add  
 
 For documentation of this method, see  java.sql.Statement#addBatch(String) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL command to add to this statement, typically an SQL INSERTorUPDATE. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 cancel() 
 
 For documentation of this method, see  java.sql.Statement#cancel() 
 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 clear  
 
 For documentation of this method, see  java.sql.Statement#clearBatch() 
 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 clear  
 
 For documentation of this method, see  java.sql.PreparedStatement#clearParameters() 
 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 clear  
 
 For documentation of this method, see  java.sql.Statement#clearWarnings() 
 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 close() 
 
 For documentation of this method, see  java.sql.Statement#close() 
 
.
 execute() 
 
 For documentation of this method, see  java.sql.PreparedStatement#execute() 
 
.
Return
 Boolean 
— true 
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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute(sql) 
 
 For documentation of this method, see  java.sql.Statement#execute(String) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL statement to execute. | 
Return
 Boolean 
— true 
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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute(sql, autoGeneratedKeys) 
 
 For documentation of this method, see  java.sql.Statement#execute(String, int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL statement to execute. | 
| auto  | Integer | A flag that indicates whether auto-generated keys are made available
    for future retrieval; either Jdbc.Statement.RETURN_GENERATED_KEYSorJdbc.Statement.NO_GENERATED_KEYS. | 
Return
 Boolean 
— true 
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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute(sql, columnIndexes) 
 
 For documentation of this method, see  java.sql.Statement#execute(String, int[]) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL statement to execute. | 
| column  | Integer[] | The column indices in the whose auto-generated keys are made available for future retrieval. | 
Return
 Boolean 
— true 
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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute(sql, columnNames) 
 
 For documentation of this method, see  java.sql.Statement#execute(String, String[]) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL statement to execute. | 
| column  | String[] | The names of columns in the whose auto-generated keys are made available for future retrieval. | 
Return
 Boolean 
— true 
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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute  
 
 For documentation of this method, see  java.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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute  
 
 For documentation of this method, see  java.sql.PreparedStatement#executeQuery() 
 
.
Return
  Jdbc  
— 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute  
 
 For documentation of this method, see  java.sql.Statement#executeQuery(String) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL statement to execute, typically a static SELECT. | 
Return
  Jdbc  
— A result set containing the results of the execution. This is never null 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute  
 
 For documentation of this method, see  java.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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute  
 
 For documentation of this method, see  java.sql.Statement#executeUpdate(String) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL Data Manipulation Language statement to execute (such as INSERT,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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute  
 
 For documentation of this method, see  java.sql.Statement#executeUpdate(String, int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL Data Manipulation Language statement to execute (such as INSERT,UPDATE, orDELETE), or else a statement that returns nothing (such as a DDL
    statement). | 
| auto  | Integer | A flag that indicates whether auto-generated keys are made available
    for future retrieval; either Jdbc.Statement.RETURN_GENERATED_KEYSorJdbc.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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute  
 
 For documentation of this method, see  java.sql.Statement#executeUpdate(String, int[]) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL Data Manipulation Language statement to execute (such as INSERT,UPDATE, orDELETE), or else a statement that returns nothing (such as a DDL
    statement). | 
| column  | Integer[] | 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 execute  
 
 For documentation of this method, see  java.sql.Statement#executeUpdate(String, String[]) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| sql | String | The SQL Data Manipulation Language statement to execute (such as INSERT,UPDATE, orDELETE), or else a statement that returns nothing (such as a DDL
    statement). | 
| column  | String[] | 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getConnection() 
 
.
Return
  Jdbc  
— The connection that produced this statement.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getFetchDirection() 
 
.
Return
 Integer 
— The default direction for result sets generated by this statement, which is either Jdbc.ResultSet.FETCH_FORWARD 
or Jdbc.ResultSet.FETCH_REVERSE 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getGeneratedKeys() 
 
.
Return
  Jdbc  
— 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.PreparedStatement#getMetaData() 
 
.
Return
  Jdbc  
— The description of a result set's columns, or NULL 
if this metadata is
    unavailable.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getMoreResults() 
 
.
Return
 Boolean 
— true 
if the next result is a result set; false 
otherwise.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getMoreResults(int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| current | Integer | A flag that indicates what happens to current result sets when retrieved. This
    value is one of Jdbc.Statement.CLOSE_CURRENT_RESULT,Jdbc.Statement.KEEP_CURRENT_RESULT, orJdbc.Statement.CLOSE_ALL_RESULTS. | 
Return
 Boolean 
— true 
if the next result is a result set; false 
otherwise.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.PreparedStatement#getParameterMetaData() 
 
.
Return
  Jdbc  
— 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getResultSet() 
 
.
Return
  Jdbc  
— The current result set, or null 
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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getResultSetConcurrency() 
 
.
Return
 Integer 
— The result set concurrency for result sets generated from this statement, which is
    either Jdbc.ResultSet.CONCUR_READ_ONLY 
or Jdbc.ResultSet.CONCUR_UPDATABLE 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getResultSetHoldability() 
 
.
Return
 Integer 
— The result set holdability, which is either Jdbc.ResultSet.HOLD_CURSORS_OVER_COMMIT 
or Jdbc.ResultSet.CLOSE_CURSORS_AT_COMMIT 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getResultSetType() 
 
.
Return
 Integer 
— The result set type for result sets generated from this statement, which is Jdbc.ResultSet.TYPE_FORWARD_ONLY 
, Jdbc.ResultSet.TYPE_SCROLL_INSENSITIVE 
, or Jdbc.ResultSet.TYPE_SCROLL_INSENSITIVE 
.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 get  
 
 For documentation of this method, see  java.sql.Statement#getWarnings() 
 
.
Return
 String[] 
— The current set of warnings, or null 
if there are no warnings.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 is  
 
 For documentation of this method, see  java.sql.Statement#isClosed() 
 
.
Return
 Boolean 
— true 
if this statement is closed; false 
otherwise.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 is  
 
 For documentation of this method, see  java.sql.Statement#isPoolable() 
 
.
Return
 Boolean 
— true 
if this statement is poolable; false 
otherwise.
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setArray(int, Array) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setBigDecimal(int, BigDecimal) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Big  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setBlob(int, Clob) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setBoolean(int, boolean) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Boolean | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setByte(int, byte) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Byte | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setBytes(int, byte[]) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Byte[] | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setClob(int, Clob) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.Statement#setCursorName(String) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| name | String | The new cursor name, which must be unique within a connection. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setDate(int, Date) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setDate(int, Date, Calendar) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
| time  | String | A 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 as PST,EST, andGMT), long IDs (such asUS/PacificandAmerica/Los_Angeles), and
    offsets (such asGMT+6:30). | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setDouble(int, double) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Number | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.Statement#setEscapeProcessing(boolean) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| enable | Boolean | If true, escape processing is enabled; otherwise it is disabled. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.Statement#setFetchDirection(int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| direction | Integer | The specified direction to set, which is either Jdbc.ResultSet.FETCH_FORWARDorJdbc.ResultSet.FETCH_REVERSE. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.Statement#setFetchSize(int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| rows | Integer | The number of rows to fetch. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setFloat(int, float) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Number | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setInt(int, int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Integer | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setLong(int, long) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Integer | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.Statement#setMaxFieldSize(int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| max | Integer | The 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.Statement#setMaxRows(int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| max | Integer | The 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setNClob(int, NClob) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setNString(int, String) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | String | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setNull(int, int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| sql  | Integer | The SQL type of the specified parameter. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setNull(int, int, String) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| sql  | Integer | The SQL type of the specified parameter. | 
| type  | String | The fully-qualifed name of an SQL user-defined type. Ignored if the parameter
    isn't a user-defined type or REF. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setObject(int, Object) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| index | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Object | The object containing the value to set the parameter to. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setObject(int, Object, int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Object | The object containing the value to set the parameter to. | 
| target  | Integer | The SQL type to send to the database. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setObject(int, Object, int, int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Object | The object containing the value to set the parameter to. | 
| target  | Integer | The SQL type to send to the database. The scale argument may further qualify this type. | 
| scale  | Integer | The number of digits after the decimal for DECIMALorNUMERICtypes, or the length of data forInput orReadertypes.
    Ignored for all other types. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.Statement#setPoolable(boolean) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| poolable | Boolean | If true, 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.Statement#setQueryTimeout(int) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| seconds | Integer | The 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 following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setRef(int, Ref) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The SQL REFvalue to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setRowId(int, RowId) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setSQLXML(int, SQLXML) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setShort(int, short) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | Integer | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setString(int, String) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | String | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setTime(int, Time) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setTime(int, Time, Calendar) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
| time  | String | A 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 as PST,EST, andGMT), long IDs (such asUS/PacificandAmerica/Los_Angeles), and
    offsets (such asGMT+6:30). | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setTimestamp(int, Timestamp) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setTimestamp(int, Timestamp, Calendar) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x |  Jdbc  | The parameter value to set. | 
| time  | String | A 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 as PST,EST, andGMT), long IDs (such asUS/PacificandAmerica/Los_Angeles), and
    offsets (such asGMT+6:30). | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request
 set  
 
 For documentation of this method, see  java.sql.PreparedStatement#setURL(int, URL) 
 
.
Parameters
| Name | Type | Description | 
|---|---|---|
| parameter  | Integer | The index of the parameter to set (the first parameter is 1, the second is 2, and so on). | 
| x | String | The parameter value to set. | 
Authorization
Scripts that use this method require authorization with one or more of the following scopes :
-  https://www.googleapis.com/auth/script.external_request

