diff --git a/packages/firestore/exp/dependencies.json b/packages/firestore/exp/dependencies.json index 41a9fdb6863..0245a9c5ecb 100644 --- a/packages/firestore/exp/dependencies.json +++ b/packages/firestore/exp/dependencies.json @@ -51,7 +51,6 @@ "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -90,7 +89,7 @@ ], "variables": [] }, - "sizeInBytes": 23644 + "sizeInBytes": 22689 }, "DocumentReference": { "dependencies": { @@ -101,7 +100,6 @@ "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -140,7 +138,7 @@ ], "variables": [] }, - "sizeInBytes": 23642 + "sizeInBytes": 22687 }, "DocumentSnapshot": { "dependencies": { @@ -165,7 +163,6 @@ "hardAssert", "invalidClassError", "isIndexedDbTransactionError", - "isNullOrUndefined", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -232,7 +229,7 @@ ], "variables": [] }, - "sizeInBytes": 42706 + "sizeInBytes": 41751 }, "FieldPath": { "dependencies": { @@ -505,7 +502,6 @@ "hardAssert", "invalidClassError", "isIndexedDbTransactionError", - "isNullOrUndefined", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -572,7 +568,7 @@ ], "variables": [] }, - "sizeInBytes": 42716 + "sizeInBytes": 41761 }, "QuerySnapshot": { "dependencies": { @@ -598,7 +594,6 @@ "hardAssert", "invalidClassError", "isIndexedDbTransactionError", - "isNullOrUndefined", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -668,7 +663,7 @@ ], "variables": [] }, - "sizeInBytes": 45347 + "sizeInBytes": 44392 }, "SnapshotMetadata": { "dependencies": { @@ -779,7 +774,6 @@ "isIndexedDbTransactionError", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -893,7 +887,7 @@ ], "variables": [] }, - "sizeInBytes": 66246 + "sizeInBytes": 65291 }, "WriteBatch": { "dependencies": { @@ -926,7 +920,6 @@ "isIndexedDbTransactionError", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -1030,7 +1023,7 @@ ], "variables": [] }, - "sizeInBytes": 58834 + "sizeInBytes": 57879 }, "addDoc": { "dependencies": { @@ -1059,6 +1052,7 @@ "applyWriteToRemoteDocuments", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -1130,6 +1124,8 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", @@ -1141,6 +1137,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "invalidClassError", "isArray", @@ -1172,6 +1170,7 @@ "logWarn", "looksLikeJsonObject", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -1403,7 +1402,7 @@ ], "variables": [] }, - "sizeInBytes": 191785 + "sizeInBytes": 191755 }, "arrayRemove": { "dependencies": { @@ -1638,7 +1637,6 @@ "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -1677,7 +1675,7 @@ ], "variables": [] }, - "sizeInBytes": 24377 + "sizeInBytes": 23422 }, "collectionGroup": { "dependencies": { @@ -1690,7 +1688,6 @@ "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", - "isNullOrUndefined", "logDebug", "logError", "newQueryForCollectionGroup", @@ -1723,7 +1720,7 @@ ], "variables": [] }, - "sizeInBytes": 21624 + "sizeInBytes": 20669 }, "deleteDoc": { "dependencies": { @@ -1750,6 +1747,7 @@ "applyWriteToRemoteDocuments", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -1815,6 +1813,8 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", @@ -1826,6 +1826,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "isArray", "isCollectionGroupQuery", @@ -1852,6 +1854,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -2059,7 +2062,7 @@ ], "variables": [] }, - "sizeInBytes": 175580 + "sizeInBytes": 175550 }, "deleteField": { "dependencies": { @@ -2124,6 +2127,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -2185,6 +2189,8 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", @@ -2197,6 +2203,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "isArray", "isCollectionGroupQuery", "isDocumentQuery", @@ -2221,6 +2229,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -2414,7 +2423,7 @@ ], "variables": [] }, - "sizeInBytes": 165460 + "sizeInBytes": 165430 }, "doc": { "dependencies": { @@ -2426,7 +2435,6 @@ "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -2465,7 +2473,7 @@ ], "variables": [] }, - "sizeInBytes": 24432 + "sizeInBytes": 23477 }, "documentId": { "dependencies": { @@ -2539,6 +2547,7 @@ "argToString", "arrayEquals", "arrayValueContains", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -2634,6 +2643,8 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getDocument", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getLogLevel", "getMessageOrStack", @@ -2642,6 +2653,8 @@ "globalTargetStore", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "immediateSuccessor", "indexedDbClearPersistence", @@ -2666,6 +2679,7 @@ "localTransformResults", "logDebug", "logError", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "mutationQueueContainsKey", @@ -2884,7 +2898,7 @@ ], "variables": [] }, - "sizeInBytes": 200591 + "sizeInBytes": 200561 }, "enableMultiTabIndexedDbPersistence": { "dependencies": { @@ -2919,6 +2933,7 @@ "argToString", "arrayEquals", "arrayValueContains", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -3039,6 +3054,8 @@ "getCachedTarget", "getDocument", "getEncodedDatabaseId", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalTargetData", "getLocalWriteTime", @@ -3053,6 +3070,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "immediateSuccessor", "indexedDbClearPersistence", @@ -3085,6 +3104,7 @@ "logWarn", "lookupMutationDocuments", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "mutationQueueContainsKey", @@ -3378,7 +3398,7 @@ ], "variables": [] }, - "sizeInBytes": 302272 + "sizeInBytes": 302237 }, "enableNetwork": { "dependencies": { @@ -3401,6 +3421,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -3462,6 +3483,8 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", @@ -3474,6 +3497,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "isArray", "isCollectionGroupQuery", "isDocumentQuery", @@ -3498,6 +3523,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -3691,7 +3717,7 @@ ], "variables": [] }, - "sizeInBytes": 165457 + "sizeInBytes": 165427 }, "endAt": { "dependencies": { @@ -3712,6 +3738,8 @@ "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getMessageOrStack", "getPreviousValue", @@ -3721,7 +3749,6 @@ "isEmpty", "isIndexedDbTransactionError", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -3818,7 +3845,7 @@ ], "variables": [] }, - "sizeInBytes": 54642 + "sizeInBytes": 53931 }, "endBefore": { "dependencies": { @@ -3839,6 +3866,8 @@ "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getMessageOrStack", "getPreviousValue", @@ -3848,7 +3877,6 @@ "isEmpty", "isIndexedDbTransactionError", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -3945,7 +3973,7 @@ ], "variables": [] }, - "sizeInBytes": 54653 + "sizeInBytes": 53942 }, "getDoc": { "dependencies": { @@ -3972,6 +4000,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -4045,6 +4074,8 @@ "getDoc", "getEncodedDatabaseId", "getEventManager", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalTargetData", "getLocalWriteTime", @@ -4058,6 +4089,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "initializeViewAndComputeSnapshot", "invalidClassError", @@ -4086,6 +4119,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -4325,7 +4359,7 @@ ], "variables": [] }, - "sizeInBytes": 209405 + "sizeInBytes": 209370 }, "getDocFromCache": { "dependencies": { @@ -4347,6 +4381,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "binaryStringFromUint8Array", "blobEquals", @@ -4395,6 +4430,8 @@ "fromDotSeparatedString", "geoPointEquals", "getDocFromCache", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalStore", "getLocalWriteTime", "getLogLevel", @@ -4404,6 +4441,8 @@ "getPreviousValue", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "invalidClassError", "isArray", "isCollectionGroupQuery", @@ -4422,6 +4461,7 @@ "localTransformResults", "logDebug", "logError", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newLocalStore", @@ -4573,7 +4613,7 @@ ], "variables": [] }, - "sizeInBytes": 121645 + "sizeInBytes": 121615 }, "getDocFromServer": { "dependencies": { @@ -4600,6 +4640,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -4673,6 +4714,8 @@ "getDocFromServer", "getEncodedDatabaseId", "getEventManager", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalTargetData", "getLocalWriteTime", @@ -4686,6 +4729,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "initializeViewAndComputeSnapshot", "invalidClassError", @@ -4714,6 +4759,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -4953,7 +4999,7 @@ ], "variables": [] }, - "sizeInBytes": 209461 + "sizeInBytes": 209426 }, "getDocs": { "dependencies": { @@ -4980,6 +5026,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -5053,6 +5100,8 @@ "getDocs", "getEncodedDatabaseId", "getEventManager", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalTargetData", "getLocalWriteTime", @@ -5066,6 +5115,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "initializeViewAndComputeSnapshot", "invalidClassError", @@ -5094,6 +5145,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -5336,7 +5388,7 @@ ], "variables": [] }, - "sizeInBytes": 211748 + "sizeInBytes": 211712 }, "getDocsFromCache": { "dependencies": { @@ -5358,6 +5410,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "binaryStringFromUint8Array", "blobEquals", @@ -5409,6 +5462,8 @@ "fromDotSeparatedString", "geoPointEquals", "getDocsFromCache", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalStore", "getLocalTargetData", "getLocalWriteTime", @@ -5419,6 +5474,8 @@ "getPreviousValue", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "invalidClassError", "isArray", "isCollectionGroupQuery", @@ -5437,6 +5494,7 @@ "localTransformResults", "logDebug", "logError", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newLocalStore", @@ -5596,7 +5654,7 @@ ], "variables": [] }, - "sizeInBytes": 134605 + "sizeInBytes": 134570 }, "getDocsFromServer": { "dependencies": { @@ -5623,6 +5681,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -5696,6 +5755,8 @@ "getDocsFromServer", "getEncodedDatabaseId", "getEventManager", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalTargetData", "getLocalWriteTime", @@ -5709,6 +5770,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "initializeViewAndComputeSnapshot", "invalidClassError", @@ -5737,6 +5800,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -5978,7 +6042,7 @@ ], "variables": [] }, - "sizeInBytes": 211486 + "sizeInBytes": 211451 }, "getFirestore": { "dependencies": { @@ -6116,7 +6180,6 @@ "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", - "isNullOrUndefined", "limit", "logDebug", "logError", @@ -6151,7 +6214,7 @@ ], "variables": [] }, - "sizeInBytes": 19127 + "sizeInBytes": 18172 }, "limitToLast": { "dependencies": { @@ -6162,7 +6225,6 @@ "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", - "isNullOrUndefined", "limitToLast", "logDebug", "logError", @@ -6197,7 +6259,7 @@ ], "variables": [] }, - "sizeInBytes": 19151 + "sizeInBytes": 18196 }, "onSnapshot": { "dependencies": { @@ -6224,6 +6286,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -6296,6 +6359,8 @@ "geoPointEquals", "getEncodedDatabaseId", "getEventManager", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalTargetData", "getLocalWriteTime", @@ -6309,6 +6374,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "implementsAnyMethods", "initializeViewAndComputeSnapshot", @@ -6339,6 +6406,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -6582,7 +6650,7 @@ ], "variables": [] }, - "sizeInBytes": 212831 + "sizeInBytes": 212795 }, "onSnapshotsInSync": { "dependencies": { @@ -6609,6 +6677,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -6673,6 +6742,8 @@ "geoPointEquals", "getEncodedDatabaseId", "getEventManager", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalTargetData", "getLocalWriteTime", @@ -6685,6 +6756,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "implementsAnyMethods", "initializeViewAndComputeSnapshot", @@ -6713,6 +6786,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -6927,7 +7001,7 @@ ], "variables": [] }, - "sizeInBytes": 192185 + "sizeInBytes": 192150 }, "orderBy": { "dependencies": { @@ -6942,11 +7016,12 @@ "formatJSON", "formatPlural", "fromDotSeparatedString", + "getFirstOrderByField", + "getInequalityFilterField", "getMessageOrStack", "hardAssert", "invalidClassError", "isIndexedDbTransactionError", - "isNullOrUndefined", "isPlainObject", "logDebug", "logError", @@ -6995,7 +7070,7 @@ ], "variables": [] }, - "sizeInBytes": 28772 + "sizeInBytes": 28061 }, "query": { "dependencies": { @@ -7052,12 +7127,13 @@ "filterEquals", "formatJSON", "geoPointEquals", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", "isNegativeZero", - "isNullOrUndefined", "isServerTimestamp", "logDebug", "logError", @@ -7111,7 +7187,7 @@ ], "variables": [] }, - "sizeInBytes": 33343 + "sizeInBytes": 32632 }, "refEqual": { "dependencies": { @@ -7122,7 +7198,6 @@ "getMessageOrStack", "hardAssert", "isIndexedDbTransactionError", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -7162,7 +7237,7 @@ ], "variables": [] }, - "sizeInBytes": 23927 + "sizeInBytes": 22972 }, "runTransaction": { "dependencies": { @@ -7355,7 +7430,7 @@ ], "variables": [] }, - "sizeInBytes": 85139 + "sizeInBytes": 84257 }, "serverTimestamp": { "dependencies": { @@ -7428,6 +7503,7 @@ "applyWriteToRemoteDocuments", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -7498,6 +7574,8 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", @@ -7509,6 +7587,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "invalidClassError", "isArray", @@ -7540,6 +7620,7 @@ "logWarn", "looksLikeJsonObject", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -7772,7 +7853,7 @@ ], "variables": [] }, - "sizeInBytes": 190922 + "sizeInBytes": 190892 }, "setLogLevel": { "dependencies": { @@ -7835,6 +7916,8 @@ "formatPlural", "fromDotSeparatedString", "geoPointEquals", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getMessageOrStack", "getPreviousValue", @@ -7842,7 +7925,6 @@ "invalidClassError", "isIndexedDbTransactionError", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -7928,7 +8010,7 @@ ], "variables": [] }, - "sizeInBytes": 52407 + "sizeInBytes": 51696 }, "startAfter": { "dependencies": { @@ -7948,6 +8030,8 @@ "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getMessageOrStack", "getPreviousValue", @@ -7957,7 +8041,6 @@ "isEmpty", "isIndexedDbTransactionError", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -8055,7 +8138,7 @@ ], "variables": [] }, - "sizeInBytes": 54663 + "sizeInBytes": 53952 }, "startAt": { "dependencies": { @@ -8075,6 +8158,8 @@ "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getMessageOrStack", "getPreviousValue", @@ -8084,7 +8169,6 @@ "isEmpty", "isIndexedDbTransactionError", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -8182,7 +8266,7 @@ ], "variables": [] }, - "sizeInBytes": 54653 + "sizeInBytes": 53942 }, "terminate": { "dependencies": { @@ -8248,6 +8332,7 @@ "applyWriteToRemoteDocuments", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -8319,6 +8404,8 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", @@ -8330,6 +8417,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "invalidClassError", "isArray", @@ -8361,6 +8450,7 @@ "logWarn", "looksLikeJsonObject", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -8596,7 +8686,7 @@ ], "variables": [] }, - "sizeInBytes": 192421 + "sizeInBytes": 192391 }, "waitForPendingWrites": { "dependencies": { @@ -8619,6 +8709,7 @@ "applyTransformOperationToRemoteDocument", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -8679,7 +8770,9 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", + "getFirstOrderByField", "getHighestUnacknowledgedBatchId", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", @@ -8691,6 +8784,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "isArray", "isCollectionGroupQuery", "isDocumentQuery", @@ -8715,6 +8810,7 @@ "logError", "logWarn", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -8910,7 +9006,7 @@ ], "variables": [] }, - "sizeInBytes": 166293 + "sizeInBytes": 166263 }, "where": { "dependencies": { @@ -8937,12 +9033,15 @@ "fail", "fieldPathFromArgument$1", "fieldPathFromDotSeparatedString", + "findFilterOperator", "forEach", "formatJSON", "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", "geoPointEquals", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getMessageOrStack", "hardAssert", @@ -8953,7 +9052,6 @@ "isIndexedDbTransactionError", "isNanValue", "isNegativeZero", - "isNullOrUndefined", "isNullValue", "isPlainObject", "isSafeInteger", @@ -9056,7 +9154,7 @@ ], "variables": [] }, - "sizeInBytes": 58994 + "sizeInBytes": 58429 }, "writeBatch": { "dependencies": { @@ -9084,6 +9182,7 @@ "applyWriteToRemoteDocuments", "argToString", "arrayEquals", + "asCollectionQueryAtPath", "asNumber", "assertPresent", "binaryStringFromUint8Array", @@ -9155,6 +9254,8 @@ "fullyQualifiedPrefixPath", "geoPointEquals", "getEncodedDatabaseId", + "getFirstOrderByField", + "getInequalityFilterField", "getLastRemoteSnapshotVersion", "getLocalWriteTime", "getLogLevel", @@ -9166,6 +9267,8 @@ "handleCredentialChange", "handleUserChange", "hardAssert", + "hasLimitToFirst", + "hasLimitToLast", "ignoreIfPrimaryLeaseLoss", "invalidClassError", "isArray", @@ -9197,6 +9300,7 @@ "logWarn", "looksLikeJsonObject", "mapCodeFromRpcCode", + "matchesAllDocuments", "maybeDocumentMap", "mutationEquals", "newConnection", @@ -9436,6 +9540,6 @@ ], "variables": [] }, - "sizeInBytes": 196088 + "sizeInBytes": 196058 } } \ No newline at end of file diff --git a/packages/firestore/lite/dependencies.json b/packages/firestore/lite/dependencies.json index 65b5bd26a02..9689971aa7e 100644 --- a/packages/firestore/lite/dependencies.json +++ b/packages/firestore/lite/dependencies.json @@ -28,11 +28,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 12225 -======= - "sizeInBytes": 9275 ->>>>>>> master + "sizeInBytes": 9277 }, "CollectionReference": { "dependencies": { @@ -41,7 +37,6 @@ "fail", "formatJSON", "hardAssert", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -72,11 +67,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 14962 -======= - "sizeInBytes": 9454 ->>>>>>> master + "sizeInBytes": 14009 }, "DocumentReference": { "dependencies": { @@ -85,7 +76,6 @@ "fail", "formatJSON", "hardAssert", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -116,11 +106,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 14960 -======= - "sizeInBytes": 10902 ->>>>>>> master + "sizeInBytes": 14007 }, "DocumentSnapshot": { "dependencies": { @@ -143,7 +129,6 @@ "getPreviousValue", "hardAssert", "invalidClassError", - "isNullOrUndefined", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -175,11 +160,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DocumentKey", "DocumentKeyReference", @@ -203,11 +185,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 33081 -======= - "sizeInBytes": 28501 ->>>>>>> master + "sizeInBytes": 31606 }, "FieldPath": { "dependencies": { @@ -245,7 +223,7 @@ ], "variables": [] }, - "sizeInBytes": 13898 + "sizeInBytes": 13900 }, "FieldValue": { "dependencies": { @@ -272,7 +250,7 @@ ], "variables": [] }, - "sizeInBytes": 7528 + "sizeInBytes": 7530 }, "FirebaseFirestore": { "dependencies": { @@ -297,7 +275,7 @@ ], "variables": [] }, - "sizeInBytes": 7435 + "sizeInBytes": 7437 }, "GeoPoint": { "dependencies": { @@ -331,7 +309,7 @@ ], "variables": [] }, - "sizeInBytes": 10346 + "sizeInBytes": 10348 }, "Query": { "dependencies": { @@ -357,7 +335,7 @@ ], "variables": [] }, - "sizeInBytes": 7630 + "sizeInBytes": 7632 }, "QueryConstraint": { "dependencies": { @@ -383,7 +361,7 @@ ], "variables": [] }, - "sizeInBytes": 7443 + "sizeInBytes": 7445 }, "QueryDocumentSnapshot": { "dependencies": { @@ -406,7 +384,6 @@ "getPreviousValue", "hardAssert", "invalidClassError", - "isNullOrUndefined", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -438,11 +415,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DocumentKey", "DocumentKeyReference", @@ -466,11 +440,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 33086 -======= - "sizeInBytes": 28506 ->>>>>>> master + "sizeInBytes": 31611 }, "QuerySnapshot": { "dependencies": { @@ -496,7 +466,7 @@ ], "variables": [] }, - "sizeInBytes": 7669 + "sizeInBytes": 7671 }, "Timestamp": { "dependencies": { @@ -522,7 +492,7 @@ ], "variables": [] }, - "sizeInBytes": 9038 + "sizeInBytes": 9040 }, "Transaction": { "dependencies": { @@ -555,7 +525,6 @@ "isEmpty", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -613,11 +582,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DeleteFieldValueImpl", "Document", @@ -660,11 +626,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 55999 -======= - "sizeInBytes": 51433 ->>>>>>> master + "sizeInBytes": 54538 }, "WriteBatch": { "dependencies": { @@ -695,7 +657,6 @@ "isEmpty", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -752,11 +713,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DeleteFieldValueImpl", "DeleteMutation", @@ -794,11 +752,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 50761 -======= - "sizeInBytes": 46094 ->>>>>>> master + "sizeInBytes": 49199 }, "addDoc": { "dependencies": { @@ -835,7 +789,6 @@ "isEmpty", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -948,11 +901,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 56642 -======= - "sizeInBytes": 54753 ->>>>>>> master + "sizeInBytes": 55080 }, "arrayRemove": { "dependencies": { @@ -1027,11 +976,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 26919 -======= - "sizeInBytes": 26033 ->>>>>>> master + "sizeInBytes": 26035 }, "arrayUnion": { "dependencies": { @@ -1106,11 +1051,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 26911 -======= - "sizeInBytes": 26025 ->>>>>>> master + "sizeInBytes": 26027 }, "collection": { "dependencies": { @@ -1120,7 +1061,6 @@ "fail", "formatJSON", "hardAssert", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -1151,11 +1091,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 15695 -======= - "sizeInBytes": 15609 ->>>>>>> master + "sizeInBytes": 14742 }, "collectionGroup": { "dependencies": { @@ -1166,7 +1102,6 @@ "fail", "formatJSON", "hardAssert", - "isNullOrUndefined", "logDebug", "logError", "newQueryForCollectionGroup", @@ -1189,11 +1124,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 12441 -======= - "sizeInBytes": 13918 ->>>>>>> master + "sizeInBytes": 11488 }, "deleteDoc": { "dependencies": { @@ -1210,7 +1141,6 @@ "getEncodedDatabaseId", "hardAssert", "invokeCommitRpc", - "isNullOrUndefined", "loadProtos", "logDebug", "logError", @@ -1276,11 +1206,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 29205 -======= - "sizeInBytes": 25147 ->>>>>>> master + "sizeInBytes": 28252 }, "deleteField": { "dependencies": { @@ -1310,7 +1236,7 @@ ], "variables": [] }, - "sizeInBytes": 8494 + "sizeInBytes": 8496 }, "doc": { "dependencies": { @@ -1320,7 +1246,6 @@ "fail", "formatJSON", "hardAssert", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -1351,11 +1276,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 15750 -======= - "sizeInBytes": 16161 ->>>>>>> master + "sizeInBytes": 14797 }, "documentId": { "dependencies": { @@ -1394,7 +1315,7 @@ ], "variables": [] }, - "sizeInBytes": 13948 + "sizeInBytes": 13950 }, "endAt": { "dependencies": { @@ -1415,6 +1336,8 @@ "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getPreviousValue", "hardAssert", @@ -1422,7 +1345,6 @@ "isCollectionGroupQuery", "isEmpty", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -1479,11 +1401,8 @@ "BasePath", "Bound", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DocumentKey", "DocumentKeyReference", @@ -1514,11 +1433,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 46468 -======= - "sizeInBytes": 43486 ->>>>>>> master + "sizeInBytes": 45251 }, "endBefore": { "dependencies": { @@ -1539,6 +1454,8 @@ "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getPreviousValue", "hardAssert", @@ -1546,7 +1463,6 @@ "isCollectionGroupQuery", "isEmpty", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -1603,11 +1519,8 @@ "BasePath", "Bound", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DocumentKey", "DocumentKeyReference", @@ -1638,11 +1551,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 46479 -======= - "sizeInBytes": 43497 ->>>>>>> master + "sizeInBytes": 45262 }, "getDoc": { "dependencies": { @@ -1686,7 +1595,6 @@ "invokeBatchGetDocumentsRpc", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -1732,11 +1640,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DatabaseInfo", "Datastore", @@ -1772,21 +1677,13 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 49683 -======= - "sizeInBytes": 45103 ->>>>>>> master + "sizeInBytes": 48208 }, "getDocs": { "dependencies": { "functions": [ "argToString", "arrayEquals", -<<<<<<< HEAD - "assertUint8ArrayAvailable", -======= ->>>>>>> master "binaryStringFromUint8Array", "blobEquals", "cast", @@ -1813,9 +1710,12 @@ "geoPointEquals", "getDatastore", "getDocs", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getPreviousValue", "hardAssert", + "hasLimitToLast", "invalidClassError", "invokeRunQueryRpc", "isMapValue", @@ -1878,19 +1778,13 @@ "valueEquals" ], "classes": [ -<<<<<<< HEAD "AutoId", -======= ->>>>>>> master "BaseFieldPath", "BasePath", "Bound", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DatabaseInfo", "Datastore", @@ -1928,11 +1822,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 54167 -======= - "sizeInBytes": 51171 ->>>>>>> master + "sizeInBytes": 53099 }, "getFirestore": { "dependencies": { @@ -1958,7 +1848,7 @@ ], "variables": [] }, - "sizeInBytes": 7514 + "sizeInBytes": 7516 }, "increment": { "dependencies": { @@ -1996,7 +1886,7 @@ ], "variables": [] }, - "sizeInBytes": 9359 + "sizeInBytes": 9361 }, "initializeFirestore": { "dependencies": { @@ -2022,7 +1912,7 @@ ], "variables": [] }, - "sizeInBytes": 7600 + "sizeInBytes": 7602 }, "limit": { "dependencies": { @@ -2031,7 +1921,6 @@ "fail", "formatJSON", "hardAssert", - "isNullOrUndefined", "limit", "logDebug", "logError", @@ -2056,7 +1945,7 @@ ], "variables": [] }, - "sizeInBytes": 9944 + "sizeInBytes": 8991 }, "limitToLast": { "dependencies": { @@ -2065,7 +1954,6 @@ "fail", "formatJSON", "hardAssert", - "isNullOrUndefined", "limitToLast", "logDebug", "logError", @@ -2090,7 +1978,7 @@ ], "variables": [] }, - "sizeInBytes": 9968 + "sizeInBytes": 9015 }, "orderBy": { "dependencies": { @@ -2105,9 +1993,10 @@ "formatJSON", "formatPlural", "fromDotSeparatedString", + "getFirstOrderByField", + "getInequalityFilterField", "hardAssert", "invalidClassError", - "isNullOrUndefined", "isPlainObject", "logDebug", "logError", @@ -2146,47 +2035,7 @@ ], "variables": [] }, - "sizeInBytes": 19589 -<<<<<<< HEAD -======= - }, - "parent": { - "dependencies": { - "functions": [ - "argToString", - "cast", - "fail", - "formatJSON", - "hardAssert", - "isNullOrUndefined", - "logDebug", - "logError", - "newQueryForPath", - "parent", - "primitiveComparator", - "registerFirestore", - "removeComponents" - ], - "classes": [ - "BasePath", - "CollectionReference", - "DatabaseId", - "DocumentKey", - "DocumentKeyReference", - "DocumentReference", - "FirebaseCredentialsProvider", - "Firestore", - "FirestoreError", - "OAuthToken", - "Query", - "QueryImpl", - "ResourcePath", - "User" - ], - "variables": [] - }, - "sizeInBytes": 13670 ->>>>>>> master + "sizeInBytes": 18880 }, "query": { "dependencies": { @@ -2214,7 +2063,7 @@ ], "variables": [] }, - "sizeInBytes": 8211 + "sizeInBytes": 8213 }, "queryEqual": { "dependencies": { @@ -2231,10 +2080,11 @@ "filterEquals", "formatJSON", "geoPointEquals", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "hardAssert", "isNegativeZero", - "isNullOrUndefined", "isServerTimestamp", "logDebug", "logError", @@ -2278,7 +2128,7 @@ ], "variables": [] }, - "sizeInBytes": 24160 + "sizeInBytes": 23451 }, "refEqual": { "dependencies": { @@ -2287,7 +2137,6 @@ "fail", "formatJSON", "hardAssert", - "isNullOrUndefined", "logDebug", "logError", "newQueryForPath", @@ -2319,11 +2168,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 15245 -======= - "sizeInBytes": 13217 ->>>>>>> master + "sizeInBytes": 14292 }, "runTransaction": { "dependencies": { @@ -2449,11 +2294,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DatabaseInfo", "Datastore", @@ -2512,11 +2354,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 81012 -======= - "sizeInBytes": 76519 ->>>>>>> master + "sizeInBytes": 79624 }, "serverTimestamp": { "dependencies": { @@ -2549,7 +2387,7 @@ ], "variables": [] }, - "sizeInBytes": 8482 + "sizeInBytes": 8484 }, "setDoc": { "dependencies": { @@ -2584,7 +2422,6 @@ "isEmpty", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -2654,11 +2491,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DatabaseInfo", "Datastore", @@ -2701,11 +2535,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 55783 -======= - "sizeInBytes": 51116 ->>>>>>> master + "sizeInBytes": 54221 }, "setLogLevel": { "dependencies": { @@ -2731,17 +2561,13 @@ ], "variables": [] }, - "sizeInBytes": 7479 + "sizeInBytes": 7481 }, "snapshotEqual": { "dependencies": { "functions": [ "argToString", "arrayEquals", -<<<<<<< HEAD - "assertUint8ArrayAvailable", -======= ->>>>>>> master "binaryStringFromUint8Array", "blobEquals", "boundEquals", @@ -2759,12 +2585,13 @@ "formatPlural", "fromDotSeparatedString", "geoPointEquals", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getPreviousValue", "hardAssert", "invalidClassError", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isServerTimestamp", "isValidResourceName", @@ -2805,19 +2632,13 @@ "valueEquals" ], "classes": [ -<<<<<<< HEAD "AutoId", -======= ->>>>>>> master "BaseFieldPath", "BasePath", "Bound", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DocumentKey", "DocumentKeyReference", @@ -2844,11 +2665,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 40318 -======= - "sizeInBytes": 37322 ->>>>>>> master + "sizeInBytes": 39087 }, "startAfter": { "dependencies": { @@ -2868,6 +2685,8 @@ "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getPreviousValue", "hardAssert", @@ -2875,7 +2694,6 @@ "isCollectionGroupQuery", "isEmpty", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -2933,11 +2751,8 @@ "BasePath", "Bound", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DocumentKey", "DocumentKeyReference", @@ -2968,11 +2783,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 46489 -======= - "sizeInBytes": 43507 ->>>>>>> master + "sizeInBytes": 45272 }, "startAt": { "dependencies": { @@ -2992,6 +2803,8 @@ "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "getPreviousValue", "hardAssert", @@ -2999,7 +2812,6 @@ "isCollectionGroupQuery", "isEmpty", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -3057,11 +2869,8 @@ "BasePath", "Bound", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DocumentKey", "DocumentKeyReference", @@ -3092,11 +2901,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 46479 -======= - "sizeInBytes": 43497 ->>>>>>> master + "sizeInBytes": 45262 }, "terminate": { "dependencies": { @@ -3123,7 +2928,7 @@ ], "variables": [] }, - "sizeInBytes": 8012 + "sizeInBytes": 8015 }, "updateDoc": { "dependencies": { @@ -3158,7 +2963,6 @@ "isEmpty", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -3229,11 +3033,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DatabaseInfo", "Datastore", @@ -3279,11 +3080,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 58890 -======= - "sizeInBytes": 54223 ->>>>>>> master + "sizeInBytes": 57328 }, "where": { "dependencies": { @@ -3310,12 +3107,15 @@ "fail", "fieldPathFromArgument$1", "fieldPathFromDotSeparatedString", + "findFilterOperator", "forEach", "formatJSON", "formatPlural", "fromDotSeparatedString", "fullyQualifiedPrefixPath", "geoPointEquals", + "getFirstOrderByField", + "getInequalityFilterField", "getLocalWriteTime", "hardAssert", "invalidClassError", @@ -3324,7 +3124,6 @@ "isEmpty", "isNanValue", "isNegativeZero", - "isNullOrUndefined", "isNullValue", "isPlainObject", "isSafeInteger", @@ -3417,11 +3216,7 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 50420 -======= - "sizeInBytes": 49811 ->>>>>>> master + "sizeInBytes": 49248 }, "writeBatch": { "dependencies": { @@ -3457,7 +3252,6 @@ "isEmpty", "isMapValue", "isNegativeZero", - "isNullOrUndefined", "isPlainObject", "isSafeInteger", "isServerTimestamp", @@ -3530,11 +3324,8 @@ "BaseFieldPath", "BasePath", "ByteString", -<<<<<<< HEAD - "CollectionReference", -======= "Bytes", ->>>>>>> master + "CollectionReference", "DatabaseId", "DatabaseInfo", "Datastore", @@ -3582,10 +3373,6 @@ ], "variables": [] }, -<<<<<<< HEAD - "sizeInBytes": 62591 -======= - "sizeInBytes": 57924 ->>>>>>> master + "sizeInBytes": 61029 } } \ No newline at end of file diff --git a/packages/firestore/lite/src/api/reference.ts b/packages/firestore/lite/src/api/reference.ts index a78080df7fd..534765e71ee 100644 --- a/packages/firestore/lite/src/api/reference.ts +++ b/packages/firestore/lite/src/api/reference.ts @@ -31,6 +31,7 @@ import { import { Bound, Direction, + hasLimitToLast, LimitType, newQueryForCollectionGroup, newQueryForPath, @@ -595,7 +596,7 @@ export function getDocs( ) ); - if (queryImpl._query.hasLimitToLast()) { + if (hasLimitToLast(queryImpl._query)) { // Limit to last queries reverse the orderBy constraint that was // specified by the user. As such, we need to reverse the order of the // results to return the documents in the expected order. diff --git a/packages/firestore/src/api/database.ts b/packages/firestore/src/api/database.ts index 8b2c714165f..c7f12ef6dc9 100644 --- a/packages/firestore/src/api/database.ts +++ b/packages/firestore/src/api/database.ts @@ -59,6 +59,9 @@ import { Direction, FieldFilter, Filter, + findFilterOperator, + getFirstOrderByField, + getInequalityFilterField, isCollectionGroupQuery, LimitType, newQueryComparator, @@ -73,7 +76,8 @@ import { queryWithAddedOrderBy, queryWithEndAt, queryWithLimit, - queryWithStartAt + queryWithStartAt, + hasLimitToLast } from '../core/query'; import { Transaction as InternalTransaction } from '../core/transaction'; import { ChangeType, ViewSnapshot } from '../core/view_snapshot'; @@ -1789,7 +1793,7 @@ function validateNewFilter(query: InternalQuery, filter: Filter): void { debugAssert(filter instanceof FieldFilter, 'Only FieldFilters are supported'); if (filter.isInequality()) { - const existingField = query.getInequalityFilterField(); + const existingField = getInequalityFilterField(query); if (existingField !== null && !existingField.isEqual(filter.field)) { throw new FirestoreError( Code.INVALID_ARGUMENT, @@ -1800,13 +1804,13 @@ function validateNewFilter(query: InternalQuery, filter: Filter): void { ); } - const firstOrderByField = query.getFirstOrderByField(); + const firstOrderByField = getFirstOrderByField(query); if (firstOrderByField !== null) { validateOrderByAndInequalityMatch(query, filter.field, firstOrderByField); } } - const conflictingOp = query.findFilterOperator(conflictingOps(filter.op)); + const conflictingOp = findFilterOperator(query, conflictingOps(filter.op)); if (conflictingOp !== null) { // Special case when it's a duplicate op to give a slightly clearer error message. if (conflictingOp === filter.op) { @@ -1826,9 +1830,9 @@ function validateNewFilter(query: InternalQuery, filter: Filter): void { } function validateNewOrderBy(query: InternalQuery, orderBy: OrderBy): void { - if (query.getFirstOrderByField() === null) { + if (getFirstOrderByField(query) === null) { // This is the first order by. It must match any inequality. - const inequalityField = query.getInequalityFilterField(); + const inequalityField = getInequalityFilterField(query); if (inequalityField !== null) { validateOrderByAndInequalityMatch(query, inequalityField, orderBy.field); } @@ -1855,7 +1859,7 @@ function validateOrderByAndInequalityMatch( export function validateHasExplicitOrderByForLimitToLast( query: InternalQuery ): void { - if (query.hasLimitToLast() && query.explicitOrderBy.length === 0) { + if (hasLimitToLast(query) && query.explicitOrderBy.length === 0) { throw new FirestoreError( Code.UNIMPLEMENTED, 'limitToLast() queries require specifying at least one orderBy() clause' diff --git a/packages/firestore/src/core/query.ts b/packages/firestore/src/core/query.ts index 60e03164e39..3bd34044a8c 100644 --- a/packages/firestore/src/core/query.ts +++ b/packages/firestore/src/core/query.ts @@ -63,22 +63,6 @@ export interface Query { readonly limitType: LimitType; readonly startAt: Bound | null; readonly endAt: Bound | null; - - hasLimitToFirst(): boolean; - hasLimitToLast(): boolean; - getFirstOrderByField(): FieldPath | null; - getInequalityFilterField(): FieldPath | null; - asCollectionQueryAtPath(path: ResourcePath): Query; - - /** - * Returns true if this query does not specify any query constraints that - * could remove results. - */ - matchesAllDocuments(): boolean; - - // Checks if any of the provided Operators are included in the query and - // returns the first one that is, or null if none are. - findFilterOperator(operators: Operator[]): Operator | null; } /** @@ -121,77 +105,6 @@ export class QueryImpl implements Query { ); } } - - /** - * Helper to convert a collection group query into a collection query at a - * specific path. This is used when executing collection group queries, since - * we have to split the query into a set of collection queries at multiple - * paths. - */ - asCollectionQueryAtPath(path: ResourcePath): Query { - return new QueryImpl( - path, - /*collectionGroup=*/ null, - this.explicitOrderBy.slice(), - this.filters.slice(), - this.limit, - this.limitType, - this.startAt, - this.endAt - ); - } - - matchesAllDocuments(): boolean { - return ( - this.filters.length === 0 && - this.limit === null && - this.startAt == null && - this.endAt == null && - (this.explicitOrderBy.length === 0 || - (this.explicitOrderBy.length === 1 && - this.explicitOrderBy[0].field.isKeyField())) - ); - } - - hasLimitToFirst(): boolean { - return !isNullOrUndefined(this.limit) && this.limitType === LimitType.First; - } - - hasLimitToLast(): boolean { - return !isNullOrUndefined(this.limit) && this.limitType === LimitType.Last; - } - - getFirstOrderByField(): FieldPath | null { - return this.explicitOrderBy.length > 0 - ? this.explicitOrderBy[0].field - : null; - } - - getInequalityFilterField(): FieldPath | null { - for (const filter of this.filters) { - debugAssert( - filter instanceof FieldFilter, - 'Only FieldFilters are supported' - ); - if (filter.isInequality()) { - return filter.field; - } - } - return null; - } - - findFilterOperator(operators: Operator[]): Operator | null { - for (const filter of this.filters) { - debugAssert( - filter instanceof FieldFilter, - 'Only FieldFilters are supported' - ); - if (operators.indexOf(filter.op) >= 0) { - return filter.op; - } - } - return null; - } } /** Creates a new Query instance with the options provided. */ @@ -222,6 +135,91 @@ export function newQueryForPath(path: ResourcePath): Query { return new QueryImpl(path); } +/** + * Helper to convert a collection group query into a collection query at a + * specific path. This is used when executing collection group queries, since + * we have to split the query into a set of collection queries at multiple + * paths. + */ +export function asCollectionQueryAtPath( + query: Query, + path: ResourcePath +): Query { + return new QueryImpl( + path, + /*collectionGroup=*/ null, + query.explicitOrderBy.slice(), + query.filters.slice(), + query.limit, + query.limitType, + query.startAt, + query.endAt + ); +} + +/** + * Returns true if this query does not specify any query constraints that + * could remove results. + */ +export function matchesAllDocuments(query: Query): boolean { + return ( + query.filters.length === 0 && + query.limit === null && + query.startAt == null && + query.endAt == null && + (query.explicitOrderBy.length === 0 || + (query.explicitOrderBy.length === 1 && + query.explicitOrderBy[0].field.isKeyField())) + ); +} + +export function hasLimitToFirst(query: Query): boolean { + return !isNullOrUndefined(query.limit) && query.limitType === LimitType.First; +} + +export function hasLimitToLast(query: Query): boolean { + return !isNullOrUndefined(query.limit) && query.limitType === LimitType.Last; +} + +export function getFirstOrderByField(query: Query): FieldPath | null { + return query.explicitOrderBy.length > 0 + ? query.explicitOrderBy[0].field + : null; +} + +export function getInequalityFilterField(query: Query): FieldPath | null { + for (const filter of query.filters) { + debugAssert( + filter instanceof FieldFilter, + 'Only FieldFilters are supported' + ); + if (filter.isInequality()) { + return filter.field; + } + } + return null; +} + +/** + * Checks if any of the provided Operators are included in the query and + * returns the first one that is, or null if none are. + */ +export function findFilterOperator( + query: Query, + operators: Operator[] +): Operator | null { + for (const filter of query.filters) { + debugAssert( + filter instanceof FieldFilter, + 'Only FieldFilters are supported' + ); + if (operators.indexOf(filter.op) >= 0) { + return filter.op; + } + } + return null; +} + /** * Creates a new Query for a collection group query that matches all documents * within the provided collection group. @@ -260,8 +258,8 @@ export function queryOrderBy(query: Query): OrderBy[] { if (queryImpl.memoizedOrderBy === null) { queryImpl.memoizedOrderBy = []; - const inequalityField = queryImpl.getInequalityFilterField(); - const firstOrderByField = queryImpl.getFirstOrderByField(); + const inequalityField = getInequalityFilterField(queryImpl); + const firstOrderByField = getFirstOrderByField(queryImpl); if (inequalityField !== null && firstOrderByField === null) { // In order to implicitly add key ordering, we must also add the // inequality filter field for it to be a valid query. @@ -355,10 +353,10 @@ export function queryToTarget(query: Query): Target { export function queryWithAddedFilter(query: Query, filter: Filter): Query { debugAssert( - query.getInequalityFilterField() == null || + getInequalityFilterField(query) == null || !(filter instanceof FieldFilter) || !filter.isInequality() || - filter.field.isEqual(query.getInequalityFilterField()!), + filter.field.isEqual(getInequalityFilterField(query)!), 'Query must only have one inequality field.' ); diff --git a/packages/firestore/src/core/view.ts b/packages/firestore/src/core/view.ts index ca7a7dfc170..027265e70ff 100644 --- a/packages/firestore/src/core/view.ts +++ b/packages/firestore/src/core/view.ts @@ -27,7 +27,13 @@ import { DocumentSet } from '../model/document_set'; import { TargetChange } from '../remote/remote_event'; import { debugAssert, fail } from '../util/assert'; -import { newQueryComparator, Query, queryMatches } from './query'; +import { + hasLimitToFirst, + hasLimitToLast, + newQueryComparator, + Query, + queryMatches +} from './query'; import { OnlineState } from './types'; import { ChangeType, @@ -140,11 +146,11 @@ export class View { // Note that this should never get used in a refill (when previousChanges is // set), because there will only be adds -- no deletes or updates. const lastDocInLimit = - this.query.hasLimitToFirst() && oldDocumentSet.size === this.query.limit + hasLimitToFirst(this.query) && oldDocumentSet.size === this.query.limit ? oldDocumentSet.last() : null; const firstDocInLimit = - this.query.hasLimitToLast() && oldDocumentSet.size === this.query.limit + hasLimitToLast(this.query) && oldDocumentSet.size === this.query.limit ? oldDocumentSet.first() : null; @@ -234,9 +240,9 @@ export class View { ); // Drop documents out to meet limit/limitToLast requirement. - if (this.query.hasLimitToFirst() || this.query.hasLimitToLast()) { + if (hasLimitToFirst(this.query) || hasLimitToLast(this.query)) { while (newDocumentSet.size > this.query.limit!) { - const oldDoc = this.query.hasLimitToFirst() + const oldDoc = hasLimitToFirst(this.query) ? newDocumentSet.last() : newDocumentSet.first(); newDocumentSet = newDocumentSet.delete(oldDoc!.key); diff --git a/packages/firestore/src/local/index_free_query_engine.ts b/packages/firestore/src/local/index_free_query_engine.ts index 00323233a77..78e5c0a3d5c 100644 --- a/packages/firestore/src/local/index_free_query_engine.ts +++ b/packages/firestore/src/local/index_free_query_engine.ts @@ -20,7 +20,10 @@ import { LocalDocumentsView } from './local_documents_view'; import { PersistenceTransaction } from './persistence'; import { PersistencePromise } from './persistence_promise'; import { + hasLimitToFirst, + hasLimitToLast, LimitType, + matchesAllDocuments, newQueryComparator, Query, queryMatches, @@ -78,7 +81,7 @@ export class IndexFreeQueryEngine implements QueryEngine { // Queries that match all documents don't benefit from using // IndexFreeQueries. It is more efficient to scan all documents in a // collection, rather than to perform individual lookups. - if (query.matchesAllDocuments()) { + if (matchesAllDocuments(query)) { return this.executeFullCollectionScan(transaction, query); } @@ -93,7 +96,7 @@ export class IndexFreeQueryEngine implements QueryEngine { const previousResults = this.applyQuery(query, documents); if ( - (query.hasLimitToFirst() || query.hasLimitToLast()) && + (hasLimitToFirst(query) || hasLimitToLast(query)) && this.needsRefill( query.limitType, previousResults, diff --git a/packages/firestore/src/local/local_documents_view.ts b/packages/firestore/src/local/local_documents_view.ts index 73f5531e665..9c3074e9934 100644 --- a/packages/firestore/src/local/local_documents_view.ts +++ b/packages/firestore/src/local/local_documents_view.ts @@ -16,6 +16,7 @@ */ import { + asCollectionQueryAtPath, isCollectionGroupQuery, isDocumentQuery, Query, @@ -211,7 +212,8 @@ export class LocalDocumentsView { // Perform a collection query against each parent that contains the // collectionId and aggregate the results. return PersistencePromise.forEach(parents, (parent: ResourcePath) => { - const collectionQuery = query.asCollectionQueryAtPath( + const collectionQuery = asCollectionQueryAtPath( + query, parent.child(collectionId) ); return this.getDocumentsMatchingCollectionQuery( diff --git a/packages/firestore/test/unit/core/query.test.ts b/packages/firestore/test/unit/core/query.test.ts index 3c48d167eb3..5d8ff136ec2 100644 --- a/packages/firestore/test/unit/core/query.test.ts +++ b/packages/firestore/test/unit/core/query.test.ts @@ -37,7 +37,8 @@ import { queryToTarget, QueryImpl, queryEquals, - OrderBy + OrderBy, + matchesAllDocuments } from '../../../src/core/query'; import { DOCUMENT_KEY_NAME, ResourcePath } from '../../../src/model/path'; import { addEqualityMatcher } from '../../util/equality_matcher'; @@ -779,25 +780,25 @@ describe('Query', () => { it('matchesAllDocuments() considers filters, orders and bounds', () => { const baseQuery = newQueryForPath(ResourcePath.fromString('collection')); - expect(baseQuery.matchesAllDocuments()).to.be.true; + expect(matchesAllDocuments(baseQuery)).to.be.true; let query1 = query('collection', orderBy('__name__')); - expect(query1.matchesAllDocuments()).to.be.true; + expect(matchesAllDocuments(query1)).to.be.true; query1 = query('collection', orderBy('foo')); - expect(query1.matchesAllDocuments()).to.be.false; + expect(matchesAllDocuments(query1)).to.be.false; query1 = query('collection', filter('foo', '==', 'bar')); - expect(query1.matchesAllDocuments()).to.be.false; + expect(matchesAllDocuments(query1)).to.be.false; query1 = queryWithLimit(query('foo'), 1, LimitType.First); - expect(query1.matchesAllDocuments()).to.be.false; + expect(matchesAllDocuments(query1)).to.be.false; query1 = queryWithStartAt(baseQuery, bound([], true)); - expect(query1.matchesAllDocuments()).to.be.false; + expect(matchesAllDocuments(query1)).to.be.false; query1 = queryWithEndAt(baseQuery, bound([], true)); - expect(query1.matchesAllDocuments()).to.be.false; + expect(matchesAllDocuments(query1)).to.be.false; }); function assertImplicitOrderBy(query: Query, ...orderBys: OrderBy[]): void { diff --git a/packages/firestore/test/unit/specs/spec_builder.ts b/packages/firestore/test/unit/specs/spec_builder.ts index 99add76d3be..1481de1cc47 100644 --- a/packages/firestore/test/unit/specs/spec_builder.ts +++ b/packages/firestore/test/unit/specs/spec_builder.ts @@ -21,7 +21,9 @@ import { queryEquals, Filter, newQueryForPath, - queryToTarget + queryToTarget, + hasLimitToLast, + hasLimitToFirst } from '../../../src/core/query'; import { canonifyTarget, Target, targetEquals } from '../../../src/core/target'; import { TargetIdGenerator } from '../../../src/core/target_id_generator'; @@ -948,11 +950,11 @@ export class SpecBuilder { if (query.collectionGroup !== null) { spec.collectionGroup = query.collectionGroup; } - if (query.hasLimitToFirst()) { + if (hasLimitToFirst(query)) { spec.limit = query.limit!; spec.limitType = 'LimitToFirst'; } - if (query.hasLimitToLast()) { + if (hasLimitToLast(query)) { spec.limit = query.limit!; spec.limitType = 'LimitToLast'; }