Closed bsolarski closed 4 days ago
It hasn't been high on any list. What's your use case? Do your (other) apps use BFILE?
I have a microservice that processes binary files, which in most cases are stored as blobs. Sometimes, however, the files are saved as BFILE and my service cannot read them (BFILE isn't supported) . TO_BLOB returns error ORA-00932: inconsistent datatypes: expected BINARY got FILE. My problem would be solved if I can read the BFILE from the database in a similar way to the BLOB
I've marked it as an enhancement request. I'll let @cjbj decide where it goes in the list of priorities!
Currently i solved this problem by plsql function which takes bfile and returns blob, so my problem is not critical:
FUNCTION bfile_to_blob (
p_bfile BFILE
) RETURN BLOB IS
z_bfile BFILE := p_bfile;
z_dest_loc BLOB;
BEGIN
dbms_lob.createtemporary(z_dest_loc, true);
dbms_lob.open(z_bfile, dbms_lob.lob_readonly);
dbms_lob.loadfromfile(dest_lob => z_dest_loc, src_lob => z_bfile, amount => dbms_lob.getlength(z_bfile));
dbms_lob.close(z_bfile);
RETURN z_dest_loc;
END;
BFILE Support is available in node-oracledb 6.6
Are there any plans for support for bfile types?