sparklemotion / sparklemotion/sqlite3-ruby
execute_batch returns the result of the last statement
Open
Nobody has claimed this yet.
feature
- Dominant language
- Ruby
- Stars
- 845
- Forks
- 220
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 3
Description
Currently execute_batch always return nil.
- Would it be better to return the result of the last statement instead?
- Would it make sense to accept a list of statements as well? For example:
db.execute_batch [
"PRAGMA empty_result_callbacks=1",
"CREATE TABLE t1(a,b)",
"CREATE INDEX t1i3 ON t1(a,b)",
"INSERT INTO t1 VALUES(1, 2)",
"SELECT * FROM t1",
]
or simply db.execute [...]?
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
Start at the execute_batch entry point and inspect how its current return value and statement inputs are handled. Check for existing execute_batch tests; the work is complete only after the project decides between the proposed return and input semantics and tests cover the selected behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- ruby, sqlite
- Domain
- database
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100