Class JdbcClob

JdbcClob

JDBC Clob。如需這個類別的說明文件,請參閱 java.sql.Clob

方法

方法傳回類型簡短說明
free()void如需這個方法的說明文件,請參閱 java.sql.Clob#truncate(long)
getAppsScriptBlob()Blob以 Apps Script Blob 形式取得這個 JdbcClob 的內容。
getAs(contentType)Blob以轉換為指定內容類型的 Blob 形式,傳回這個物件內的資料。
getSubString(position, length)String如需這個方法的說明文件,請參閱 java.sql.Clob#getSubString(long, int)
length()Integer如需這個方法的說明文件,請參閱 java.sql.Clob#length()
position(search, start)Integer如需這個方法的說明文件,請參閱 java.sql.Clob#position(Clob, long)
position(search, start)Integer如需這個方法的說明文件,請參閱 java.sql.Clob#position(String, long)
setString(position, blobSource)IntegerJdbcClob 寫入 CLOB 的便利方法。
setString(position, blobSource, offset, len)IntegerJdbcClob 寫入 CLOB 的便利方法。
setString(position, value)Integer如需這個方法的說明文件,請參閱 java.sql.Clob#setString(long, String)
setString(position, value, offset, len)Integer如需這個方法的說明文件,請參閱 java.sql.Clob#setString(long, String, int, int)
truncate(length)void如需這個方法的說明文件,請參閱 java.sql.Clob#truncate(long)

內容詳盡的說明文件

free()

如需這個方法的說明文件,請參閱 java.sql.Clob#truncate(long)


getAppsScriptBlob()

以 Apps Script Blob 形式取得這個 JdbcClob 的內容。

回攻員

Blob:可供其他 Apps Script API 直接使用的 Blob


getAs(contentType)

以轉換為指定內容類型的 Blob 形式,傳回這個物件內的資料。這個方法會在檔案名稱中加入適當的副檔名,例如「myfile.pdf」。不過,系統會假設檔案名稱中最後一個半形句點 (如有) 後方的部分是現有副檔名,應予以取代。因此,「ShoppingList.12.25.2014」會變成「ShoppingList.12.25.pdf」。

如要查看每日轉換配額,請參閱「Google 服務配額」。新建立的 Google Workspace 網域可能暫時會受到較嚴格的配額限制。

參數

名稱類型說明
contentTypeString要轉換成的 MIME 類型。對於大多數 Blob 而言,'application/pdf' 是唯一有效的選項。如果是 BMP、GIF、JPEG 或 PNG 格式的圖片,'image/bmp''image/gif''image/jpeg''image/png' 也有效。如果是 Google 文件,'text/markdown' 也有效。

回攻員

Blob - 以 Blob 形式呈現的資料。


getSubString(position, length)

如需這個方法的說明文件,請參閱 java.sql.Clob#getSubString(long, int)

參數

名稱類型說明
positionInteger要擷取子字串的第一個字元索引。第一個字元的索引為 1。
lengthInteger要複製的連續字元數 (必須大於或等於 0)。

回攻員

String:擷取的子字串。


length()

如需這個方法的說明文件,請參閱 java.sql.Clob#length()

回攻員

Integer:這個 CLOB 的長度 (以字元為單位)。


position(search, start)

如需這個方法的說明文件,請參閱 java.sql.Clob#position(Clob, long)

參數

名稱類型說明
searchJdbcClob要搜尋的 clob 物件。
startInteger開始搜尋的位置,第一個位置為 1。

回攻員

Integer:指定 clob 出現的位置,如果不存在則為 -1。


position(search, start)

如需這個方法的說明文件,請參閱 java.sql.Clob#position(String, long)

參數

名稱類型說明
searchString要搜尋的子字串。
startInteger開始搜尋的位置,第一個位置為 1。

回攻員

Integer:指定子字串出現的位置,如果不存在則為 -1。


setString(position, blobSource)

JdbcClob 寫入 CLOB 的便利方法。

參數

名稱類型說明
positionInteger開始寫入 CLOB 的位置,第一個位置為 1。
blobSourceBlobSource要寫入的 Blob 來源。

回攻員

Integer:寫入的字元數。


setString(position, blobSource, offset, len)

JdbcClob 寫入 CLOB 的便利方法。

參數

名稱類型說明
positionInteger開始寫入 CLOB 的位置,第一個位置為 1。
blobSourceBlobSource要寫入的 Blob 來源。
offsetInteger從提供的字串開始讀取要寫入的字元時的位移。
lenInteger要寫入的字元數。

回攻員

Integer:寫入的字元數。


setString(position, value)

如需這個方法的說明文件,請參閱 java.sql.Clob#setString(long, String)

參數

名稱類型說明
positionInteger開始寫入 CLOB 的位置,第一個位置為 1。
valueString要寫入的字串。

回攻員

Integer:寫入的字元數。


setString(position, value, offset, len)

如需這個方法的說明文件,請參閱 java.sql.Clob#setString(long, String, int, int)

參數

名稱類型說明
positionInteger開始寫入 CLOB 的位置,第一個位置為 1。
valueString要寫入的字串。
offsetInteger從提供的字串開始讀取要寫入的字元時的位移。
lenInteger要寫入的字元數。

回攻員

Integer:寫入的字元數。


truncate(length)

如需這個方法的說明文件,請參閱 java.sql.Clob#truncate(long)

參數

名稱類型說明
lengthInteger截斷後這個 CLOB 的大小 (以位元組為單位)。