sword GCILobWrite2(
GCISvcCtx *svchp,
GCIError *errhp,
GCILobLocator *locp,
gbsub8 *byte_amtp,
gbsub8 *char_amtp,
gbsub8 offset,
void *bufp,
gbsub8 buflen,
ub1 piece,
void *ctxp,
GCICallbackLobWrite2 (cbfp)
(void *ctxp,
void *bufp,
oraub8 *lenp,
ub1 *piecep
void **changed_bufpp,
oraub8 *changed_lenp
),
ub2 csid,
ub1 csfrm
);
GBase 8s GCI 接口使用指南
南大通用数据技术股份有限公司 78
写入内容到一个大对象中,暂不支持大于4G的LOB对象。
参数
输入
/输出
svchp
输入/输出
上下文句柄指针
errhp
输入/输出
错误信息句柄,该接口调用失败时,错误信息会保存在错误句
柄中
locp
输入/输出
存储大对象描述符指针
byte_amtp
输入/输出
该参数为输入输出参数,当调用函数时,该参数表明想写入的字
节数,当函数执行完成后,GCI 会回填实际写入的字节数.对于
CLOB,仅在char_amtp 为零时使用
char_amtp
输入/输出
对于CLOB,该参数表示想读取的字节数,函数执行完以后,该参数
为实际读到的字节数
offset
输入
从大对象开始位置到当前位置的偏移量,以字节为单位
bufp
输入
存放要写的数据缓冲区指针
buflen
输入
bufp参数指向的缓冲区大小
piece
输入
正在写入缓冲区的哪一部分。此参数的默认值为
GCI_ONE_PIECE,表示将缓冲区写入单个块中。
对于分段或回调模式可以使GCI_FIRST_PIECE,
GCI_NEXT_PIECE,和GCI_LAST_PIECE
ctxp
输入
回调函数的参数,可以NULL
cbfp
输入
可以注册的回调函数,可以在逐段写入LOB 数据。如果是
NULL,则使用标准轮询方法。
回调函数必须返回GCI_CONTINUE 才能继续读取。如果返回
任何其他错误代码,则将终止LOB 写入。
回调采用以下参数:
ctxp(输入)
回调函数的参数。可以NULL。
bufp (输入/输出)
片段的缓冲区指针。
lenp (输入/输出)
缓冲区(输入)中数据的长度(以字节为单位)。
piecep(输出)
哪一块:GCI_NEXT_PIECE 或GCI_LAST_PIECE。
changed_bufpp(输出)
保留参数,目前不适用(仅用于和Oracle 调用保持兼容)
changed_lenp(输出)
保留参数,目前不适用(仅用于和Oracle 调用保持兼容)
csid
输入
保留参数,目前不适用(仅用于和Oracle调用保持兼容)
csfrm
输入
保留参数,目前不适用(仅用于和Oracle调用保持兼容)
如果执行成功,返回 GCI_SUCCESS,否则返回 GCI_ERROR。