DapperLib / DapperLib/Dapper

Not working with RETURNING statement on SQLite

Open
#1,877 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C#
Stars
18.4k
Forks
3.7k
Avg merge
5h 8m
Merged PRs (30d)
1

Description

Using latest SQLite (and the Dapper too) and anything is OK except that I've managed no way to return data on insertion. No data inserted and nothing returned.

SQLite have a RETURNING construction (which is near same as SQL Server INSERTED) and it used like this INSERT INTO Materials (Name) VALUES ('test'),('test2') RETURNING ID (you can check it there). Neither .Query() nor .QueryMultiple() works as expected within RETURNING while in sqlite shell all is OK.

UPDATE
Noticed that nothing works inside of using withing readers of .QueryMultiple() nor .ExecuteReader().

Contributor guide

No contributing guide indexed for this repository

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 by reproducing the INSERT ... RETURNING example in SQLite, then compare Dapper's Query(), QueryMultiple(), and ExecuteReader() behavior, including readers used inside using blocks. Done means the insertion returns data consistently through the affected Dapper APIs, matching the SQLite shell behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp, sqlite
Domain
databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.