We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BLOB-reading/writing can be done apart from SQL-Queries.
EXAMPLE:
..
filename = "test.png"
stmt = db.prepare("insert into files (filename, data) values (:filename,:data)") stmt.bind_param("filename", filename) stmt.bind_zeroblob("data", File.size(filename) stmt.execute
f = File.new(filename, "w")
blob = db.blob_open('main','files','data',db.last_insert_row_id,1) result = blob.write(f.read)
The space of the BLOB MUST be reserved. This can be done inside a SQL-query to:
"insert into files (filename, data) values ('test.png', zeroblob(2442))"
Moved from RubyForge
The text was updated successfully, but these errors were encountered:
No branches or pull requests
BLOB-reading/writing can be done apart from SQL-Queries.
EXAMPLE:
..
filename = "test.png"
stmt = db.prepare("insert into files (filename, data) values (:filename,:data)")
stmt.bind_param("filename", filename)
stmt.bind_zeroblob("data", File.size(filename)
stmt.execute
f = File.new(filename, "w")
blob = db.blob_open('main','files','data',db.last_insert_row_id,1)
result = blob.write(f.read)
..
The space of the BLOB MUST be reserved. This can be done inside a SQL-query to:
"insert into files (filename, data) values ('test.png', zeroblob(2442))"
Moved from RubyForge
The text was updated successfully, but these errors were encountered: