Man page - mongoc_client_write_command_with_opts(3)
Packages contas this manual
- mongoc_client_encryption_encrypt_opts_t(3)
- mongoc_database_get_read_concern(3)
- mongoc_error_has_label(3)
- mongoc_apm_server_closed_get_topology_id(3)
- mongoc_bulkwritereturn_t(3)
- mongoc_read_concern_is_default(3)
- mongoc_server_descriptions_destroy_all(3)
- mongoc_apm_set_server_opening_cb(3)
- mongoc_apm_server_heartbeat_failed_get_duration(3)
- mongoc_apm_command_failed_get_service_id(3)
- mongoc_collection_find_with_opts(3)
- mongoc_rand_status(3)
- mongoc_session_opts_new(3)
- mongoc_uri_get_tls(3)
- mongoc_find_and_modify_opts_get_flags(3)
- mongoc_collection_get_read_prefs(3)
- mongoc_gridfs_bucket_find(3)
- mongoc_client_encryption_destroy(3)
- mongoc_client_encryption_opts_t(3)
- mongoc_socket_send(3)
- mongoc_stream_file_t(3)
- mongoc_gridfs_create_file(3)
- mongoc_index_opt_geo_t(3)
- mongoc_bulkwriteopts_t(3)
- mongoc_apm_command_failed_get_duration(3)
- mongoc_get_micro_version(3)
- mongoc_uri_get_auth_source(3)
- mongoc_apm_command_succeeded_get_host(3)
- mongoc_find_and_modify_opts_set_sort(3)
- mongoc_stream_timed_out(3)
- mongoc_client_encryption_get_key(3)
- mongoc_apm_command_succeeded_get_operation_id(3)
- mongoc_reference(3)
- mongoc_find_and_modify_opts_get_bypass_document_validation(3)
- mongoc_client_encryption_encrypt_opts_set_contention_factor(3)
- mongoc_auto_encryption_opts_set_schema_map(3)
- mongoc_uri_get_read_concern(3)
- mongoc_socket_t(3)
- mongoc_write_concern_destroy(3)
- mongoc_find_and_modify_opts_t(3)
- mongoc_apm_command_succeeded_get_duration(3)
- mongoc_stream_gridfs_new(3)
- mongoc_server_api_destroy(3)
- mongoc_optional_init(3)
- mongoc_client_set_ssl_opts(3)
- mongoc_socket_errno(3)
- mongoc_session_opts_set_snapshot(3)
- mongoc_gridfs_file_writev(3)
- mongoc_session_opts_get_default_transaction_opts(3)
- mongoc_uri_get_options(3)
- mongoc_apm_command_succeeded_get_server_id(3)
- mongoc_gridfs_file_set_md5(3)
- mongoc_gridfs_file_get_md5(3)
- mongoc_client_encryption_t(3)
- mongoc_bulk_operation_remove(3)
- mongoc_apm_command_succeeded_get_reply(3)
- mongoc_apm_command_failed_get_error(3)
- mongoc_socket_getsockname(3)
- mongoc_gridfs_file_list_t(3)
- mongoc_cursor_new_from_command_reply_with_opts(3)
- mongoc_server_api_copy(3)
- mongoc_uri_set_read_prefs_t(3)
- mongoc_read_prefs_set_mode(3)
- mongoc_database_drop(3)
- mongoc_client_get_server_status(3)
- mongoc_find_and_modify_opts_set_update(3)
- mongoc_stream_write(3)
- mongoc_apm_command_started_t(3)
- mongoc_collection_create_indexes_with_opts(3)
- mongoc_client_pool_set_server_api(3)
- mongoc_transaction_opts_get_read_concern(3)
- mongoc_structured_log_opts_set_max_levels_from_env(3)
- mongoc_gridfs_bucket_open_download_stream(3)
- mongoc_gridfs_bucket_abort_upload(3)
- mongoc_index_opt_geo_init(3)
- mongoc_client_pool_set_error_api(3)
- mongoc_apm_command_started_get_host(3)
- mongoc_client_encryption_rewrap_many_datakey_result_t(3)
- mongoc_apm_command_started_get_server_id(3)
- mongoc_collection_get_last_error(3)
- mongoc_client_session_get_transaction_state(3)
- mongoc_apm_topology_opening_get_topology_id(3)
- mongoc_bulkwrite_t(3)
- mongoc_client_encryption_get_keys(3)
- mongoc_bulkwrite_updatemanyopts_destroy(3)
- mongoc_collection_remove(3)
- mongoc_client_session_get_server_id(3)
- mongoc_apm_topology_changed_get_new_description(3)
- mongoc_apm_command_succeeded_get_service_id(3)
- mongoc_server_api_get_deprecation_errors(3)
- mongoc_change_stream_error_document(3)
- mongoc_database_add_user(3)
- mongoc_collection_find_indexes(3)
- mongoc_transaction_opt_t(3)
- mongoc_change_stream_get_resume_token(3)
- mongoc_bulk_operation_update_many_with_opts(3)
- mongoc_client_encryption_encrypt(3)
- mongoc_read_prefs_set_hedge(3)
- mongoc_collection_replace_one(3)
- mongoc_gridfs_file_list_next(3)
- mongoc_collection_count(3)
- mongoc_client_encryption_opts_set_tls_opts(3)
- mongoc_uri_set_read_concern(3)
- mongoc_apm_command_failed_get_server_connection_id_int64(3)
- mongoc_apm_server_heartbeat_succeeded_get_host(3)
- mongoc_write_concern_is_valid(3)
- mongoc_uri_set_password(3)
- mongoc_transaction_opts_get_max_commit_time_ms(3)
- mongoc_apm_server_opening_t(3)
- mongoc_bulk_operation_get_server_id(3)
- mongoc_transaction_state_t(3)
- mongoc_collection_aggregate(3)
- mongoc_bulkwrite_updateoneopts_destroy(3)
- mongoc_apm_command_started_get_request_id(3)
- mongoc_client_watch(3)
- mongoc_collection_copy(3)
- mongoc_database_create_collection(3)
- mongoc_socket_sendv(3)
- mongoc_find_and_modify_opts_set_fields(3)
- mongoc_client_pool_new_with_error(3)
- mongoc_apm_command_succeeded_get_command_name(3)
- mongoc_client_find_databases_with_opts(3)
- mongoc_apm_set_topology_closed_cb(3)
- mongoc_auto_encryption_opts_destroy(3)
- mongoc_transaction_opts_new(3)
- mongoc_index_opt_get_default(3)
- mongoc_collection_get_read_concern(3)
- mongoc_gridfs_file_t(3)
- mongoc_gridfs_bucket_upload_from_stream_with_id(3)
- mongoc_bulkwrite_deleteoneopts_set_collation(3)
- mongoc_server_description_host(3)
- mongoc_apm_command_failed_get_database_name(3)
- mongoc_client_read_write_command_with_opts(3)
- mongoc_auto_encryption_opts_set_bypass_auto_encryption(3)
- mongoc_collection_update_one(3)
- mongoc_collection_write_command_with_opts(3)
- mongoc_bulkwrite_execute(3)
- mongoc_bulkwriteopts_set_ordered(3)
- mongoc_uri_get_option_as_int64(3)
- mongoc_topology_description_t(3)
- mongoc_uri_get_mechanism_properties(3)
- mongoc_client_command_simple_with_server_id(3)
- mongoc_cursor_error(3)
- mongoc_bulk_operation_get_write_concern(3)
- mongoc_server_api_t(3)
- mongoc_client_t(3)
- mongoc_delete_flags_t(3)
- mongoc_collection_drop(3)
- mongoc_collection_count_with_opts(3)
- mongoc_client_encryption_opts_set_keyvault_client(3)
- mongoc_bulkwrite_deletemanyopts_destroy(3)
- mongoc_remove_flags_t(3)
- mongoc_client_bulkwrite_new(3)
- mongoc_collection_read_write_command_with_opts(3)
- mongoc_write_concern_get_wtag(3)
- mongoc_uri_set_auth_mechanism(3)
- mongoc_client_session_get_cluster_time(3)
- mongoc_gridfs_drop(3)
- mongoc_bulkwriteopts_set_verboseresults(3)
- mongoc_apm_server_closed_get_context(3)
- mongoc_bulk_operation_remove_one(3)
- mongoc_structured_log_func_t(3)
- mongoc_bulk_operation_insert(3)
- mongoc_apm_topology_changed_get_topology_id(3)
- mongoc_change_stream_destroy(3)
- mongoc_uri_option_is_int64(3)
- mongoc_client_session_get_operation_time(3)
- mongoc_server_api_deprecation_errors(3)
- mongoc_read_prefs_new(3)
- mongoc_write_concern_is_acknowledged(3)
- mongoc_bulkwrite_set_client(3)
- mongoc_topology_description_has_writable_server(3)
- mongoc_topology_description_get_servers(3)
- mongoc_cursor_clone(3)
- mongoc_write_concern_set_w(3)
- mongoc_bulkwrite_replaceoneopts_destroy(3)
- mongoc_cursor_current(3)
- mongoc_gridfs_file_tell(3)
- mongoc_collection_insert_one(3)
- mongoc_client_encryption_get_crypt_shared_version(3)
- mongoc_apm_topology_changed_t(3)
- mongoc_transaction_opts_get_write_concern(3)
- mongoc_read_prefs_t(3)
- mongoc_client_get_server_descriptions(3)
- mongoc_apm_topology_closed_get_topology_id(3)
- mongoc_read_prefs_set_tags(3)
- mongoc_client_encryption_opts_set_key_expiration(3)
- mongoc_read_prefs_get_hedge(3)
- mongoc_bulkwrite_insertoneopts_t(3)
- mongoc_apm_command_succeeded_get_context(3)
- mongoc_client_encryption_datakey_opts_set_keyaltnames(3)
- mongoc_get_minor_version(3)
- mongoc_server_api_new(3)
- mongoc_read_concern_destroy(3)
- mongoc_uri_get_compressors(3)
- mongoc_client_pool_min_size(3)
- mongoc_find_and_modify_opts_destroy(3)
- mongoc_client_session_get_client(3)
- mongoc_apm_topology_changed_get_previous_description(3)
- mongoc_client_set_stream_initiator(3)
- mongoc_read_concern_new(3)
- mongoc_bulkwrite_deletemanyopts_new(3)
- mongoc_cursor_is_alive(3)
- mongoc_topology_description_type(3)
- mongoc_stream_buffered_t(3)
- mongoc_apm_set_server_closed_cb(3)
- mongoc_init(3)
- mongoc_client_reset(3)
- mongoc_find_and_modify_opts_new(3)
- mongoc_read_mode_t(3)
- mongoc_change_stream_t(3)
- mongoc_collection_rename(3)
- mongoc_apm_server_changed_get_new_description(3)
- mongoc_database_drop_with_opts(3)
- mongoc_socket_bind(3)
- mongoc_structured_log_opts_new(3)
- mongoc_uri_option_is_bool(3)
- mongoc_apm_topology_changed_get_context(3)
- mongoc_structured_log_opts_set_max_document_length(3)
- mongoc_topology_description_new_copy(3)
- mongoc_bulkwriteopts_set_extra(3)
- mongoc_auto_encryption_opts_t(3)
- mongoc_gridfs_file_get_length(3)
- mongoc_transaction_opts_set_max_commit_time_ms(3)
- mongoc_client_encryption_rewrap_many_datakey_result_destroy(3)
- mongoc_gridfs_file_list_error(3)
- mongoc_client_encryption_encrypt_opts_set_keyaltname(3)
- mongoc_stream_cork(3)
- mongoc_stream_file_new(3)
- mongoc_session_opt_t(3)
- mongoc_structured_log_opts_set_max_level_for_component(3)
- mongoc_apm_server_changed_get_topology_id(3)
- mongoc_find_and_modify_opts_get_update(3)
- mongoc_client_session_destroy(3)
- mongoc_bulkwrite_deleteoneopts_destroy(3)
- mongoc_bulk_operation_destroy(3)
- mongoc_bulkwrite_replaceoneopts_t(3)
- mongoc_index_opt_geo_get_default(3)
- mongoc_uri_get_write_concern(3)
- mongoc_apm_server_heartbeat_succeeded_get_duration(3)
- mongoc_apm_callbacks_destroy(3)
- mongoc_client_enable_auto_encryption(3)
- mongoc_bulkwrite_set_session(3)
- mongoc_server_api_version_from_string(3)
- mongoc_client_command_with_opts(3)
- mongoc_client_get_read_concern(3)
- mongoc_gridfs_file_remove(3)
- mongoc_collection_t(3)
- mongoc_bulkwrite_append_updateone(3)
- mongoc_bulkwrite_insertoneopts_new(3)
- mongoc_bulkwriteexception_errorreply(3)
- mongoc_write_concern_new(3)
- mongoc_unstructured_log(3)
- mongoc_index_opt_wt_init(3)
- mongoc_client_destroy(3)
- mongoc_client_set_read_prefs(3)
- mongoc_rand_add(3)
- mongoc_apm_set_command_started_cb(3)
- mongoc_uri_get_read_prefs_t(3)
- mongoc_gridfs_find_one_by_filename(3)
- mongoc_client_encryption_encrypt_opts_set_query_type(3)
- mongoc_database_get_write_concern(3)
- mongoc_bulkwriteresult_deletedcount(3)
- mongoc_client_encryption_encrypt_opts_set_range_opts(3)
- mongoc_client_encryption_delete_key(3)
- mongoc_client_pool_destroy(3)
- mongoc_write_concern_t(3)
- mongoc_collection_create_bulk_operation_with_opts(3)
- mongoc_bulkwrite_replaceoneopts_set_hint(3)
- mongoc_uri_option_is_int32(3)
- mongoc_bulk_operation_delete_one(3)
- mongoc_rand(3)
- mongoc_client_encryption_encrypt_range_opts_set_trim_factor(3)
- mongoc_bulk_operation_set_bypass_document_validation(3)
- mongoc_collection_destroy(3)
- mongoc_structured_log_entry_get_component(3)
- mongoc_gridfs_file_error(3)
- mongoc_client_encryption_rewrap_many_datakey(3)
- mongoc_database_command_simple(3)
- mongoc_auto_encryption_opts_set_key_vault_namespace(3)
- mongoc_bulkwrite_deleteoneopts_t(3)
- mongoc_find_and_modify_opts_set_flags(3)
- mongoc_client_set_read_concern(3)
- mongoc_apm_set_topology_opening_cb(3)
- mongoc_gridfs_file_set_aliases(3)
- mongoc_client_pool_t(3)
- mongoc_apm_command_started_get_operation_id(3)
- mongoc_gridfs_file_opt_t(3)
- mongoc_auto_encryption_opts_set_encrypted_fields_map(3)
- mongoc_client_set_write_concern(3)
- mongoc_client_get_gridfs(3)
- mongoc_read_concern_copy(3)
- mongoc_gridfs_get_files(3)
- mongoc_gridfs_file_get_filename(3)
- mongoc_read_prefs_add_tag(3)
- mongoc_structured_log_opts_get_max_level_for_component(3)
- mongoc_client_encryption_opts_set_kms_credential_provider_callback(3)
- mongoc_client_session_in_transaction(3)
- mongoc_client_encryption_rewrap_many_datakey_result_new(3)
- mongoc_apm_command_started_get_database_name(3)
- mongoc_database_watch(3)
- mongoc_server_description_round_trip_time(3)
- mongoc_transaction_opts_destroy(3)
- mongoc_gridfs_get_chunks(3)
- mongoc_cursor_set_server_id(3)
- mongoc_client_write_command_with_opts(3)
- mongoc_cursor_get_hint(3)
- mongoc_bulkwrite_updateoneopts_new(3)
- mongoc_socket_setsockopt(3)
- mongoc_ssl_opt_t(3)
- mongoc_client_session_advance_operation_time(3)
- mongoc_bulk_operation_update_one(3)
- mongoc_bulkwrite_replaceoneopts_set_sort(3)
- mongoc_transaction_opts_set_read_prefs(3)
- mongoc_collection_update_many(3)
- mongoc_structured_log_opts_get_max_document_length(3)
- mongoc_client_encryption_datakey_opts_destroy(3)
- mongoc_client_get_write_concern(3)
- mongoc_bulk_operation_replace_one_with_opts(3)
- mongoc_apm_callbacks_new(3)
- mongoc_write_concern_get_wmajority(3)
- mongoc_collection_update(3)
- mongoc_collection_command(3)
- mongoc_bulk_operation_set_let(3)
- mongoc_database_set_write_concern(3)
- mongoc_uri_has_option(3)
- mongoc_apm_command_started_get_command_name(3)
- mongoc_stream_uncork(3)
- mongoc_client_session_advance_cluster_time(3)
- mongoc_client_encryption_opts_destroy(3)
- mongoc_client_pool_new(3)
- mongoc_apm_command_started_get_server_connection_id(3)
- mongoc_stream_readv(3)
- mongoc_stream_get_base_stream(3)
- mongoc_write_concern_get_journal(3)
- mongoc_uri_set_mechanism_properties(3)
- mongoc_client_encryption_new(3)
- mongoc_database_get_name(3)
- mongoc_topology_description_destroy(3)
- mongoc_bulkwriteresult_matchedcount(3)
- mongoc_auto_encryption_opts_set_tls_opts(3)
- mongoc_client_encryption_encrypt_range_opts_new(3)
- mongoc_gridfs_bucket_delete_by_id(3)
- mongoc_session_opts_get_causal_consistency(3)
- mongoc_uri_set_option_as_int32(3)
- mongoc_gridfs_find_one(3)
- mongoc_stream_socket_new(3)
- mongoc_bulkwriteopts_set_comment(3)
- mongoc_iovec_t(3)
- mongoc_server_description_t(3)
- mongoc_write_concern_get_w(3)
- mongoc_bulkwriteresult_upsertedcount(3)
- mongoc_bulkwrite_destroy(3)
- mongoc_apm_command_failed_get_server_connection_id(3)
- mongoc_bulkwrite_updateoneopts_set_upsert(3)
- mongoc_get_major_version(3)
- mongoc_check_version(3)
- mongoc_gridfs_bucket_t(3)
- mongoc_bulk_operation_insert_with_opts(3)
- mongoc_client_start_session(3)
- mongoc_uri_get_password(3)
- mongoc_stream_close(3)
- mongoc_uri_get_read_prefs(3)
- mongoc_gridfs_create_file_from_stream(3)
- mongoc_gridfs_file_list_destroy(3)
- mongoc_read_prefs_is_valid(3)
- mongoc_apm_set_command_failed_cb(3)
- mongoc_collection_stats(3)
- mongoc_bulkwrite_replaceoneopts_set_upsert(3)
- mongoc_uri_set_compressors(3)
- mongoc_collection_insert_bulk(3)
- mongoc_apm_command_succeeded_get_database_name(3)
- mongoc_client_session_with_transaction_cb_t(3)
- mongoc_uri_new_with_error(3)
- mongoc_uri_option_is_utf8(3)
- mongoc_gridfs_file_destroy(3)
- mongoc_session_opts_get_transaction_opts(3)
- mongoc_client_encryption_rewrap_many_datakey_result_get_bulk_write_result(3)
- mongoc_gridfs_bucket_new(3)
- mongoc_apm_server_heartbeat_succeeded_get_context(3)
- mongoc_bulkwrite_updateoneopts_set_collation(3)
- mongoc_find_and_modify_opts_get_max_time_ms(3)
- mongoc_collection_set_read_concern(3)
- mongoc_server_description_hello_response(3)
- mongoc_database_copy(3)
- mongoc_write_concern_get_wtimeout(3)
- mongoc_structured_log_opts_set_max_document_length_from_env(3)
- mongoc_apm_server_heartbeat_started_t(3)
- mongoc_client_encryption_encrypt_range_opts_set_precision(3)
- mongoc_topology_description_has_readable_server(3)
- mongoc_bulk_operation_delete(3)
- mongoc_bulkwrite_deletemanyopts_t(3)
- mongoc_bulkwrite_updateoneopts_set_arrayfilters(3)
- mongoc_collection_read_command_with_opts(3)
- mongoc_bulkwriteexception_writeconcernerrors(3)
- mongoc_server_description_last_update_time(3)
- mongoc_client_session_abort_transaction(3)
- mongoc_optional_set_value(3)
- mongoc_client_get_server_description(3)
- mongoc_gridfs_file_get_content_type(3)
- mongoc_uri_set_server_monitoring_mode(3)
- mongoc_client_get_database_names_with_opts(3)
- mongoc_stream_should_retry(3)
- mongoc_database_find_collections_with_opts(3)
- mongoc_database_remove_all_users(3)
- mongoc_client_encryption_opts_new(3)
- mongoc_client_pool_set_appname(3)
- mongoc_uri_get_hosts(3)
- mongoc_structured_log_get_named_level(3)
- mongoc_transaction_opts_get_read_prefs(3)
- mongoc_bulkwriteexception_destroy(3)
- mongoc_apm_server_heartbeat_succeeded_get_awaited(3)
- mongoc_structured_log_component_t(3)
- mongoc_write_concern_copy(3)
- mongoc_client_set_appname(3)
- mongoc_client_session_append(3)
- mongoc_bulkwriteresult_updateresults(3)
- mongoc_bulkwrite_replaceoneopts_new(3)
- mongoc_bulkwrite_updatemanyopts_set_arrayfilters(3)
- mongoc_apm_command_failed_get_operation_id(3)
- mongoc_auto_encryption_opts_set_bypass_query_analysis(3)
- mongoc_bulkwriteresult_serverid(3)
- mongoc_read_concern_get_level(3)
- mongoc_gridfs_file_save(3)
- mongoc_cursor_t(3)
- mongoc_uri_get_auth_mechanism(3)
- mongoc_write_concern_get_wtimeout_int64(3)
- mongoc_bulkwrite_deletemanyopts_set_collation(3)
- mongoc_bulkwrite_updatemanyopts_set_collation(3)
- mongoc_apm_command_succeeded_t(3)
- mongoc_structured_log_entry_get_message_string(3)
- mongoc_query_flags_t(3)
- mongoc_read_prefs_get_mode(3)
- mongoc_bulkwrite_updateoneopts_set_sort(3)
- mongoc_client_pool_max_size(3)
- mongoc_bulkwrite_append_insertone(3)
- mongoc_cursor_get_server_id(3)
- mongoc_uri_set_option_as_utf8(3)
- mongoc_insert_flags_t(3)
- mongoc_client_encryption_datakey_opts_t(3)
- mongoc_cursor_error_document(3)
- mongoc_collection_find_and_modify(3)
- mongoc_optional_value(3)
- mongoc_bulk_operation_t(3)
- mongoc_get_version(3)
- mongoc_client_new_from_uri_with_error(3)
- mongoc_uri_get_replica_set(3)
- mongoc_structured_log_entry_message_as_bson(3)
- mongoc_collection_find_indexes_with_opts(3)
- mongoc_transaction_opts_set_write_concern(3)
- mongoc_cleanup(3)
- mongoc_cursor_set_max_await_time_ms(3)
- mongoc_client_encryption_encrypt_range_opts_t(3)
- mongoc_gridfs_file_get_metadata(3)
- mongoc_uri_get_ssl(3)
- mongoc_client_encryption_opts_set_key_vault_namespace(3)
- mongoc_cursor_next(3)
- mongoc_database_get_collection(3)
- mongoc_transaction_opts_clone(3)
- mongoc_auto_encryption_opts_set_extra(3)
- mongoc_bulkwriteresult_insertresults(3)
- mongoc_uri_get_username(3)
- mongoc_database_t(3)
- mongoc_bulk_operation_update_one_with_opts(3)
- mongoc_client_encryption_encrypt_opts_new(3)
- mongoc_session_opts_set_causal_consistency(3)
- mongoc_client_encryption_encrypt_opts_set_keyid(3)
- mongoc_apm_callbacks_t(3)
- mongoc_apm_server_opening_get_topology_id(3)
- mongoc_client_session_commit_transaction(3)
- mongoc_collection_validate(3)
- mongoc_collection_delete_one(3)
- mongoc_uri_set_write_concern(3)
- mongoc_apm_topology_closed_t(3)
- mongoc_database_remove_user(3)
- mongoc_bulkwriteexception_t(3)
- mongoc_rand_seed(3)
- mongoc_structured_log(3)
- mongoc_server_api_strict(3)
- mongoc_gridfs_file_get_id(3)
- mongoc_bulk_operation_get_hint(3)
- mongoc_index_opt_t(3)
- mongoc_gridfs_file_readv(3)
- mongoc_client_get_handshake_description(3)
- mongoc_database_find_collections(3)
- mongoc_transaction_opts_set_read_concern(3)
- mongoc_database_set_read_concern(3)
- mongoc_reply_flags_t(3)
- mongoc_client_pool_push(3)
- mongoc_client_get_uri(3)
- mongoc_bulkwrite_updatemanyopts_new(3)
- mongoc_read_prefs_set_max_staleness_seconds(3)
- mongoc_apm_command_failed_get_host(3)
- mongoc_structured_log_get_named_component(3)
- mongoc_bulkwriteopts_set_bypassdocumentvalidation(3)
- mongoc_client_encryption_encrypt_range_opts_set_min(3)
- mongoc_apm_topology_opening_t(3)
- mongoc_apm_server_heartbeat_failed_get_context(3)
- mongoc_database_set_read_prefs(3)
- mongoc_bulk_operation_execute(3)
- mongoc_logging(3)
- mongoc_client_set_server_api(3)
- mongoc_bulkwriteopts_new(3)
- mongoc_cursor_get_max_await_time_ms(3)
- mongoc_client_set_structured_log_opts(3)
- mongoc_bulkwrite_updatemanyopts_set_hint(3)
- mongoc_apm_set_server_changed_cb(3)
- mongoc_client_encryption_remove_key_alt_name(3)
- mongoc_apm_command_failed_get_reply(3)
- mongoc_uri_get_string(3)
- mongoc_session_opts_clone(3)
- mongoc_apm_command_started_get_service_id(3)
- mongoc_optional_t(3)
- mongoc_collection_get_name(3)
- mongoc_client_get_database(3)
- mongoc_socket_close(3)
- mongoc_apm_command_failed_get_server_id(3)
- mongoc_client_get_read_prefs(3)
- mongoc_client_pool_enable_auto_encryption(3)
- mongoc_client_encryption_datakey_opts_new(3)
- mongoc_client_set_sockettimeoutms(3)
- mongoc_server_api_version_t(3)
- mongoc_gridfs_file_get_chunk_size(3)
- mongoc_apm_command_succeeded_get_server_connection_id(3)
- mongoc_host_list_t(3)
- mongoc_collection_estimated_document_count(3)
- mongoc_uri_get_srv_hostname(3)
- mongoc_uri_get_option_as_bool(3)
- mongoc_client_encryption_add_key_alt_name(3)
- mongoc_write_concern_get_fsync(3)
- mongoc_client_set_apm_callbacks(3)
- mongoc_bulkwriteexception_writeerrors(3)
- mongoc_uri_set_auth_source(3)
- mongoc_server_api_get_strict(3)
- mongoc_collection_get_write_concern(3)
- mongoc_database_has_collection(3)
- mongoc_uri_new_for_host_port(3)
- mongoc_auto_encryption_opts_new(3)
- mongoc_bulkwriteopts_set_writeconcern(3)
- mongoc_gridfs_bucket_upload_from_stream(3)
- mongoc_stream_file_get_fd(3)
- mongoc_client_set_error_api(3)
- mongoc_server_description_ismaster(3)
- mongoc_client_encryption_create_encrypted_collection(3)
- mongoc_database_get_read_prefs(3)
- mongoc_write_concern_set_wtimeout_int64(3)
- mongoc_bulkwriteresult_t(3)
- mongoc_gridfs_find_one_with_opts(3)
- mongoc_write_concern_append(3)
- mongoc_collection_create_index_with_opts(3)
- mongoc_client_pool_set_apm_callbacks(3)
- mongoc_uri_get_database(3)
- mongoc_apm_set_server_heartbeat_succeeded_cb(3)
- mongoc_bulkwrite_updatemanyopts_t(3)
- mongoc_bulkwrite_append_replaceone(3)
- mongoc_gridfs_file_set_metadata(3)
- mongoc_collection_drop_index(3)
- mongoc_apm_server_heartbeat_failed_get_awaited(3)
- mongoc_client_select_server(3)
- mongoc_database_command_with_opts(3)
- mongoc_optional_copy(3)
- mongoc_stream_writev(3)
- mongoc_database_write_command_with_opts(3)
- mongoc_session_opts_set_default_transaction_opts(3)
- mongoc_find_and_modify_opts_get_sort(3)
- mongoc_stream_tls_t(3)
- mongoc_socket_accept(3)
- mongoc_index_opt_wt_get_default(3)
- mongoc_find_and_modify_opts_append(3)
- mongoc_find_and_modify_opts_get_fields(3)
- mongoc_apm_command_failed_get_command_name(3)
- mongoc_database_get_collection_names(3)
- mongoc_apm_server_closed_get_host(3)
- mongoc_bulk_operation_set_server_id(3)
- mongoc_server_description_type(3)
- mongoc_client_command(3)
- mongoc_stream_buffered_new(3)
- mongoc_bulkwrite_deleteoneopts_set_hint(3)
- mongoc_apm_command_failed_t(3)
- mongoc_gridfs_find(3)
- mongoc_socket_listen(3)
- mongoc_server_description_id(3)
- mongoc_structured_log_opts_set_max_level_for_all_components(3)
- mongoc_structured_log_get_component_name(3)
- mongoc_gridfs_file_get_upload_date(3)
- mongoc_cursor_more(3)
- mongoc_gridfs_bucket_open_upload_stream_with_id(3)
- mongoc_client_session_t(3)
- mongoc_cursor_set_hint(3)
- mongoc_gridfs_t(3)
- mongoc_client_pool_try_pop(3)
- mongoc_read_prefs_copy(3)
- mongoc_stream_setsockopt(3)
- mongoc_client_pool_set_ssl_opts(3)
- mongoc_read_concern_t(3)
- mongoc_apm_server_heartbeat_failed_get_host(3)
- mongoc_bulkwrite_append_deletemany(3)
- mongoc_client_encryption_create_datakey(3)
- mongoc_uri_set_username(3)
- mongoc_bulkwrite_updateoneopts_t(3)
- mongoc_collection_insert_many(3)
- mongoc_collection_command_with_opts(3)
- mongoc_gridfs_file_set_filename(3)
- mongoc_client_encryption_encrypt_range_opts_destroy(3)
- mongoc_client_pool_set_structured_log_opts(3)
- mongoc_bulk_operation_replace_one(3)
- mongoc_apm_command_started_get_server_connection_id_int64(3)
- mongoc_uri_new(3)
- mongoc_client_new_from_uri(3)
- mongoc_cursor_destroy(3)
- mongoc_database_get_collection_names_with_opts(3)
- mongoc_find_and_modify_opts_set_bypass_document_validation(3)
- mongoc_auto_encryption_opts_set_kms_providers(3)
- mongoc_apm_set_command_succeeded_cb(3)
- mongoc_auto_encryption_opts_set_kms_credential_provider_callback(3)
- mongoc_collection_find(3)
- mongoc_bulkwrite_updateoneopts_set_hint(3)
- mongoc_collection_ensure_index(3)
- mongoc_index_opt_init(3)
- mongoc_apm_server_heartbeat_started_get_context(3)
- mongoc_bulkwriteopts_set_let(3)
- mongoc_client_encryption_encrypt_opts_destroy(3)
- mongoc_server_description_destroy(3)
- mongoc_structured_log_entry_t(3)
- mongoc_collection_keys_to_index_string(3)
- mongoc_bulk_operation_update(3)
- mongoc_gridfs_file_set_id(3)
- mongoc_auto_encryption_opts_set_key_vault_client(3)
- mongoc_stream_socket_t(3)
- mongoc_ssl_opt_get_default(3)
- mongoc_application_performance_monitoring(3)
- mongoc_bulk_operation_remove_many_with_opts(3)
- mongoc_index_opt_wt_t(3)
- mongoc_apm_command_failed_get_context(3)
- mongoc_bulkwriteopts_set_serverid(3)
- mongoc_server_api_version_to_string(3)
- mongoc_stream_t(3)
- mongoc_apm_server_opening_get_host(3)
- mongoc_database_read_write_command_with_opts(3)
- mongoc_gridfs_bucket_destroy(3)
- mongoc_structured_log_level_t(3)
- mongoc_auto_encryption_opts_set_key_expiration(3)
- mongoc_client_session_get_dirty(3)
- mongoc_uri_set_option_as_bool(3)
- mongoc_client_session_start_transaction(3)
- mongoc_gridfs_bucket_download_to_stream(3)
- mongoc_client_encryption_opts_set_kms_providers(3)
- mongoc_socket_connect(3)
- mongoc_client_read_command_with_opts(3)
- mongoc_client_get_database_names(3)
- mongoc_write_concern_journal_is_set(3)
- mongoc_bulkwriteresult_deleteresults(3)
- mongoc_bulkwrite_deleteoneopts_new(3)
- mongoc_apm_server_opening_get_context(3)
- mongoc_apm_server_heartbeat_succeeded_t(3)
- mongoc_gridfs_file_set_content_type(3)
- mongoc_client_command_simple(3)
- mongoc_collection_create_index(3)
- mongoc_bulkwriteresult_destroy(3)
- mongoc_uri_copy(3)
- mongoc_uri_get_service(3)
- mongoc_client_encryption_encrypt_opts_set_algorithm(3)
- mongoc_write_concern_set_wtimeout(3)
- mongoc_stream_socket_get_socket(3)
- mongoc_collection_insert(3)
- mongoc_database_aggregate(3)
- mongoc_apm_topology_closed_get_context(3)
- mongoc_client_get_default_database(3)
- mongoc_read_prefs_destroy(3)
- mongoc_bulkwriteopts_destroy(3)
- mongoc_bulk_operation_set_hint(3)
- mongoc_cursor_set_limit(3)
- mongoc_client_session_get_opts(3)
- mongoc_bulkwrite_append_updatemany(3)
- mongoc_structured_log_opts_destroy(3)
- mongoc_bulkwrite_insertoneopts_destroy(3)
- mongoc_apm_server_heartbeat_failed_t(3)
- mongoc_database_read_command_with_opts(3)
- mongoc_uri_get_server_monitoring_mode(3)
- mongoc_gridfs_remove_by_filename(3)
- mongoc_apm_server_changed_t(3)
- mongoc_client_encryption_encrypt_expression(3)
- mongoc_cursor_get_batch_size(3)
- mongoc_apm_server_changed_get_previous_description(3)
- mongoc_uri_destroy(3)
- mongoc_client_encryption_encrypt_range_opts_set_sparsity(3)
- mongoc_apm_set_server_heartbeat_failed_cb(3)
- mongoc_cursor_set_batch_size(3)
- mongoc_apm_set_topology_changed_cb(3)
- mongoc_client_new(3)
- mongoc_uri_get_option_as_utf8(3)
- mongoc_bulkwrite_append_deleteone(3)
- mongoc_stream_read(3)
- mongoc_database_destroy(3)
- mongoc_apm_command_succeeded_get_server_connection_id_int64(3)
- mongoc_uri_set_database(3)
- mongoc_collection_count_documents(3)
- mongoc_client_pool_pop(3)
- mongoc_database_command(3)
- mongoc_collection_set_write_concern(3)
- mongoc_client_get_collection(3)
- mongoc_structured_log_get_level_name(3)
- mongoc_apm_server_changed_get_context(3)
- mongoc_uri_set_option_as_int64(3)
- mongoc_cursor_new_from_command_reply(3)
- mongoc_collection_drop_with_opts(3)
- mongoc_client_decryption_decrypt(3)
- mongoc_apm_command_succeeded_get_request_id(3)
- mongoc_apm_server_changed_get_host(3)
- mongoc_read_concern_append(3)
- mongoc_cursor_get_host(3)
- mongoc_write_concern_set_journal(3)
- mongoc_auto_encryption_opts_set_key_vault_client_pool(3)
- mongoc_init_cleanup(3)
- mongoc_client_session_with_transaction(3)
- mongoc_bulkwrite_replaceoneopts_set_collation(3)
- mongoc_collection_rename_with_opts(3)
- mongoc_client_encryption_encrypt_range_opts_set_max(3)
- mongoc_session_opts_get_snapshot(3)
- mongoc_apm_set_server_heartbeat_started_cb(3)
- mongoc_bulk_operation_set_client_session(3)
- mongoc_stream_flush(3)
- mongoc_find_and_modify_opts_set_max_time_ms(3)
- mongoc_apm_command_failed_get_request_id(3)
- mongoc_collection_delete(3)
- mongoc_apm_server_heartbeat_started_get_awaited(3)
- mongoc_structured_log_entry_get_level(3)
- mongoc_session_opts_destroy(3)
- mongoc_socket_destroy(3)
- mongoc_collection_watch(3)
- mongoc_handshake_data_append(3)
- mongoc_update_flags_t(3)
- mongoc_bulkwriteresult_insertedcount(3)
- mongoc_structured_log_opts_t(3)
- mongoc_bulk_operation_remove_one_with_opts(3)
- mongoc_gridfs_find_with_opts(3)
- mongoc_collection_command_simple(3)
- mongoc_read_prefs_get_max_staleness_seconds(3)
- mongoc_collection_set_read_prefs(3)
- mongoc_structured_log_opts_set_handler(3)
- mongoc_client_encryption_datakey_opts_set_masterkey(3)
- mongoc_write_concern_set_wmajority(3)
- mongoc_collection_create_bulk_operation(3)
- mongoc_write_concern_set_wtag(3)
- mongoc_version(3)
- mongoc_gridfs_bucket_open_upload_stream(3)
- mongoc_uri_unescape(3)
- mongoc_change_stream_next(3)
- mongoc_socket_new(3)
- mongoc_gridfs_bucket_stream_error(3)
- mongoc_collection_find_and_modify_with_opts(3)
- mongoc_socket_recv(3)
- mongoc_bulkwriteresult_modifiedcount(3)
- mongoc_bulkwrite_new(3)
- mongoc_uri_get_srv_service_name(3)
- mongoc_uri_get_option_as_int32(3)
- mongoc_bulkwriteexception_error(3)
- mongoc_socket_getnameinfo(3)
- mongoc_stream_file_new_for_path(3)
- mongoc_write_concern_is_default(3)
- mongoc_errors(3)
- mongoc_client_encryption_get_key_by_alt_name(3)
- mongoc_apm_command_started_get_command(3)
- mongoc_read_prefs_get_tags(3)
- mongoc_apm_server_closed_t(3)
- mongoc_write_concern_set_fsync(3)
- mongoc_server_description_new_copy(3)
- mongoc_uri_t(3)
- mongoc_collection_delete_many(3)
- mongoc_apm_server_heartbeat_succeeded_get_reply(3)
- mongoc_gridfs_file_seek(3)
- mongoc_apm_topology_opening_get_context(3)
- mongoc_bulkwrite_deletemanyopts_set_hint(3)
- mongoc_apm_command_started_get_context(3)
- mongoc_bulk_operation_set_comment(3)
- mongoc_client_encryption_datakey_opts_set_keymaterial(3)
- mongoc_apm_server_heartbeat_failed_get_error(3)
- mongoc_gridfs_destroy(3)
- mongoc_collection_save(3)
- mongoc_cursor_get_limit(3)
- mongoc_client_session_get_lsid(3)
- mongoc_collection_drop_index_with_opts(3)
- mongoc_server_api_get_version(3)
- mongoc_gridfs_file_get_aliases(3)
- mongoc_bulkwrite_updatemanyopts_set_upsert(3)
- mongoc_stream_destroy(3)
- mongoc_read_concern_set_level(3)
- mongoc_cursor_get_id(3)
- mongoc_client_get_crypt_shared_version(3)
- mongoc_apm_server_heartbeat_started_get_host(3)
- mongoc_optional_is_set(3)
apt-get install libmongoc-doc
Manual
| MONGOC_CLIENT_WRITE_COMMAND_WITH_OPTS(3) | libmongoc | MONGOC_CLIENT_WRITE_COMMAND_WITH_OPTS(3) |
SYNOPSIS
bool mongoc_client_write_command_with_opts (mongoc_client_t *client,
const char *db_name,
const bson_t *command,
const bson_t *opts,
bson_t *reply,
bson_error_t *error);
Execute a command on the server, applying logic that is specific to commands that write, and taking the MongoDB server version into account. To send a raw command to the server without any of this logic, use mongoc_client_command_simple().
Use this function for commands that write such as "drop" or "createRole" (but not for "insert", "update", or "delete", see Basic Write Operations). Write concern and collation can be overridden by various sources. In a transaction, read concern and write concern are prohibited in opts. The highest-priority sources for these options are listed first in the following table. The write concern is omitted for MongoDB before 3.4.
| Write Concern | Collation |
| opts | opts |
| Transaction | |
| client |
See the example for transactions and for the "distinct" command with opts.
reply is always initialized, and must be freed with bson_destroy().
PARAMETERS
- client: A mongoc_client_t.
- db_name: The name of the database to run the command on.
- command: A bson_t containing the command specification.
- opts: A bson_t containing additional options.
- reply: A maybe-NULL pointer to overwritable storage for a bson_t to contain the results.
- error: An optional location for a bson_error_t or NULL.
opts may be NULL or a BSON document with additional command options:
- writeConcern: Construct a mongoc_write_concern_t and use mongoc_write_concern_append() to add the write concern to opts. See the example code for mongoc_client_write_command_with_opts().
- sessionId: First, construct a mongoc_client_session_t with mongoc_client_start_session(). You can begin a transaction with mongoc_client_session_start_transaction(), optionally with a mongoc_transaction_opt_t that overrides the options inherited from client, and use mongoc_client_session_append() to add the session to opts. See the example code for mongoc_client_session_t.
- collation: Configure textual comparisons. See Setting Collation Order, and the MongoDB Manual entry on Collation. Collation requires MongoDB 3.2 or later, otherwise an error is returned.
- serverId: To target a specific server, include an int32 "serverId" field. Obtain the id by calling mongoc_client_select_server(), then mongoc_server_description_id() on its return value.
Consult the MongoDB Manual entry on Database Commands for each command's arguments.
ERRORS
Errors are propagated via the error parameter.
RETURNS
Returns true if successful. Returns false and sets error if there are invalid arguments or a server or network error.
A write concern timeout or write concern error is considered a failure.
BASIC WRITE OPERATIONS
Do not use this function to call the basic write commands "insert", "update", and "delete". Those commands require special logic not implemented in mongoc_client_write_command_with_opts. For basic write operations use CRUD functions such as mongoc_collection_insert_one() and the others described in the CRUD tutorial, or use the Bulk API.
EXAMPLE
example-command-with-opts.c
/*
Demonstrates how to prepare options for mongoc_client_read_command_with_opts and
mongoc_client_write_command_with_opts. First it calls "cloneCollectionAsCapped"
command with "writeConcern" option, then "distinct" command with "collation" and
"readConcern" options,
Start a MongoDB 3.4 replica set with --enableMajorityReadConcern and insert two
documents:
$ mongo
MongoDB Enterprise replset:PRIMARY> db.my_collection.insert({x: 1, y: "One"})
WriteResult({ "nInserted" : 1 })
MongoDB Enterprise replset:PRIMARY> db.my_collection.insert({x: 2, y: "Two"})
WriteResult({ "nInserted" : 1 })
Build and run the example:
gcc example-command-with-opts.c -o example-command-with-opts $(pkg-config
--cflags --libs libmongoc-1.0)
./example-command-with-opts [CONNECTION_STRING]
cloneCollectionAsCapped: { "ok" : 1 }
distinct: { "values" : [ 1, 2 ], "ok" : 1 }
*/
#include <mongoc/mongoc.h>
#include <stdio.h>
#include <stdlib.h>
int
main (int argc, char *argv[])
{
mongoc_client_t *client;
const char *uri_string = "mongodb://127.0.0.1/?appname=client-example";
mongoc_uri_t *uri;
bson_t *cmd;
bson_t *opts;
mongoc_write_concern_t *write_concern;
mongoc_read_prefs_t *read_prefs;
mongoc_read_concern_t *read_concern;
bson_t reply;
bson_error_t error;
char *json;
mongoc_init ();
if (argc > 1) {
uri_string = argv[1];
}
uri = mongoc_uri_new_with_error (uri_string, &error);
if (!uri) {
fprintf (stderr,
"failed to parse URI: %s\n"
"error message: %s\n",
uri_string,
error.message);
return EXIT_FAILURE;
}
client = mongoc_client_new_from_uri (uri);
if (!client) {
return EXIT_FAILURE;
}
mongoc_client_set_error_api (client, 2);
cmd = BCON_NEW ("cloneCollectionAsCapped",
BCON_UTF8 ("my_collection"),
"toCollection",
BCON_UTF8 ("my_capped_collection"),
"size",
BCON_INT64 (1024 * 1024));
/* include write concern "majority" in command options */
write_concern = mongoc_write_concern_new ();
mongoc_write_concern_set_wmajority (write_concern, 10000 /* wtimeoutMS */);
opts = bson_new ();
mongoc_write_concern_append (write_concern, opts);
if (mongoc_client_write_command_with_opts (client, "test", cmd, opts, &reply, &error)) {
json = bson_as_canonical_extended_json (&reply, NULL);
printf ("cloneCollectionAsCapped: %s\n", json);
bson_free (json);
} else {
fprintf (stderr, "cloneCollectionAsCapped: %s\n", error.message);
}
bson_free (cmd);
bson_free (opts);
/* distinct values of "x" in "my_collection" where "y" sorts after "one" */
cmd = BCON_NEW ("distinct",
BCON_UTF8 ("my_collection"),
"key",
BCON_UTF8 ("x"),
"query",
"{",
"y",
"{",
"$gt",
BCON_UTF8 ("one"),
"}",
"}");
read_prefs = mongoc_read_prefs_new (MONGOC_READ_SECONDARY);
/* "One" normally sorts before "one"; make "One" sort after "one" */
opts = BCON_NEW ("collation", "{", "locale", BCON_UTF8 ("en_US"), "caseFirst", BCON_UTF8 ("lower"), "}");
/* add a read concern to "opts" */
read_concern = mongoc_read_concern_new ();
mongoc_read_concern_set_level (read_concern, MONGOC_READ_CONCERN_LEVEL_MAJORITY);
mongoc_read_concern_append (read_concern, opts);
if (mongoc_client_read_command_with_opts (client, "test", cmd, read_prefs, opts, &reply, &error)) {
json = bson_as_canonical_extended_json (&reply, NULL);
printf ("distinct: %s\n", json);
bson_free (json);
} else {
fprintf (stderr, "distinct: %s\n", error.message);
}
bson_destroy (cmd);
bson_destroy (opts);
bson_destroy (&reply);
mongoc_read_prefs_destroy (read_prefs);
mongoc_read_concern_destroy (read_concern);
mongoc_write_concern_destroy (write_concern);
mongoc_uri_destroy (uri);
mongoc_client_destroy (client);
mongoc_cleanup ();
return EXIT_SUCCESS;
}
AUTHOR
MongoDB, Inc
COPYRIGHT
2009-present, MongoDB, Inc.
| December 18, 2025 | 1.30.4 |