sparklemotion / sparklemotion/sqlite3-ruby

execute_batch returns the result of the last statement

Open
#243 1 comment 0 reactions 0 assignees View on GitHub

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.

  1. Would it be better to return the result of the last statement instead?
  2. 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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.