MongoDB C++ Driver 4.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
upload.hpp
Go to the documentation of this file.
1// Copyright 2009-present MongoDB, Inc.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#pragma once
16
18
21
23
24namespace mongocxx {
25namespace v_noabi {
26namespace options {
27namespace gridfs {
28
32class upload {
33 public:
46
55
68
75 MONGOCXX_ABI_EXPORT_CDECL(bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> const&)
76 metadata() const;
77
78 private:
79 bsoncxx::v_noabi::stdx::optional<std::int32_t> _chunk_size_bytes;
80 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view_or_value> _metadata;
81};
82
83} // namespace gridfs
84} // namespace options
85} // namespace v_noabi
86} // namespace mongocxx
87
88#include <mongocxx/config/postlude.hpp>
89
A polyfill for std::optional<T>.
Definition optional.hpp:800
Used by mongocxx::v_noabi::gridfs::bucket.
Definition upload.hpp:32
upload & metadata(bsoncxx::v_noabi::document::view_or_value metadata)
Sets the metadata field of the GridFS file being uploaded. A GridFS file can store arbitrary metadata...
upload & chunk_size_bytes(std::int32_t chunk_size_bytes)
Sets the chunk size of the GridFS file being uploaded. Defaults to the chunk size specified in option...
Provides bsoncxx::v_noabi::document::view_or_value.
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition export.hpp:52
The mongocxx v_noabi macro guard prelude header.
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities representing options specific to GridFS.
Declares entities representing options to use with various commands.
Declares entities whose ABI stability is NOT guaranteed.
The top-level namespace within which all mongocxx library entities are declared.
Declares mongocxx::v_noabi::options::gridfs::upload.
Provides std::optional-related polyfills for library API usage.