* Rationalize input validation exceptions and assertions
... under a single ThrowHandler concept. This makes it possible to set
an alternative ThrowHandler in our C# bindings that properly translates
input validation exceptions to the correct .NET exception types.
* Rename api/input_validation.h to util/exception.h
* Reimplement util/hard_assert.h in terms of util/exception.h
* Rename transform_operation{s,}
* Convert TransformOperation to a polymorphic value class
* fixup! Convert TransformOperation to a polymorphic value class
* Remove ServerTimestampTransform::Get
* Add FieldValue::Reference
* Migrate FSTReferenceValue to FSTDelegateValue
* Build Objective-C components with CMake
Build only the things required for FSTFieldValue
... based on things learned porting Timestamps.
There's no good way to include conversions equivalent to toGeoPoint in
FIRTimestamp, so pull out separate conversion functions that match other
similar things.
* 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`
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.
* Fix FSTFieldValue instanceof check to use FSTFieldValue.type
Missed in the previous PR because this gets the class via [value class]
rather than [value isKindOfClass].
* Add FSTDelegateValue which delegates to model::FieldValue
Also migrates FSTBooleanValue to FSTDelegateValue as a proof-of-concept.
Other FSTXValues still TODO.
Extract useful bits of FSTUserDataConverter for use in C++:
* Migrate FSTParsedSetData to core::ParsedSetData
* Migrate FSTParsedUpdateData to core::ParsedUpdateData
* Migrate FSTParseContext to core::ParseContext
* Split ParseAccumulator out of ParseContext to make ownership easier
Also:
* Remove dead code (handled in parseSentinelFieldValue)
* Flatten App/iOS/Supporting Files into the parent
This includes the new FIRFieldValue sentinels, the FSTUserDataConverter code to parse them into internal ArrayTransform operations for use in an FSTTransformMutation, and some sanity testing in FSTMutationTests.
I still need to implement FSTTransformMutation support for local application and serialization (and then integration tests).
* port FieldMask to C++
* address changes
* address changes
* fix test
* address change
* Port transform operations (FSTTransformOperation, FSTServerTimestampTransform) to C++
* address changes
* address changes
* address changes
* implement `FieldTransform` in C++
* port `FieldTransform`
* make `fieldTransforms` shared inside `context`
* Implement Precondition in C++ w/o test yet
* add unit test for `Precondition`
* port `Precondition`
* address changes
* address changes
* fix bugs for integration test
* address changes
* fix lint
* address changes
* address changes
* naively remove FSTPath import and source/test files.
* port FieldPath, part I
* port FieldPath, part II
* port ResourcePath, part I
* port ResourcePath, part II
* the grand commit to fix build errors
* use testutil:: helper instead of those from FSTHelpers
* fix test and lint
* use c_str in errmsg directly
* fix
* fix
* make code clean
* fix integration test I missed
* fix to avoid naming collision in preprocessor
* address changes
* address changes
* address changes
* fix: fieldMask are actually shared with different context.
* address changes
* address changes
- FSTTimestamp is now FIRTimestamp, under Firestore/Source/{Public,API}. This is a temporary solution; eventually, FIRTimestamp is supposed to live somewhere under Firebase;
- move most internal Timestamp methods to the public header (the only exception is ISOString).
* implement Firestore DatabaseInfo in C++
* temporary stash changes; blocking on the massive renaming of .m to .mm
* add database_info_test to project
* finish port DatabaseId and fix style, modular fixing DatabaseInfo
* port DatabaseInfo
* remove FSTDatabase{ID,Info} and their tests from project
* fix unit test
* use namespace alias
* use namespace alias, leftover
* address more changes
* refactoring to use raw pointer instead of value for property
* address changes
* remove self->
* fix style
* remove the name suffix Alloc
* fix a bug
* Move all Firestore files to Objective-C++
* Update project file references
* Don't use module imports from Objective-C++
* Use extern "C" for C-accessible globals
* Work around more stringent type checking in Objective-C++
* NSMutableDictionary ivars aren't implicitly casted to NSDictionary
* FSTMaybeDocument callback can't be passed a function that accepts
FSTDocument
* NSComparisonResult can't be multiplied by -1 without casting
* Add a #include <inttypes.h> where needed
* Avoid using C++ keywords as variables
* Remove #if __cplusplus guards