File tree Expand file tree Collapse file tree 1 file changed +2
-14
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore/local Expand file tree Collapse file tree 1 file changed +2
-14
lines changed Original file line number Diff line number Diff line change @@ -205,13 +205,7 @@ long getByteSize() {
205
205
* @see https://www.sqlite.org/pragma.html#pragma_page_size
206
206
*/
207
207
private long getPageSize () {
208
- Cursor cursor = db .rawQuery ("PRAGMA page_size" , null );
209
- try {
210
- cursor .moveToFirst ();
211
- return cursor .getLong (/*column=*/ 0 );
212
- } finally {
213
- cursor .close ();
214
- }
208
+ return query ("PRAGMA page_size" ).firstValue (row -> row .getLong (/*column=*/ 0 ));
215
209
}
216
210
217
211
/**
@@ -221,13 +215,7 @@ private long getPageSize() {
221
215
* @see https://www.sqlite.org/pragma.html#pragma_page_count.
222
216
*/
223
217
private long getPageCount () {
224
- Cursor cursor = db .rawQuery ("PRAGMA page_count" , null );
225
- try {
226
- cursor .moveToFirst ();
227
- return cursor .getLong (/*column=*/ 0 );
228
- } finally {
229
- cursor .close ();
230
- }
218
+ return query ("PRAGMA page_count" ).firstValue (row -> row .getLong (/*column=*/ 0 ));
231
219
}
232
220
233
221
/**
You can’t perform that action at this time.
0 commit comments