square / sqlbrite

A lightweight wrapper around SQLiteOpenHelper which introduces reactive stream semantics to SQL operations.
https://square.github.io/sqlbrite/3.x/sqlbrite/
Apache License 2.0
4.57k stars 419 forks source link

Does brite database support update or insert method ? #206

Closed Kritartha closed 7 years ago

Kritartha commented 7 years ago

If a row with a particular primary key is not present then it should create a new row like other DBs. Is there any method to execute this ?

JakeWharton commented 7 years ago

This question is not specific to SQL Brite. Please ask general Android DB usage questions on StackOverflow. You can use the CONFLICT_REPLACE strategy on your insert for this behavior.

Kritartha commented 7 years ago

Alright. Thanks Jake.

On 19 Jul 2017 7:33 p.m., "Jake Wharton" notifications@github.com wrote:

This question is not specific to SQL Brite. Please ask general Android DB usage questions on StackOverflow. You can use the CONFLICT_REPLACE strategy on your insert for this behavior.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/square/sqlbrite/issues/206#issuecomment-316397431, or mute the thread https://github.com/notifications/unsubscribe-auth/AZOf8dLUCvRXLg0SgMMBL2DhSlvauedJks5sPgx9gaJpZM4OcuSw .