File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
firebase-firestore/src/main/java/com/google/firebase/firestore/local Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -453,6 +453,12 @@ private void addPathLength() {
453
453
}
454
454
455
455
private void addDocumentType () {
456
+ // The new "document_type" column is a copy of the document type encoded in the "contents" blob.
457
+ // Its range of values are defined in the `SQLiteRemoteDocumentCache.DocumentType` enum.
458
+ // The "document_type" value for a given row must be equal to the document type encoded in the
459
+ // "contents" column for that row. The purpose of the "document_type" column is to enable
460
+ // efficient filtering on document type. But when using it as a filter, a null value must also
461
+ // be considered as their document type must be determined by parsing the the "contents" column.
456
462
if (!tableContainsColumn ("remote_documents" , "document_type" )) {
457
463
db .execSQL ("ALTER TABLE remote_documents ADD COLUMN document_type INTEGER" );
458
464
}
You can’t perform that action at this time.
0 commit comments