Skip to content

Commit a1b0e63

Browse files
committed
new readme
1 parent a3c58ab commit a1b0e63

File tree

3 files changed

+119
-39
lines changed

3 files changed

+119
-39
lines changed

.idea/misc.xml

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 95 additions & 37 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ while (res.moveToNext()) {
142142

143143

144144
### Get/Read one row data:
145-
To get all column data from a row, call ```getOneRowData(rowID)```. It will return the data as a Cursor object. You can then retrieve each column data from the cursor.
145+
To get data from a row, call ```getOneRowData(rowID)``` or ```getOneRowData(columnNumber, valueToMatchWithTheColumn)``` or ```getOneRowData(columnName, valueToMatchWithTheColumn)```. It will return the data as a Cursor object. You can then retrieve each column data from the cursor.
146146
Example:
147147
```
148148
Cursor res = easyDB.getOneRowData(1);
@@ -154,6 +154,28 @@ if (res != null) {
154154
}
155155
```
156156

157+
or
158+
159+
Cursor res = easyDB.getOneRowData(1, "1");
160+
if (res != null) {
161+
res.moveToFirst(); // Because here's only one row data
162+
String ID = res.getString(0); // Column 0 is the ID column
163+
String c1 = res.getString(1);
164+
String c2 = res.getString(2);
165+
}
166+
```
167+
168+
or
169+
170+
Cursor res = easyDB.getOneRowData("ID", "1");
171+
if (res != null) {
172+
res.moveToFirst(); // Because here's only one row data
173+
String ID = res.getString(0); // Column 0 is the ID column
174+
String c1 = res.getString(1);
175+
String c2 = res.getString(2);
176+
}
177+
```
178+
157179
### Match data from multiple columns:
158180
To check if some values exist or not in the database, first call ```getAllColumns()``` to get all the column names like this:
159181

0 commit comments

Comments
 (0)