Last active
May 24, 2017 17:04
-
-
Save sourabhv/02d1554313aed0cae998a03379e8d9a1 to your computer and use it in GitHub Desktop.
Repository Design Pattern in Android using RxJava, Retrofit, SQLBrite and SQLDelight
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE address ( | |
id INTEGER NOT NULL, | |
name TEXT NOT NULL, | |
line1 TEXT NOT NULL, | |
line2 TEXT, | |
landmark TEXT, | |
city TEXT NOT NULL, | |
country TEXT NOT NULL, | |
pincode INTEGER NOT NULL, | |
PRIMARY KEY(id) ON CONFLICT REPLACE | |
); | |
insertRow: | |
INSERT INTO address(id, name, line1, line2, landmark, city, country, pincode) | |
VALUES (?, ?, ?, ?, ?, ?, ?, ?); | |
selectAll: | |
SELECT * | |
FROM address; | |
selectById: | |
SELECT * | |
FROM address | |
WHERE id=?; | |
deleteById: | |
DELETE FROM address | |
WHERE id=?; | |
deleteAll: | |
DELETE FROM address; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment