sqldelight icon indicating copy to clipboard operation
sqldelight copied to clipboard

It's looks like `INSERT INTO ...VALUES(...) RETURNING id;` not working with coroutines flow

Open hanrw opened this issue 1 year ago • 1 comments

SQLDelight Version

2.0.1

Application Operating System

Native

Describe the Bug

coroutines part

 db.queries.selectAllName(query = name).asFlow()
            .mapToList(ioDispatcher)

sql part

INSERT INTO ...VALUES(...) RETURNING id;

problem: db.queries.selectAllName will emit new inserted data BUT it's working without RETURNING id

Stacktrace

No errors

hanrw avatar Jan 22 '24 12:01 hanrw

🕊️ From the description it could be this existing issue/bug - where INSERT INTO ...VALUES(...) RETURNING id; statements don't create an emit table notification for use in Flow https://github.com/cashapp/sqldelight/issues/3743 https://github.com/cashapp/sqldelight/discussions/4618

griffio avatar Jan 22 '24 19:01 griffio