Class: OCIFileLocator
Instance Method Summary
collapse
#char_width=, #clone, #close, #create_temporary, #getChunkSize, #getLength, #is_initialized?, #open, #read, #trim, #write
#attrGet, #attrSet, #free, new
Instance Method Details
#exists?(vsvc) ⇒ Boolean
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
|
# File 'ext/oci8/lob.c', line 329
static VALUE oci8_lobfile_exist_p(VALUE self, VALUE vsvc)
{
oci8_handle_t *h;
oci8_handle_t *svch;
boolean flag;
sword rv;
Get_Handle(self, h); /* 0 */
Check_Handle(vsvc, OCISvcCtx, svch); /* 1 */
rv = OCILobFileExists(svch->hp, h->errhp, h->hp, &flag);
if (rv != OCI_SUCCESS)
oci8_raise(h->errhp, rv, NULL);
return flag ? Qtrue : Qfalse;
}
|
#name(venv) ⇒ Object
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
|
# File 'ext/oci8/lob.c', line 291
static VALUE oci8_lobfile_name(VALUE self, VALUE venv)
{
oci8_handle_t *h;
oci8_handle_t *envh;
char dir_alias[31];
ub2 d_length = sizeof(dir_alias);
char filename[256];
ub2 f_length = sizeof(filename);
sword rv;
Get_Handle(self, h); /* 0 */
Check_Handle(venv, OCIEnv, envh); /* 1 */
rv = OCILobFileGetName(envh->hp, h->errhp, h->hp, (OraText*)dir_alias, &d_length, (OraText*)filename, &f_length);
if (rv != OCI_SUCCESS)
oci8_raise(h->errhp, rv, NULL);
return rb_ary_new3(2, rb_str_new(dir_alias, d_length), rb_str_new(filename, f_length));
}
|
#set_name(venv, vdir, vfile) ⇒ Object
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
|
# File 'ext/oci8/lob.c', line 310
static VALUE oci8_lobfile_set_name(VALUE self, VALUE venv, VALUE vdir, VALUE vfile)
{
oci8_handle_t *h;
oci8_handle_t *envh;
sword rv;
Get_Handle(self, h); /* 0 */
Check_Handle(venv, OCIEnv, envh); /* 1 */
StringValue(vdir); /* 2 */
StringValue(vfile); /* 3 */
rv = OCILobFileSetName(envh->hp, h->errhp, (OCILobLocator **)&h->hp,
RSTRING_ORATEXT(vdir), RSTRING_LEN(vdir),
RSTRING_ORATEXT(vfile), RSTRING_LEN(vfile));
if (rv != OCI_SUCCESS)
oci8_raise(h->errhp, rv, NULL);
return self;
}
|