예제 #1
0
/*
 *  Returns the chunk size of a LOB.
 *
 *  @see http://docs.oracle.com/database/121/ARPLS/d_lob.htm#ARPLS66706 DBMS_LOB.GETCHUNKSIZE
 *  @return [Integer]
 */
static VALUE oci8_lob_get_chunk_size(VALUE self)
{
    oci8_lob_t *lob = TO_LOB(self);
    oci8_svcctx_t *svcctx = check_svcctx(lob);
    ub4 len;

    chker2(OCILobGetChunkSize_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, &len),
           &svcctx->base);
    return UINT2NUM(len);
}
예제 #2
0
파일: lob.c 프로젝트: aq1018/ruby-oci8
static VALUE oci8_lob_get_chunk_size(VALUE self)
{
    if (have_OCILobGetChunkSize_nb) {
        oci8_lob_t *lob = DATA_PTR(self);
        oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
        ub4 len;

        oci_lc(OCILobGetChunkSize_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, &len));
        return UINT2NUM(len);
    } else {
        rb_notimplement();
    }
}