Skip to content

fix(sqlite): support RETURNING clauses in write queries (#243) - #246

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/243-sqlite-returning
Jul 8, 2026
Merged

fix(sqlite): support RETURNING clauses in write queries (#243)#246
ZhuchkaTriplesix merged 1 commit into
devfrom
issue/243-sqlite-returning

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

This PR resolves #243 by adding support for SQLite RETURNING clauses (introduced in SQLite 3.35.0) in write operations (INSERT, UPDATE, and DELETE).

Changes

  • Updated SqliteConnection.execute to check if the query contains the word returning.
  • Forward such queries to _db!.rawQuery(sql, arguments) instead of _db!.execute(sql, arguments). This ensures that rows produced by the RETURNING clause are correctly returned to the client/workspace.
  • Standard read-only connection check still applies (blocks RETURNING queries if connection is opened as read-only).
  • Added a new unit test verifying INSERT, UPDATE, and DELETE queries with RETURNING clauses in test/core/database/sqlite_connection_test.dart.
  • Updated CHANGELOG.md.

@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit d38ce73 into dev Jul 8, 2026
4 checks passed
@ZhuchkaTriplesix ZhuchkaTriplesix self-assigned this Jul 12, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix deleted the issue/243-sqlite-returning branch July 26, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant