This service allows scripts to connect to JDBC-compliant databases, including Google Cloud SQL, MySQL, Microsoft SQL Server, and Oracle. See also the guide to JDBC.
Classes
Name | Brief description |
---|---|
Jdbc | The JDBC service allows scripts to connect to Google Cloud SQL, MySQL, Microsoft SQL Server, and Oracle databases. |
JdbcArray | A JDBC Array . |
JdbcBlob | A JDBC Blob . |
JdbcCallableStatement | A JDBC CallableStatement . |
JdbcClob | A JDBC Clob . |
JdbcConnection | A JDBC Connection . |
JdbcDatabaseMetaData | A JDBC DatabaseMetaData . |
JdbcDate | A JDBC Date . |
JdbcParameterMetaData | A JDBC ParameterMetaData . |
JdbcPreparedStatement | A JDBC PreparedStatement . |
JdbcRef | A JDBC Ref . |
JdbcResultSet | A JDBC ResultSet . |
JdbcResultSetMetaData | A JDBC ResultSetMetaData . |
JdbcRowId | A JDBC RowId . |
JdbcSQLXML | A JDBC SQLXML . |
JdbcSavepoint | A JDBC Savepoint . |
JdbcStatement | A JDBC Statement . |
JdbcStruct | A JDBC Struct . |
JdbcTime | A JDBC Time . |
JdbcTimestamp | A JDBC Timestamp . |
Class Jdbc
Methods
Method | Return type | Brief description |
---|---|---|
getCloudSqlConnection(url) | JdbcConnection | Attempts to establish a connection to the given Google Cloud SQL URL. |
getCloudSqlConnection(url, info) | JdbcConnection | Attempts to establish a connection to the given Google Cloud SQL URL. |
getCloudSqlConnection(url, userName, password) | JdbcConnection | Attempts to establish a connection to the given Google Cloud SQL URL. |
getConnection(url) | JdbcConnection | Attempts to establish a connection to the given database URL. |
getConnection(url, info) | JdbcConnection | Attempts to establish a connection to the given database URL. |
getConnection(url, userName, password) | JdbcConnection | Attempts to establish a connection to the given database using a username and password. |
newDate(milliseconds) | JdbcDate | Create a date from milliseconds since epoch. |
newTime(milliseconds) | JdbcTime | Create a time from milliseconds since epoch. |
newTimestamp(milliseconds) | JdbcTimestamp | Create a timestamp from milliseconds since epoch. |
parseDate(date) | JdbcDate | Create a date by parsing the SQL date string. |
parseTime(time) | JdbcTime | Create a time by parsing the SQL time string. |
parseTimestamp(timestamp) | JdbcTimestamp | Create a timestamp by parsing the SQL timestamp string. |
Class JdbcArray
Methods
Method | Return type | Brief description |
---|---|---|
free() | void | For documentation of this method, see java.sql.Array#free() . |
getArray() | Object | For documentation of this method, see java.sql.Array#getArray() . |
getArray(index, count) | Object | For documentation of this method, see java.sql.Array#getArray(long, int) . |
getBaseType() | Integer | For documentation of this method, see java.sql.Array#getBaseType() . |
getBaseTypeName() | String | For documentation of this method, see java.sql.Array#getBaseTypeName() . |
getResultSet() | JdbcResultSet | For documentation of this method, see java.sql.Array#getResultSet() . |
getResultSet(index, count) | JdbcResultSet | For documentation of this method, see java.sql.Array#getResultSet(long, int) . |
Class JdbcBlob
Methods
Method | Return type | Brief description |
---|---|---|
free() | void | For documentation of this method, see java.sql.Blob#free() . |
getAppsScriptBlob() | Blob | Gets the content of this JdbcBlob as an Apps Script blob. |
getAs(contentType) | Blob | Return the data inside this object as a blob converted to the specified content type. |
getBytes(position, length) | Byte[] | For documentation of this method, see java.sql.Blob#getBytes(long, int) . |
length() | Integer | For documentation of this method, see java.sql.Blob#length() . |
position(pattern, start) | Integer | For documentation of this method, see java.sql.Blob#position(byte[], long) . |
position(pattern, start) | Integer | For documentation of this method, see java.sql.Blob#position(java.sql.Blob, long) . |
setBytes(position, blobSource) | Integer | Convenience method for BlobSources. |
setBytes(position, blobSource, offset, length) | Integer | Convenience method for BlobSources. |
setBytes(position, bytes) | Integer | For documentation of this method, see java.sql.Blob#setBytes(long, byte[]) . |
setBytes(position, bytes, offset, length) | Integer | For documentation of this method, see java.sql.Blob#setBytes(long, byte[], int, int) . |
truncate(length) | void | For documentation of this method, see java.sql.Blob#truncate(long) . |
Class JdbcCallableStatement
Methods
Class JdbcClob
Methods
Method | Return type | Brief description |
---|---|---|
free() | void | For documentation of this method, see java.sql.Clob#free() . |
getAppsScriptBlob() | Blob | Gets the content of this JdbcClob as an Apps Script blob. |
getAs(contentType) | Blob | Return the data inside this object as a blob converted to the specified content type. |
getSubString(position, length) | String | For documentation of this method, see java.sql.Clob#getSubString(long, int) . |
length() | Integer | For documentation of this method, see java.sql.Clob#length() . |
position(search, start) | Integer | For documentation of this method, see java.sql.Clob#position(java.sql.Clob, long) . |
position(search, start) | Integer | For documentation of this method, see java.sql.Clob#position(String, long) . |
setString(position, blobSource) | Integer | Convenience method for BlobSources. |
setString(position, blobSource, offset, len) | Integer | Convenience method for BlobSources. |
setString(position, value) | Integer | For documentation of this method, see java.sql.Clob#setString(long, String) . |
setString(position, value, offset, len) | Integer | For documentation of this method, see java.sql.Clob#setString(long, String, int, int) . |
truncate(length) | void | For documentation of this method, see java.sql.Clob#truncate(long) . |
Class JdbcConnection
Methods
Class JdbcDatabaseMetaData
Methods
Class JdbcDate
Methods
Method | Return type | Brief description |
---|---|---|
after(when) | Boolean | For documentation of this method, see java.sql.Date#after(java.util.Date) . |
before(when) | Boolean | For documentation of this method, see java.sql.Date#before(java.util.Date) . |
getDate() | Integer | For documentation of this method, see java.sql.Date#getDate() . |
getMonth() | Integer | For documentation of this method, see java.sql.Date#getMonth() . |
getTime() | Integer | For documentation of this method, see java.sql.Date#getTime() . |
getYear() | Integer | For documentation of this method, see java.sql.Date#getYear() . |
setDate(date) | void | For documentation of this method, see java.sql.Date#setDate(int) . |
setMonth(month) | void | For documentation of this method, see java.sql.Date#setMonth(int) . |
setTime(milliseconds) | void | For documentation of this method, see java.sql.Date#setTime(long) . |
setYear(year) | void | For documentation of this method, see java.sql.Date#setYear(int) . |
Class JdbcParameterMetaData
Methods
Class JdbcPreparedStatement
Methods
Class JdbcRef
Methods
Method | Return type | Brief description |
---|---|---|
getBaseTypeName() | String | For documentation of this method, see java.sql.Ref#getBaseTypeName() . |
getObject() | Object | For documentation of this method, see java.sql.Ref#getObject() . |
setObject(object) | void | For documentation of this method, see java.sql.Ref#setObject(Object) . |
Class JdbcResultSet
Methods
Class JdbcResultSetMetaData
Methods
Class JdbcRowId
Methods
Method | Return type | Brief description |
---|---|---|
getBytes() | Byte[] | For documentation of this method, see java.sql.RowId#getBytes() . |
Class JdbcSQLXML
Methods
Method | Return type | Brief description |
---|---|---|
free() | void | For documentation of this method, see java.sql.SQLXML#free() . |
getString() | String | For documentation of this method, see java.sql.SQLXML#getString() . |
setString(value) | void | For documentation of this method, see java.sql.SQLXML#setString(String) . |
Class JdbcSavepoint
Methods
Method | Return type | Brief description |
---|---|---|
getSavepointId() | Integer | For documentation of this method, see java.sql.Savepoint#getSavepointId() . |
getSavepointName() | String | For documentation of this method, see java.sql.Savepoint#getSavepointName() . |
Class JdbcStatement
Methods
Class JdbcStruct
Methods
Method | Return type | Brief description |
---|---|---|
getAttributes() | Object[] | For documentation of this method, see java.sql.Struct#getAttributes() . |
getSQLTypeName() | String | For documentation of this method, see java.sql.Struct#getSQLTypeName() . |
Class JdbcTime
Methods
Method | Return type | Brief description |
---|---|---|
after(when) | Boolean | For documentation of this method, see java.sql.Time#after(java.util.Date) . |
before(when) | Boolean | For documentation of this method, see java.sql.Time#before(java.util.Date) . |
getHours() | Integer | For documentation of this method, see java.sql.Time#getHours() . |
getMinutes() | Integer | For documentation of this method, see java.sql.Time#getMinutes() . |
getSeconds() | Integer | For documentation of this method, see java.sql.Time#getSeconds() . |
getTime() | Integer | For documentation of this method, see java.sql.Time#getTime() . |
setHours(hours) | void | For documentation of this method, see java.sql.Time#setHours(int) . |
setMinutes(minutes) | void | For documentation of this method, see java.sql.Time#setMinutes(int) . |
setSeconds(seconds) | void | For documentation of this method, see java.sql.Time#setSeconds(int) . |
setTime(milliseconds) | void | For documentation of this method, see java.sql.Time#setTime(long) . |
Class JdbcTimestamp
Methods
Method | Return type | Brief description |
---|---|---|
after(when) | Boolean | For documentation of this method, see java.sql.Timestamp#after(java.sql.Timestamp) . |
before(when) | Boolean | For documentation of this method, see java.sql.Timestamp#before(java.sql.Timestamp) . |
getDate() | Integer | For documentation of this method, see java.sql.Timestamp#getDate() . |
getHours() | Integer | For documentation of this method, see java.sql.Timestamp#getHours() . |
getMinutes() | Integer | For documentation of this method, see java.sql.Timestamp#getMinutes() . |
getMonth() | Integer | For documentation of this method, see java.sql.Timestamp#getMonth() . |
getNanos() | Integer | For documentation of this method, see java.sql.Timestamp#getNanos() . |
getSeconds() | Integer | For documentation of this method, see java.sql.Timestamp#getSeconds() . |
getTime() | Integer | For documentation of this method, see java.sql.Timestamp#getTime() . |
getYear() | Integer | For documentation of this method, see java.sql.Timestamp#getYear() . |
setDate(date) | void | For documentation of this method, see java.sql.Timestamp#setDate(int) . |
setHours(hours) | void | For documentation of this method, see java.sql.Timestamp#setHours(int) . |
setMinutes(minutes) | void | For documentation of this method, see java.sql.Timestamp#setMinutes(int) . |
setMonth(month) | void | For documentation of this method, see java.sql.Timestamp#setMonth(int) . |
setNanos(nanoseconds) | void | For documentation of this method, see java.sql.Timestamp#setNanos(int) . |
setSeconds(seconds) | void | For documentation of this method, see java.sql.Timestamp#setSeconds(int) . |
setTime(milliseconds) | void | For documentation of this method, see java.sql.Timestamp#setTime(long) . |
setYear(year) | void | For documentation of this method, see java.sql.Timestamp#setYear(int) . |