Fixed
Status Update
Comments
fa...@gmail.com <fa...@gmail.com> #2
The generated dao code has this line:
_observer = new Observer("book","split")
I think annotation processor should handle this type usages of FROM clause.
I found a workaround for this problem. I created an unused entity named "Split" and it works.
_observer = new Observer("book","split")
I think annotation processor should handle this type usages of FROM clause.
I found a workaround for this problem. I created an unused entity named "Split" and it works.
yb...@google.com <yb...@google.com> #3
yea we should fix the query parser to understand WITH. Btw, WITH queries are available only in recent versions of SQLite (need to double check but i think it was android 21 +).
yb...@google.com <yb...@google.com> #4
Yigit, I think you assigned this bug to me by mistake. I do not work on this project.
yb...@google.com <yb...@google.com> #5
sorry, bad autocomplete :/.
yb...@google.com <yb...@google.com>
sh...@google.com <sh...@google.com>
sh...@google.com <sh...@google.com>
sh...@gmail.com <sh...@gmail.com> #6
shaileshprasad601@gmail.com updation and bachelor uptodate Country INDIA 800020 on 20.10.2017 with ids TxPy id AJGPP7219K UIDAI 548028010019 voters id JDK1934249 please uptodate in your records.
em...@gmail.com <em...@gmail.com> #7
The House of Books is a haven for book lovers, filled with timeless stories and knowledge. From bestsellers to rare collections, there's something for everyone. Explore captivating tales, expand your horizons, and get lost in the magic of reading. Visit us today and find your next favorite book. Visit https://houseofbooks.pk/products/stories-from-quran-of-prophets-20-pcs-books-set
Description
Version used: 1.0.0-alpha2
Devices/Android versions reproduced on: Emulator 26
Room with LiveData throws exception on "WITH" clause. I think LiveData tries to register on the name of WITH clause as if it is a table. Same SQL query works with Room without LiveData.
SQL query:
WITH split(i,l,c,r) AS (
SELECT book.bookId, 1, author||'|', '' FROM book
UNION ALL
SELECT i,
instr(c,'|') AS vLen,
substr(c,instr(c,'|')+1) AS vRem,
substr(c,1,instr(c,'|')-1) AS vCSV
FROM split
WHERE vLen>0
)
SELECT DISTINCT split.r FROM book , split
WHERE book.bookId=split.i AND split.r<>''
ORDER BY split.r
Table example:
CREATE TABLE book (
bookId INTEGER PRIMARY KEY,
author TEXT
);
INSERT INTO book (author) VALUES
('|A||B||C|'),
('|A||D|'),
('|B||D|');
Exception:
FATAL EXCEPTION: pool-2-thread-1
Process: tr.name.fatihdogan.books.debug, PID: 15674
java.lang.IllegalArgumentException: There is no table with name split
at android.arch.persistence.room.InvalidationTracker.addObserver(InvalidationTracker.java:228)
at android.arch.persistence.room.InvalidationTracker.addWeakObserver(InvalidationTracker.java:255)
at tr.name.fatihdogan.books.repository.BookDao_Impl$7.compute(BookDao_Impl.java:621)
at tr.name.fatihdogan.books.repository.BookDao_Impl$7.compute(BookDao_Impl.java:609)
at android.arch.lifecycle.ComputableLiveData$2.run(ComputableLiveData.java:87)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)