sparklemotion / sparklemotion/sqlite3-ruby
Add incremental blob support
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 845
- Forks
- 220
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 3
Description
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))"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names the bind_zeroblob, blob_open, and blob.write entry points but no implementation files or tests. Start by locating the existing Ruby SQLite binding code for these operations and compare it with SQLite's incremental BLOB API. Done means the shown reserve, open, read/write workflow is supported and covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, sqlite
- Domain
- databases
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100