* Add equality operator on aggregate query.
* Revert file not to have been included in previous commit.
* Add AggregateQuery tests
* Pretty
* Copyright
* Undo
* Improve aggregate query tests.
* Pretty
* Add test to Xcode
* Remove unused namespace alias.
* Remove unused 'using' statements.
* Remove more unused 'using' and namspace aliases.
* Prefer absl::StrContains over comparing `find` result with `npos`.
* Remove more unused things.
* Prefer usage of `empty()` over `size()` when possible.
* Remove more unused things.
* Address code review.
* Address code review.
* More fixes to query_core.cc
* comment should match parameter name.
* Pre-allocate container capacity for better performance.
* More fixes.
* Fix inconsistent declaration parameter name.
* Fix inconsistent declaration parameter name.
* Fix inconsistent declaration parameter name.
* Address bugprone-inaccurate-erase (inappropriate `erase` overload was used).
* Fix return type of move and copy constructor.
* Fix bugprone use after move.
* Fix formatting.
* Reflect the param name change in the doc.
* Add header for API proposal
* Fix some bugs and add implmentation
* Fix header import
* Fix umbrella header
* Add ways to modify settings object
* Remove unnecessary nodoc
* Update with new API
* Add implementations for Firestore and RTDB
* Revert emulator settings class
* fix style
* Remove bad import and assertion on override
* Prevent database emu from being set after repo init
* Add unified emu to functions
* Add tests
* update header comment
* fix test failures
* remove unused variable
* fix database test
* cast NSInteger to long
* fix style
* Fix functions test in travis
* Remove valueForKeyPath in tests
* fix style
* update comments and remove explicit scheme
* save progress
* Implement reference validation for RTDB
* Add tests
* Add changelog entries
* Remove test logs
* Fix line lengths
* remove underlyingHost
* fix functions tests
* fix integration warnings in functions test
* fix functions test
* Fix infinite loop exposed in integration tests (#6912)
Co-authored-by: Paul Beusterien <paulbeusterien@google.com>
* Manual Xcode project fixups
* Remove `firebase/firestore` from paths in Firestore/core
This renames all Firestore files under `Firestore/core` to remove the
interior `firebase/firestore` directory structure. This is motivated by
build failures under Windows where the filenames of intermediates were
too long.
Concretely:
* `Firebase/core/src/firebase/firestore` becomes `Firebase/core/src`
* `Firebase/core/test/firebase/firestore` becomes
`Firebase/core/test/unit`
Moving the tests into a `unit` subdirectory aligns Firestore with the
directory structure in
[AddNewPod](https://github.com/firebase/firebase-ios-sdk/blob/master/AddNewPod.md),
modified for C++ (see discussion in #3224).
* Fix unused variable warnings
These are now exposed because libprotobuf is no longer polluting the
compiler command-line with -Wno-unused-parameter.
* Convert (void)var to __unused where possible
* Shorten firebase_firestore_example_app
... and:
* Migrate to firebase_ios_add_executable
* Use globs for specifying sources
* Migrate Example/Tests/API to new CMake primitives
* Migrate Example/Tests/Integration to new CMake primitives
* Migrate Example/Tests/SpecTests to new CMake primitives
* Migrate Example/Tests/Util to new CMake primitives
Rename firebase_firestore_objc_test_util to firestore_objc_testing.
* Migrate fuzzing to new CMake primitives
Rewrite firebase_ios_cc_fuzz_test to match the other primitives.
* Add firebase_ios_add_objc_test
* Migrate Example/Benchmarks to new CMake primitives
* Use early exit in objc_framework CMakeLists.txt
* Clean up objc_framework CMakeLists.txt
* Use `version` consistently
* Use `firebase_ios_version` for the repo-level version
* Remove INCLUDE directories that are no longer needed
* Sort dependencies
* Simplify Example/App/CMakeLists.txt
* Add `OBJC_FLAGS` directly, avoiding a separate `sources` variable.
* Add resources directly
* Rename test host app to firebase_firestore_example_app
* Add a firebase_ios prefix to functions and variables
This reduces the chance of collision with other projects.
* Simplify compiler_setup
Now that compiler_setup.cmake no longer has side-effects, fold
compiler_id.cmake and archive_options.cmake into it and move
the include of compiler_setup up to the top of the main build.
* Remove rarely used template argumnets from SortedMap/SortedSet
* Remove unused STATUS_CHECK_OK
* Rename QuerySnapshot::Listener to QuerySnapshotListener
This makes the type something that can be forward declared.
* Rename DocumentSnapshot::Listener to DocumentSnapshotListener
This makes the type something that can be forward declared.
* Rename ViewSnapshot::Listener to ViewSnapshotListener
This makes the type something that can be forward declared.
* Put most QueryListener implementation in .cc
* Actually use sync_engine_callback.h
* Add forward declaration headers for api, core, and model
These centralize forward declarations, including declarations for some
hard-to-forward-declare types.
* Move includes of hard_assert.h out of other headers
* Make testutil definitions out of line
* Move definitions out-of-line
* Move DocumentKey definitions out-of-line
* Move definitions out-of-line
* Shorten unnecessarily long namespace usages
* Use default destructors where possible
* Delete unused MutationBatch::kUnknown constant
* Use forward declarations instead of IWYU
* Misc fixups from Linux/GCC 9.2.1
* Fix testutil under VS 2017
Forward declarations of functions local to a function body end up
generating unresolved externals. Reduce most of these back to just
calling FieldValue::FromX methods.
* Change string parameters from absl::string_view to std::string
No abseil types can be used as parameters in this package.
This fixes an issue where Unity builds fail due to missing symbols.
The underlying issue is that Abseil in CocoaPods is an LTS release and
LTS releases contain an inline namespace, making types like
absl::string_view link as absl::lts_2019_08_08::string_view. When
compiling Firestore in google3 it uses the abseil in //third_party/absl,
which is not an LTS release and does not include the inline namespace.
This disagreement causes issues for the public C++ API which is compiled
in google3 and consumes code in the API package.
* Avoid absl::any in interfaces shared with public C++
* Make resource-related methods class members
This gives them access to private methods of friends of Serializer.
* Access control FieldPath/ResourcePath construction
* Access control Document construction
* Access control FieldValue construction
* Access control TransformOperation methods
* Remove DocumentSnapshot constructor that takes metadata pieces individually
* Restrict access to DocumentSnapshot from optional<Document>
* Add comments indicating how Abseil types are restricted
* Make DocumentKey::FromPathString take std::string
* Add Objective-C API tests to the CMake build
* Fix signedness warnings under the CMake build
* Get the remainder of Objective-C tests running under CMake
Also:
* Add a Path::HasExtension check
* Change spec tests to pick up json without NSBundle
* Add Executor::CreateSerial
... a standard way to create an Executor for most cases where we don't
care about the implementation.
* Add ExecutorForTesting/AsyncQueueForTesting
Uses Executor::CreateSerial to do the heavy lifting.
* Use AsyncQueueForTesting
* Avoid direct references to ExecutorLibdispatch in prod code
* Rewrite time_testing in terms of absl::Time
* Migrate async_test_util's now to time_testing
* Fix AddressSanitizer stack-buffer-underflow error
This was reading random data off the stack until it hit a negative
integer's worth of data. The test passed because this was generating the
input and expected values, which were much longer than expected given
the input.
* Tidy up mutation_test.cc ahead of filling it out
* Move FSTUserDataConverter tests out of FSTMutationTests
* Add operator<< for Document
The compiler won't apply the one for MaybeDocument.
* Port FSTMutationTests to C++
* Delete FSTMutationTests
* Rewrite Document-related classes as a polymorphic value type
* Pass ObjectValue without rvalue references
* Rename HasLocalMutations
* Port C++ users to new Documents
* Port FSTDocumentTests to C++
* Port FSTDocumentSetTests to C++
* Migrate DocumentMap and DocumentSet to C++ Document
* Migrate test helpers
* Delete FSTDocumentSetTests
* Delete FSTDocumentTests
* Mechanical changes to use C++ Document
* Updates to the project file
* Nontrivial test updates
* Remove FSTTestDeletedDoc
* Remove FSTTestUnknownDoc
* Remove FSTDocument
* Convert usage of FSTDocument to C++ Document
* Fix Serializer usage of Documents
* Rename FIRQueryTests to FIRQueryUnitTests
* Make IntegrationTests targets run everything
The incremental cost of running all tests is an extra two seconds of run
time, but not starting the simulator three times during a build cuts
build times by ~25%.
* sync_project.rb generated changes
* sync_project.rb generated changes
* Remove AllTests_iOS aggregate target
* Add unit test deps to Firestore_IntegrationTests_*
* Fix BasicCompileTests on macOS and tvOS
* Run Firestore IntegrationTests only on Travis
This cuts build time for the job by about 25%, primarily due to not
having to start/deploy to the simulator repeatedly.
* working serverTimestamp
* working FieldValue. Still need: document ref and ability to Eq of FieldValue
* DocumentReference implemented and testing works
* clean up header search path
* improving FieldValue enum comments
* run through formatting
* addressing comments
* formatted with swiftformat 0.35.7
* add missing bool->BOOL change
* undo unintended swift version change
* remove unwanted proj file change
* remove C++11 library feature from `Timestamp` (which is supposed to be "portable");
* fix return type mismatch (`bool` vs `BOOL`);
* removed unused `using` declaration;
* fix typo in function name.
* Add FieldValue::Reference
* Migrate FSTReferenceValue to FSTDelegateValue
* Build Objective-C components with CMake
Build only the things required for FSTFieldValue
* Rename nanopb::String to nanopb::ByteString
... and flesh it out.
* Remove const pb_bytes_array* constructor
* Use std:: prefixes
* Pull forward CopyVector
* Simplify nanopb::Reader/Writer construction
* Reuse ByteString construction in serializer
* Add nanopb_testing.h
* Make QueryData.resume_token a ByteString
* Use ByteString as FieldValue::blob_value
* Migrate FSTBlobValue to FSTDelegateValue
* Rework the ByteString API
* Make data(), begin(), and end() never return nullptr
* Make copies of pb_bytes_array_t* more obvious (also avoids ambiguity
with the private constructor).
* Remove constructors that duplicate absl::string_view
* Make ByteString::Copy just a constructor
* Remove EncodeBytes/DecodeBytes
These duplicate ByteString constructors
* Overhaul ByteString and users
* Remove most conversions from ByteString
* Put remaining conversions in nanopb_util as free functions
* Make ByteStringWriter accumulate in a pb_bytes_array_t*
* Have ProtobufSerialize use ByteStringWriter
* Avoid reserving/writing if we're not asked to append data
* Ensure ByteStringWriter initializes/frees
* Make copies explicit
* Make Reserve match std::vector::reserve
* Add comments, assertions, and tests
* Migrate FSTNullValue to FSTDelegateValue
* Migrate FSTIntegerValue to FSTDelegateValue
* Migrate FSTDoubleValue to FSTDelegateValue
* Migrate FSTGeoPointValue to FSTDelegateValue
* Remove stale references to DatabaseId
* Have Firestore take the DatabaseId directly
* Allow tests to default the database implicitly
* Have FSTSerializerBeta take DatabaseId by value
* Have FSTUserDataConverter take DatabaseId by value
* Make FIRFirestore.databaseID a const reference
* Make FSTFirestoreClient.databaseID a const reference
* Have FSTReferenceValue take DatabaseId by value
* Have DatabaseInfo take DatabaseId by value
* Have Serializer take DatabaseId by value
* Fix C++ ReferenceValue
* Take DatabaseId by value
* Reverse order to match Android
* Rename `reference` to `key`
* Split data conversion tests into FSTUserDataConverterTests
* Add TestUtil Value/Object to match Java
* Port Java FieldValue tests
* FieldValue::Map -> ObjectValue (#3047)
This is safer and better matches our design (and the other platforms), since
classes like api::DocumentReference will have references to api::Firsetore but
the lifetime is controlled by the developer, not us.
use namespace aliases instead.
This makes the Objective-C code much more like what it's going to end up
being like when translated to C++: headers will include classes declared
in a namespace relative to firebase::firestore so everything else will
be named relative to firebase::firestore.
Meanwhile the using statements in the headers were causing us to miss
adding using statements in source files which was moving us away from
where we wanted to be.