OCI8::BFILE
This is a lob locator to read/write binary data to/from BFILE column. This instance is automatically generated by select statement.
Instance Methods
exists?
dir_alias
dir_alias = name
filename
filename = name
read(size = nil)
read at most size bytes from BFILE, or to the end of file if size is omitted.
conn.exec("SELECT name, image FROM photo") do |name, image|
File.open(name, 'w') do |f|
f.write(image.read)
end
end
size
return the size of the BFILE.
pos
return the current offset of the BFILE.
pos = number
set the current offset of the BFILE.
eof?
true if the current offset is at the end of the BFILE.
tell
synonym for pos.
seek(pos)
synonym for pos=.
rewind
set the current offset to zero.
Keyword(s):
References:[SideMenu] [ruby-oci8 API]