167 bsoncxx::v_noabi::stdx::string_view filename,
168 options::gridfs::upload const& options = {});
200 bsoncxx::v_noabi::types::bson_value::view
id,
201 bsoncxx::v_noabi::stdx::string_view filename,
202 options::gridfs::upload const& options = {});
239 bsoncxx::v_noabi::types::bson_value::view
id,
240 bsoncxx::v_noabi::stdx::string_view filename,
241 options::gridfs::upload const& options = {});
286 bsoncxx::v_noabi::stdx::string_view filename,
287 std::istream* source,
288 options::gridfs::upload const& options = {});
337 bsoncxx::v_noabi::stdx::string_view filename,
338 std::istream* source,
339 options::gridfs::upload const& options = {});
384 bsoncxx::v_noabi::types::bson_value::view
id,
385 bsoncxx::v_noabi::stdx::string_view filename,
386 std::istream* source,
387 options::gridfs::upload const& options = {});
436 bsoncxx::v_noabi::types::bson_value::view
id,
437 bsoncxx::v_noabi::stdx::string_view filename,
438 std::istream* source,
439 options::gridfs::upload const& options = {});
512 bsoncxx::v_noabi::types::bson_value::view
id,
513 std::ostream* destination,
543 bsoncxx::v_noabi::types::bson_value::view
id,
544 std::ostream* destination);
555 bsoncxx::v_noabi::types::bson_value::view
id,
556 std::ostream* destination,
610 find(
bsoncxx::v_noabi::document::view_or_value filter, options::
find const& options = {});
638 bsoncxx::v_noabi::document::view_or_value filter,
639 options::
find const& options = {});
650 friend ::mongocxx::v_noabi::database;
655 void create_indexes_if_nonexistent(
client_session const* session);
657 uploader _open_upload_stream_with_id(
663 void _upload_from_stream_with_id(
667 std::istream* source,
676 void _download_to_stream(
679 std::ostream* destination,
688 impl
const& _get_impl()
const;
690 std::unique_ptr<impl> _impl;
A polyfill for std::optional<T>.
Definition optional.hpp:800
A polyfill for std::string_view.
Definition string_view.hpp:411
A non-owning variant that can contain any BSON type.
Definition view.hpp:55
Supports MongoDB client session operations.
Definition client_session.hpp:50
A cursor over the documents returned by a query to a MongoDB server.
Definition cursor.hpp:42
A MongoDB database.
Definition database.hpp:46
A GridFS bucket.
Definition bucket.hpp:66
downloader open_download_stream(bsoncxx::v_noabi::types::bson_value::view id)
Opens a gridfs::downloader to read a GridFS file.
uploader open_upload_stream(bsoncxx::v_noabi::stdx::string_view filename, options::gridfs::upload const &options={})
Opens a gridfs::uploader to create a new GridFS file. The id of the file will be automatically genera...
void upload_from_stream_with_id(bsoncxx::v_noabi::types::bson_value::view id, bsoncxx::v_noabi::stdx::string_view filename, std::istream *source, options::gridfs::upload const &options={})
Creates a new GridFS file with a user-supplied unique id by uploading bytes from an input stream.
void delete_file(bsoncxx::v_noabi::types::bson_value::view id)
Deletes a GridFS file from the bucket.
uploader open_upload_stream_with_id(bsoncxx::v_noabi::types::bson_value::view id, bsoncxx::v_noabi::stdx::string_view filename, options::gridfs::upload const &options={})
Opens a gridfs::uploader to create a new GridFS file.
result::gridfs::upload upload_from_stream(bsoncxx::v_noabi::stdx::string_view filename, std::istream *source, options::gridfs::upload const &options={})
Creates a new GridFS file by uploading bytes from an input stream. The id of the file will be automat...
bucket() noexcept
Default constructs a bucket object. The bucket is equivalent to the state of a moved from bucket....
void download_to_stream(bsoncxx::v_noabi::types::bson_value::view id, std::ostream *destination)
Downloads the contents of a stored GridFS file from the bucket and writes it to a stream.
cursor find(bsoncxx::v_noabi::document::view_or_value filter, options::find const &options={})
Finds the documents in the files collection of the bucket which match the provided filter.
bsoncxx::v_noabi::stdx::string_view bucket_name() const
Gets the name of the GridFS bucket.
Used to download a GridFS file.
Definition downloader.hpp:48
Used to upload a GridFS file.
Definition uploader.hpp:43
Used by mongocxx::v_noabi::gridfs::bucket.
Definition bucket.hpp:37
Used by mongocxx::v_noabi::gridfs::bucket.
Definition upload.hpp:32
The result of a GridFS upload operation.
Definition upload.hpp:30
Provides mongocxx::v_noabi::cursor.
Declares mongocxx::v_noabi::database.
Provides bsoncxx::v_noabi::document::view_or_value.
Provides utilities to download GridFS files.
Provides mongocxx::v_noabi::options::find.
Declares mongocxx::v_noabi::gridfs::bucket.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard postlude header.
The mongocxx v_noabi macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
The top-level namespace within which all mongocxx library entities are declared.
Provides mongocxx::v_noabi::options::gridfs::bucket.
Provides mongocxx::v_noabi::options::gridfs::upload.
Provides mongocxx::v_noabi::result::gridfs::upload.
Provides bsoncxx::v_noabi::types::bson_value::view.
Provides utilities to upload GridFS files.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.