A lightweight wrapper around SQLiteOpenHelper which introduces reactive stream semantics to SQL operations
Questions tagged [sqlbrite]
46 questions
1
vote
1 answer
Sequence of API calls through observable
Hi I'm trying to get two observable to be called in sequence, one after the other. I tried using merge but it does not respect order so I went and used concat instead, the main problem is that these two Observable emit different types. From what…

Necronet
- 6,704
- 9
- 49
- 89
1
vote
1 answer
Does SQLBrite close cursor automatically?
I have the doubt to wether sqlbrite close cursor automatically, it seems that it doesn't do it since I keep getting :
java.lang.Throwable: Explicit termination method 'close' not called at
dalvik.system.CloseGuard.open(CloseGuard.java:180) at
…

Necronet
- 6,704
- 9
- 49
- 89
1
vote
0 answers
Could not allocate CursorWindow of size 2097152 due to error -24
im using SqlBrite with Dagger and after minimize application and try to query items i have that error.
i have that query in every query:
try {....} finally { cursor.close();}
i tried closing db in onPause() but i didnt help.
error is reproducible…

koowalsky
- 311
- 1
- 3
- 14
1
vote
1 answer
pthread_create failed: couldn't allocate 1064960-byte stack: Out of memory
I have two fragments where inside both of these fragments, it will execute codes that utilize sqlbrite. While the app won't crash in normal usage, but the problem is, if I load these 2 fragments back-and-forth multiple times in a short period, the…

imin
- 4,504
- 13
- 56
- 103
1
vote
1 answer
Proper way to filter database items using RxAndroid
I’m using the sample provided and have tweaked the code to my requirement. I’m learning Rx and not completely familiar with how it works. So, in my fragment I have
private static String LIST_QUERY = "SELECT * FROM " + TodoItem.TABLE;
And my…

Saifur Rahman Mohsin
- 929
- 1
- 11
- 37
1
vote
1 answer
Closing database connection with SqlBright
I'm migrating the following pattern of accessing the Android app's SQLite database into the RxJava world:
public List doStuff(){
synchronized (lock) {
open(); // this effectively checks for isOpen() then calls…

vkislicins
- 3,331
- 3
- 32
- 62
1
vote
1 answer
Why SQLBRITE and why we use it instead of SQLite?
I am new to android to SQL Brite. i need to learn about SQLBrite how to use and why to use it.I searched in google but there is not much explanation about it only some GitHub codes which is very difficult to understand.
anyone please explain about…

Niroj
- 1,114
- 6
- 29
1
vote
1 answer
Prefix getter and setter with sqldelight
Is it possible to configure sqldelight to prefix all the getters and setters?
CREATE TABLE foo {
bar TEXT
}
bar() -> getBar()

Tobias
- 7,282
- 6
- 63
- 85
1
vote
1 answer
Combine two observables without using toList() because of SQLBrite under the hood
1) I have method Observable> moviesWithoutGenres() which returns List of movies but movie's genres field is null
2) I have method Observable> movieGenres(Movie m) that returns list of genres for specified field
I need to implement method that should…

Anton K
- 102
- 1
- 8
1
vote
1 answer
SqlBrite Queries on Worker Threads
I'm still somewhat new to rxAndroid/rxJava so I'm having a little trouble wrapping my mind around this and if I'm doing everything correctly.
I am using SqlBrite to update a RecyclerView with rows returned from a Cursor. When a db operation is…

tylerjroach
- 2,699
- 4
- 19
- 24
1
vote
1 answer
Concat different types of observables
I want to concat different observables to create an activity flow, using SQLBrite to persist informations into my android sqlite database
This flow have to follow this sequence of avtivities:
1 - Create an observable responsible to open an instance…

pablobaldez
- 924
- 14
- 22
1
vote
0 answers
How to get context of database table change when notified by SQLBrite (e.g. what row changed and if it was added or deleted?)
Example use case: we have a list of messages that can change status (read/unread). New messages can appear anywhere in the list, and messages can also be deleted locally or from the backend by some other means.
The way we’ve implemented this now, we…

Jonathan Fuerth
- 2,080
- 2
- 18
- 21
1
vote
0 answers
Different betweet using sqlbrite and content observer
I'm reading the intruduction about sqlbrite and RxJava. I'm wondering what's the difference between using sqlbrite and content observer to do something like montoring sms database's changes. What I've known is, maybe, in sqlbrite, Observables won't…

Richthofen80
- 11
- 1
0
votes
1 answer
Observable do not call onComplete (sqlbrite - mapToOneOrDefault)
I have select from sqlbrite db but observable do not call onComplete for some reason.
My code:
fun BriteDatabase.selectDayTimelineRecord(dayTimestamp: Long) =
createQuery(table_timeline,…

pavol.franek
- 1,396
- 3
- 19
- 42
0
votes
1 answer
Can I Use SupportSQLiteOpenHelper to open a database in the Internal Directory or from the Assets Folder?
I have a pre-populated database file with over 100 tables. I usually use SQLiteDatabase to read and write from the db file but currently, I was checking on how to use SQLite to include using reactive queries etc...
the problem is that all the…

Rashad.Z
- 2,494
- 2
- 27
- 58