21 #include <mongocxx/gridfs/bucket-fwd.hpp>
22 #include <mongocxx/gridfs/uploader-fwd.hpp>
24 #include <bsoncxx/document/value.hpp>
25 #include <bsoncxx/stdx/optional.hpp>
26 #include <bsoncxx/stdx/string_view.hpp>
27 #include <bsoncxx/types/bson_value/view.hpp>
28 #include <bsoncxx/view_or_value.hpp>
29 #include <mongocxx/client_session.hpp>
30 #include <mongocxx/collection.hpp>
31 #include <mongocxx/result/gridfs/upload.hpp>
32 #include <mongocxx/stdx.hpp>
34 #include <mongocxx/config/prelude.hpp>
74 explicit operator
bool() const noexcept;
94 void write(const std::uint8_t* bytes, std::
size_t length);
154 bsoncxx::v_noabi::types::bson_value::view
id,
155 stdx::string_view filename,
159 stdx::optional<
bsoncxx::v_noabi::document::view_or_value> metadata = {});
161 MONGOCXX_PRIVATE
void finish_chunk();
162 MONGOCXX_PRIVATE
void flush_chunks();
164 class MONGOCXX_PRIVATE impl;
166 MONGOCXX_PRIVATE impl& _get_impl();
167 MONGOCXX_PRIVATE
const impl& _get_impl()
const;
169 std::unique_ptr<impl> _impl;
177 #if defined(MONGOCXX_TEST_MACRO_GUARDS_FIX_MISSING_POSTLUDE)
178 #include <mongocxx/config/postlude.hpp>
Use a session for a sequence of operations, optionally with either causal consistency or snapshots.
Definition: client_session.hpp:47
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:86
Class representing a GridFS bucket.
Definition: bucket.hpp:63
Class used to upload a GridFS file.
Definition: uploader.hpp:43
void abort()
Aborts uploading the file.
uploader() noexcept
Default constructs an uploader object.
void write(const std::uint8_t *bytes, std::size_t length)
Writes a specified number of bytes to a GridFS file.
std::int32_t chunk_size() const
Gets the chunk size of the file being uploaded.
result::gridfs::upload close()
Closes the uploader stream.
The top-level namespace for bsoncxx library entities.
Definition: element-fwd.hpp:19
The top-level namespace for mongocxx library entities.
Definition: bulk_write-fwd.hpp:19